IBM Support

Export CPO file using OPLRUN

Question & Answer


Question

How to export a CPO file using OPLRUN?

Answer

The CP Optimizer (CPO) file format is a specification for writing constraint programming models suitable for CP Optimizer, together with other information such as parameter settings and search phases. A single model can be contained in one file or span multiple files.

The main difference between the CPO file format and OPL is that the CPO file format is used for representing instantiated models: that is, models which already have their data incorporated. By comparison, OPL models generally separate models and data. The CPO file format is also much simpler than the OPL language. There are no user-defined data structures, no scripting, no forall constructs, no database connections and so on.

If you are using the command line OPLRUN to execute your OPL models, then you can export the CPO file using the below command:

oplrun -e mymodel.cpo mymodel.mod mymodel.dat

[{"Product":{"code":"SSSA5P","label":"IBM ILOG CPLEX Optimization Studio"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Area:ILOG Script for OPL\/OPL Script","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"12.6.3","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21984241