0

Some commercial solvers like GuRoBi have a nifty function which can be used to write the optimization problem to a .lp file or a .mps file. For instance,GuRoBi python interface has this command,

model.write("test.lp")

I am using SCIP's c++ interface I was wondering if I can write the model I described in c++ to an lp file. Googling seems to just give me answers about reading .lp files and not writing.

Morpheus
  • 3,285
  • 4
  • 27
  • 57

1 Answers1

4

You should call SCIPwriteOrigProblem.

Example:

int retcode = SCIPwriteOrigProblem(scip, "test.lp", NULL, FALSE);
assert(retcode == SCIP_OKAY);
Gregor
  • 1,333
  • 9
  • 16