alphaville / optimization-engine

Nonconvex embedded optimization: code generation for fast real-time optimization + ROS support
https://alphaville.github.io/optimization-engine/
Other
512 stars 53 forks source link

Code generation with Cartesian products #118

Closed alphaville closed 5 years ago

alphaville commented 5 years ago

Support code generation with Cartesian products of sets

alphaville commented 5 years ago

We cannot return an instance of CartesianProduct from a function in Rust because the structure contains references to other structures (instances of Constraint), which do not live long enough (at least, when instantiated inside the same function). The solution is for CartesianProduct to own its constituent sets.