numagic / lumos

scalable accelerated optimal control
MIT License
16 stars 0 forks source link

remove con_outputs fro model_io #56

Closed yunlongxu-numagic closed 2 years ago

yunlongxu-numagic commented 2 years ago

should we get rid of con_outputs from model IO? it is only used for OCP, and really defined by the OCP, and selected from the existing model outputs. So a model developer really isn't aware of this!

What makes things a bit more complicated is that for efficiency, the compiled model will only have this 'con_outputs' as outputs, and with derivatives taken on it. So for the compiled model, it does need to be aware of con_outputs!

Some guiding principles:

Some challenges:

Some questions:

yunlongxu-numagic commented 2 years ago

IO definition

StateSpaceModel

forward

states, inputs -> states_dot, outputs

forward_with_array

states, input -> states_dot, output, outputs might be just a subset, as it is much cheaper to collect the subset before the outputs array is formed than after

implicit

states, inputs, states_dot, con_outputs -> residuals

flat implicit

as implicit, but with a flat array as inputs