Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Redirect cplex logs from "main" block in a file

  • 1.  Redirect cplex logs from "main" block in a file

    Posted Thu January 09, 2014 11:37 AM

    Originally posted by: kasm


    Hi,

    I am using Cplex together with OPL on IBM Cplex Optimization studio v 12.4. And I want, from the "main" block" to redirect the cplex output informations in a local file in order to analyse it later.

    I have found that this can be done using "thisOplModel.settings.run_engineLog" parameter. I tested it but it does not work.

    Can you help me please?

    Thanks


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Redirect cplex logs from "main" block in a file

    Posted Thu January 09, 2014 03:29 PM

    Hi

    what you could do is use oplrun file.mod > log.txt

    Could that be enough ?

    Regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Redirect cplex logs from "main" block in a file

    Posted Thu January 09, 2014 03:33 PM

    Originally posted by: kasm


    Hi,

    I know this option, but inside my .mod file, I am running multiple oplModel and I would like to have one log file for each model.

    Thanks


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Redirect cplex logs from "main" block in a file

    Posted Thu January 09, 2014 03:51 PM

    An ugly but quick workaround could be to write into a file execOpl.bat a set of lines like

     

    oplrun file1.mod > log1.txt

    oplrun file2.mod > log2.txt

    and then you do execOpl.bat in the command line.

    I wish I could find something better.

     

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer