Closed type-null closed 1 year ago
Have you looked at ipopt_solve ? https://cppad.readthedocs.io/en/latest/ipopt_solve.html
Have you looked at ipopt_solve ? https://cppad.readthedocs.io/en/latest/ipopt_solve.html
Yes. I'm trying to write a complicated model so I wondered if I can print out the model before solving it to debug. I couldn't find any function in this documentation to write out the model formulation.
The model functions are just a sequence of floating point operations. There is a way to print one out but I do not think it will serve your purpose; see https://cppad.readthedocs.io/en/latest/to_json.html
Not only that, but you can input a function this way, see https://cppad.readthedocs.io/en/latest/from_json.html
Perhaps you could compute the gradient of your objective and the Jacobian of your constraints and then print then to a csv file so that you can look at it in a spread sheet. Would that help ?
Thanks a lot! I ended up with cout variables of interest to debug...
This issue 164 will be converted to a discussion.
I am trying to debug the model in CppAD using Ipopt. Is there a way to write the model formulation out as a file, such as .lp file? Thanks