Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Problem with writing engine log into a txt file

    Posted 10/11/19 05:43 PM

    Originally posted by: brown_rice


    Hi,

    I write engine log into a txt with the following way. When I run the mod file, it perfectly works.

    float _time;
    execute{
    var assing= new Date();
    _time= assing.getTime();
    var Path=  "C:\\Users\\Desktop\\myFiles\\";
    thisOplModel.settings.run_engineLog= Path+"engine_log_"+_time+".txt";
    }

     

    However, when I create a new mod file and use the command line runner with

    execute{
    IloOplExec("C:\\Program Files\\IBM\\ILOG\\CPLEX_Studio128\\opl\\bin\\x64_win64\\oplrun.exe"+
    " C:\\Users\\Desktop\\OPL\\myModel.mod"+
    " C:\\Users\\OPL\\myModel\\datE1S4800.dat",true ); 

    };

    even though model is run and I obtain my results, the engine log file is never created.  How can I solve this problem? Everything works, when I run the model in the normal way.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Problem with writing engine log into a txt file

    Posted 10/12/19 02:57 AM

    Hi,

    I would use the option in oplrun to export the engine log when I call oplrun in IloOplExec

    See

    https://www.ibm.com/developerworks/community/forums/html/topic?id=5358e11f-4501-4486-9c69-0d4d9019e12d&ps=25

    IloOplExec("C:\\ILOG\\CPLEX_Studio128\\opl\\bin\\x64_win64\\oplrun.exe "+
    " -Dn="+i+" -Dnbthreads=1 c:\\scalableWarehouse.mod",false );

    where I used option -D from oplrun

    With oplrun you have the option -l:

    -l log-file         export engine log

    regards

     

    https://www.linkedin.com/pulse/what-optimization-how-can-help-you-do-more-less-zoo-buses-fleischer/


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Problem with writing engine log into a txt file

    Posted 10/14/19 05:25 PM

    Originally posted by: K__U


    Hi Alex,

    I have a similar problem, and I tried to use the option -l as you suggested.

    However it returns an error message "Unknown option: -l".

    I am using CPLEX 12.8 is this a new option introduced with CPLEX 12.9 ?

     

    execute{
    IloOplExec("C:\\Program Files\\ibm\\ILOG\\CPLEX_Studio128\\opl\\bin\\x64_win64\\oplrun.exe"+
    " -DmaxDist=150"+
    " -Ddatadetails=\"150Miles\""+
    " -l C:\\Users\\xyz\\Desktop\\Northeast\\Solution\\WO_150Miles_EngineNew.txt"+
    " C:\\Users\\xyz\\Documents\\0-Research\\CPLEX\\Model_WO.mod"+
    " C:\\Users\\xyz\\Documents\\0-Research\\CPLEX\\Northeast.dat",true ); // True >> solves the problem serial !
    };

     

    Thanks


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Problem with writing engine log into a txt file

    Posted 10/15/19 01:37 AM