Closed alaurenzi closed 3 years ago
done in f1e5cb75c60a33117cd4807dca37ff225dffda4b. Can be cherry-picked
Do we have an example for this feature?
Do we have an example for this feature?
Yes we do! Check it out in branch parameters: /examples/cart_pole_sin.py
I added also time-variable parameters in branch "parameters"
By parameters I mean casadi symbolics that are fixed to a given value before the optimization is done. This is achieved by calling the
nlpsol
with an additionalp: param_value
entry in the problem dictionary.This feature is needed in order e.g. to change a reference, or cost weight, or constraint parameter (think surface shape or normal direction) on the fly.
I'd consider the same structure that we already have for states and inputs (i.e., time-dependent parameters), as well as general-purpose parameters that don't relate to time in any way (similar to so-called "single variables").
Any further idea or comment @FrancescoRuscelli @EnricoMingo ?