Closed sshin23 closed 2 years ago
Since we want functions such as set_s0!
, should LQDynamicData{T,S,M}
be a mutable struct rather than just a struct?
Also, do you want me to get rid of build_H
and build_J
as well and just implement them internally within LQDynamicModel(::LQDynamicData{T,S,M}; condense = false)
? Or should I leave them as stand alone functions?
set_s0!
should only modify the entry of lq_dyn_data.s0
, so the LQDynamicData
doesn't need to be mutable. But if you find it is more proper to make it a mutable struct
, go ahead and make it mutable (there's no particular reason for it to be immutable either).
we can keep _build_H
and _build_J
, but they should be called internally within LQDynamicModel(::LQDynamicData{T,S,M}; condense = false)
What all should our API be able to do? Right now, I am just building functions to get and set the entries of LQDynamicData
(i.e., s0, A, B, R, Q, sl, su, ul, uu). My set!
functionalities can also either redefine the matrix entirely or just modify an entry of the matrix. Is there more that I should include within the API functionalities?
for now that should be enough, but if there's anything you feel like it will be necessary for the user, you can add them. Those APIs should always change the entry, not the arrays themselves
We should define the following data structure for LQ dynamic optimization
and
LQDynamicData
build_QM
withLQDynamicModel(::LQDynamicData{T,S,M}; condense = false) where {T,S,M}
get_s0
andset_s0!