Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  question on using an *.ops file

    Posted 04/03/12 07:35 AM

    Originally posted by: CplexUser1453


    Hello

    I am using OPL 6.3 and I have a stupid question on using an *.ops file :

    By exectuting oplrun on the command line :

    oplrun -tune params.ops model.mod data.dat
    


    I got the following params.ops file :

    <?xml version="1.0"?>
    <settings>
    <category name="cplex">
    <setting name="heurfreq" value="3" type="int"/>
    <setting name="rinsheur" value="20" type="int"/>
    </category>
    </settings>

    However, when I try to execute my model with the .ops file :

    oplrun model.mod data.dat params.ops
    


    I get a syntax error :

    ERRORDATA_001 at 1:1-2 params.ops: Data parsing error: syntax error, unexpected <.
    FATALPARSE_103 at 1:2-3 params.ops: Unexpected character in "?", try using quoted string data, or check the encoding
    


    What am I missing?

    Thanks a lot!
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: question on using an *.ops file

    Posted 04/03/12 09:48 AM
    Hi,

    if you do oplrun -h

    you get

    Usage:
    oplrun [options] model-file [data-file ...]
    oplrun [options] -p project-dir [run-configuration ...]
    


    In order to use an ops file, you need to include it into a run configuration.
    (With drag and drop in the IDE, this is quite easy)

    You can also turn

    <setting name="heurfreq" value="3" type="int"/>
    <setting name="rinsheur" value="20" type="int"/>
    


    into OPL scripting:

    execute
    {
     cplex.heurfreq=3;
     cplex.rinsheur=20;
    }
    


    regards
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: question on using an *.ops file

    Posted 04/03/12 11:13 AM

    Originally posted by: CplexUser1453


    Hello

    Thanks a lot for your response.

    I am running OPL models on a Linux machine, that's why I am asking about command line (sometimes it is more pracical than the IDE).

    So if I understand correctly, the only way to apply non default parameters, using command line, is to include them in the my model .mod file?

    (I had a vague recollection that there was a way to use an *.ops file on command line...)
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: question on using an *.ops file

    Posted 04/03/12 11:28 AM
    Hi,

    the Ide is now available on linux for some chips.
    Are you aware of this?

    Regards
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: question on using an *.ops file

    Posted 04/03/12 12:12 PM

    Originally posted by: CplexUser1453


    Yes, I was using OPL 6.3 for now but I will upgrade to a more recent version. Thanks for your response
    #DecisionOptimization
    #OPLusingCPLEXOptimizer