Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Read .mod and .dat files in CPLEX prompt

  • 1.  Read .mod and .dat files in CPLEX prompt

    Posted Wed June 03, 2015 03:56 AM

    Originally posted by: Vitja


    Hello,

    when I type in "help read" in the CPLEX prompt, there are only a few types of files displayed  which are readable from CPLEX (for instance .net, .bas, .ord etc.), but no .mod or .dat files.

    Now  I have written a model file (.mod) and a data file (.dat) and would like to read and solve it with the cplex prompt (when I try to solve it with the CPLEX optimization studio it takes to long running time). 

    Is it possible to read .mod and .dat files via CPLEX prompt and to solve it? If yes, what is the correct syntax for it?

     

    Thanks in advance!


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Read .mod and .dat files in CPLEX prompt

    Posted Wed June 03, 2015 05:01 AM

    .mod and .dat files are OPL files. OPL is something built on top of CPLEX. The interactive optimizer is only an interface to the CPLEX engine, that is why it does not accept OPL input file.

    However, there is a command line tool for OPL as well. It is called oplrun and can be found in the installation.

    If you have problems with that it is best to turn to the OPL Forum for questions.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Read .mod and .dat files in CPLEX prompt

    Posted Wed June 03, 2015 03:57 PM

    Hi

    what you could do is in command line

    oplrun -Xbench -e toto.lp toto.mod

    which will generate toto.lp without solving out of toto.mod

    and then you may solve toto.lp with the cplex command line

    regards


    #CPLEXOptimizers
    #DecisionOptimization