Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
(De)serialization of graphs #308
It would be very handy to be able to save MX and SX graphs to a filesystem and load back.
Created by jgillis at: 2011-12-22T13:59:40
Storing an SX graph is trivial. All information is contained in the algorithm. One problem is that if you reconstruct the graph, you might create common subexpressions.
MX is much harder. And you cannot really do it without also doing FX and derived classes. For that you would need some systematic approach.
I'm not sure I think this is the right way to go. So far, we have done a pretty good job making the symbolics fast enough that people aren't really complaining about regenerating all the expression graphs all the time. Codegen also makes this less important.
I probably mentioned this in a previous sourceforge issue, but I'll add my
Another benefit that might be overlooked is that the vast majority of python parallelization libraries rely on pickling to pass objects to and from processes. being able to pickle casadi's symbolic objects would make running optimizations in parallel significantly more straightforward.