Decision Optimization

Decision Optimization

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

 View Only
  • 1.  redirecting the cplex log file in OPL Script

    Posted Wed April 27, 2011 01:58 PM

    Originally posted by: IntVar


    What is the OPL 12 way of the OPL 3 command
    model.setStringParameter("cplexLogFile","c:\cplex.log");

    That is I want to redirect the cplex log to a file using IBM ILOG Script.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: redirecting the cplex log file in OPL Script

    Posted Thu April 28, 2011 01:31 AM

    Originally posted by: SystemAdmin


    Through APIs you would use 'setOut' method of IloCplex. There is no equivalent method in script. If running in batch mode you could dump all output to a file using: oplrun.exe xxx.mod xxx.dat > Output.txt

    Regards,
    Faisal
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: redirecting the cplex log file in OPL Script

    Posted Thu April 28, 2011 01:11 PM

    Originally posted by: IntVar


    Thanks... spent a lot of time trying to find it, should have asked earlier...

    Will this be added to future versions of OPL Script?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: redirecting the cplex log file in OPL Script

    Posted Sun May 01, 2011 11:24 AM
    Hi

    you can also set this in an .ops file and use this setting file in a run configuration

    You would use

    Engine log file
    Enables you to save the log file from the solving engine under the name and location you choose.

    Regards

    Alex
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: redirecting the cplex log file in OPL Script

    Posted Sun May 01, 2011 11:38 AM
    NB:

    if you really need to do that in script, you can do

    execute
    {
     thisOplModel.settings.run_engineLog="log.txt"; 
    }
    


    Alex
    #DecisionOptimization
    #OPLusingCPLEXOptimizer