Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  Import a model to CP Optimizer

    Posted Wed January 18, 2017 10:38 PM

    Originally posted by: stef44


    Hi all,

     

    My question is the following:

    Is it possible, for example to read .MPS files in CPLEX and then import that model to CP Optimizer ? 

    Short story, is it possible to import a MIP model (from CPLEX) to CP Optimizer?



    Any answer is appreciated!
    Thank you


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Import a model to CP Optimizer

    Posted Thu January 19, 2017 08:52 AM

    Originally posted by: PhilippeLaborie


    Hello Stefana,
    It should be possible to import the MIP model into a concert IloModel using IloCplex (see distributed CPLEX example in examples/src/ilolpex2.cpp) and then load this IloModel into a CP engine (IloCP) and solve it.
    Philippe

     


    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: Import a model to CP Optimizer

    Posted Tue March 21, 2017 06:26 AM

    Originally posted by: suji248


    Hello

     

    Is the same technique possible in C# ? I have a MPS file but finding a feasible solution is a challenge. Is it possible to import the Model and then solve using CP engine? 

     


    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: Import a model to CP Optimizer

    Posted Tue March 21, 2017 10:35 AM


  • 5.  Re: Import a model to CP Optimizer

    Posted Thu May 17, 2018 04:40 AM

    Originally posted by: pchtsp


    Hello there!

     

    Now that we've opened the pandora box of programming languages... is there any support for importing MPS files to CPO via the python docplex API? Or the older cplex API?

    Alternatively, is there any support for using CPO as a command line app with an MPS file as input argument and writing a solution file as output? In a similar way to what CPLEX offers?

     

    thanks!

     

    Franco


    #CPOptimizer
    #DecisionOptimization


  • 6.  Re: Import a model to CP Optimizer

    Posted Fri May 18, 2018 04:17 AM

    Originally posted by: Olivier OUDOT


    Hello Franco,

    No, it is impossible to import a MPS file with the Python API of docplex.cp. 

    CPO command line is available with the CP Interactive process (cpoptimizer.exe) but it only reads CPO files.

    Currently, the only way is to write a C++ program that:

     - import the MPS file using a IloCplex (cplex.importModel())

     - retrieve the IloModel

     - then solve the IloModel using a IloCP.

    Optionally, you can also use the IloCP to export the model in CPO format, which is then importable in both Python and cpoptimizer.exe.


    #CPOptimizer
    #DecisionOptimization


  • 7.  Re: Import a model to CP Optimizer

    Posted Sat March 14, 2020 10:35 PM

    Originally posted by: cuiyouzhi0000


    Hi Olivier,

    Besides C++, could we do this in Java to import MPS file in CPLEX and solve it in CP?

     

    John

     

    #CPOptimizer
    #DecisionOptimization