Rapid-Design-of-Systems-Laboratory / beluga

General purpose indirect trajectory optimization
Other
25 stars 6 forks source link

Streamline and simplify data transfer from OCP to BVP to codegen #216

Closed SeanMatthewNolan closed 3 years ago

SeanMatthewNolan commented 4 years ago

As far as I can tell, data, such as state equations, is first stored as strings attached as properties of the OCP. Then packed into a dictionary to be passed to the BVP that turns them into symbols to perform the symbolic math. The expressions are then turned back into strings and packed into another dictionary. Branch 206 (#206, #214, #204 ) needs the symbolic expressions for codegen, so currently another symbolic representation of the BVP is formed from the dictionary of strings, so that a "functional" BVP can be compiled. This chain is making it difficult to elegantly complete and push Branch 206. I proposed that the OCP converts all strings to symbols, which are passed to the BVP from which a functional BVP is formed in codegen

msparapa commented 4 years ago

Yep. As long as we can compile the BVP just fine, I'm OK with converting to symbols and never looking back at strings.

SeanMatthewNolan commented 3 years ago

I finally merged this into the master branch. Though everything isn't perfect, I think it is a big improvement.