Feature proposal: Saving symbolic derivatives

@odow I am starting discussion about new feature for MathOptSymbolicAD.jl .
I think adding option to save symbolic derivative expressions to file would be useful.

Many of us develop applications where we do not care about computation time of parts that can be computed only once beforehand. Lets enable saving that since it does not change depending on the model data. This should eliminate some drawbacks of symbolic approach for many use cases.

I’ll keep this in mind. But I’m unlikely to implement something like this. What file format would we choose? It’ll be possible to pass in a NonlinearExpr and get the symbolic derivatives back as a collection of NonlinearExpr. What you do with them is up to you.

I think we can let user decide what file format and only make memory object (in Julia workspace). Maybe recommend file format in Docs.

As far as I know, bson supports most Julia features so I would try with it.

I agree. NonlinearExpr approach sounds good. I think it is worth the effort (very much).