With the trapeze rule, the control and other variables may be very oscillating. See:
We could reduce the oscillations updating the variables before building the solution:
|
return CTModels.build_solution( |
|
ocp, |
|
T, X, U, v, P; |
|
objective=objective, iterations=iterations, constraints_violation=constraints_violation, |
|
message=message, stopping=stopping, success=success, |
|
path_constraints_dual=path_constraints_dual, |
|
boundary_constraints_dual=boundary_constraints_dual, |
|
state_constraints_lb_dual=box_multipliers[1], |
|
state_constraints_ub_dual=box_multipliers[2], |
|
control_constraints_lb_dual=box_multipliers[3], |
|
control_constraints_ub_dual=box_multipliers[4], |
|
variable_constraints_lb_dual=box_multipliers[5], |
|
variable_constraints_ub_dual=box_multipliers[6] |
|
) |
|
end |
@PierreMartinon Any wishes?
With the trapeze rule, the control and other variables may be very oscillating. See:
We could reduce the oscillations updating the variables before building the solution:
CTDirect.jl/src/solution.jl
Lines 41 to 55 in 9c39f60
@PierreMartinon Any wishes?