Reputation: 273
Such as in the 'racecar' example, could I set a lower and upper limit for the 'mass' design_parameter and then optimise the vehicle mass while solving the optimal control problem?
I see that there is an "opt" argument for phase.add_design_parameter() but when I run the problem with opt=True the value stays static. Do I need another layer to the solver that optimises this value?
This feature would be useful for allocating budgets to design decisions (e.g. purchasing a lighter chassis), and tuning parameters such as gear ratio.
Upvotes: 1
Views: 172
Reputation: 2704
It's absolutely possible, and in fact that is the intent of the opt
flag on design parameters.
Just to make sure things are working as expected, when you have a design parameter with opt=True
, make sure it shows up as one of the optimizer's design variables by invoking list_problem_vars
on the problem instance after run_model. The documentation for list_problem_vars is here.
If it shows up as a design variable but the optimizer is refusing to change it, it could be that it sees no sensitivity wrt that variable. This could be due to
Things you can try:
If things don't appear to be working after trying this and I'll work with you to figure this out.
Upvotes: 1