I have a model written in CPLEX OPL
. Is there a way to export the model to .cpo
extension?
In Python docplex
module the syntax is as:
mdl.export_as_cpo()
But I could not find an equivalent command for the OPL
in the OPL User's manual.
Operations Research Stack Exchange is a question and answer site for operations research and analytics professionals, educators, and students. It only takes a minute to sign up.
Sign up to join this communityI have a model written in CPLEX OPL
. Is there a way to export the model to .cpo
extension?
In Python docplex
module the syntax is as:
mdl.export_as_cpo()
But I could not find an equivalent command for the OPL
in the OPL User's manual.
The steps taken from the IBM Knowledge Center are:
- Create a new settings file
- Change the export format to CPO
- Add the settings file to the default run configuration
- Run the run configuration
Thanks to @Mark L. Stone who provided the link.
Other options:
oplrun
. Using option -d
you can specify to dump your model into a cpo
file.ILC_MODEL_DUMP_FILE
. Before solving the model CP Optimizer tests this variable and if present it dumps the current model into the specified file (the variable can also specify the path to the file). It works for all applications that are using CP Optimizer, not only for OPL.
.cpo
and.ops
that I could not find it. $\endgroup$ – Mostafa Dec 22 '19 at 22:03