JuliaMPC / NLOptControl.jl

nonlinear control optimization tool
Other
109 stars 26 forks source link

Defining Dynamics Model #20

Closed jshan432 closed 5 years ago

jshan432 commented 5 years ago

Do the dynamics have to be written as an array of differential equation expressions? I've got a few problems with pretty complex dynamic models that would be much easier to represent in a separate function. GPOPS has been my go to solver thus far, but I'd like to try NLOptControl for the increased speed.

Thanks,

Jackson

huckl3b3rry87 commented 5 years ago

Yes, currently they need to be expression. But you can define complicated expressions separately and then evaluate them in the array https://juliampc.github.io/NLOptControl.jl/latest/tutorials/RobotArm/main.html

or see https://github.com/JuliaMPC/MichiganAutonomousVehicles.jl/blob/master/src/VehicleModels/Three_DOF/Three_DOF.jl#L113