Using GRB model with boost serialize routines

13 views
Skip to first unread message

Roman Istomin

unread,
Dec 10, 2017, 11:16:54 PM12/10/17
to Gurobi Optimization
I have a class that has all members that can be written and read to disk via boost serialize routines. E.g. http://www.boost.org/doc/libs/1_65_1/libs/serialization/doc/

Now I want to make GRB model be one of the members of the class, but there does not seem to be any conventional way of writing the members of GRB model to disk via boost serialization routines. 

Is there any solution to write model on disk?

Tobias Achterberg

unread,
Dec 11, 2017, 4:53:49 AM12/11/17
to gur...@googlegroups.com
You can write the model to disk using GRBwrite() (or model.write()) to save a
"*.mps" file. But please note that this only stores the *model*, but not the
complete state of the Gurobi object. You can also use GRBwrite() to write the
parameters as *.prm and the MIP start as *.mst file. But even if you use all
three files, this is still not the complete state. For example, if you start
solving a MIP and interrupt the solving process, the state will include the
partial search tree. This cannot be written to disk.

Regards,

Tobias
Reply all
Reply to author
Forward
0 new messages