Decision Optimization

Decision Optimization

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

 View Only

Is it possible to get solve time of each intermidate solution in independent main file?

  • 1.  Is it possible to get solve time of each intermidate solution in independent main file?

    Posted Thu February 06, 2014 07:23 PM

    Originally posted by: qtbgo


    Dear all, I can use "var d=new Date();" method to get solve times of each intermediate solutions in the post process block. But I have a large number of instances to solve, so I do not use post process block, instead, I use an independent main file to solve them one bye one.

    Now , in the main file, I can use the following code to get intermediate objectives, but cannot get the solve time for e.g. MIP obj 1 , because the solving process has ended. Could you give any idea? I need this urgently. Thanks in advance. By the way, you can reference this post.

        if ( subCplex.solve() ) 

          {
              writeln("MIP best obj ",subCplex.getObjValue(),  " solveTime ", (new Date()-before)/1000, " iter ", subCplex.getNiterations() );
          }
        writeln("MIP obj 0 ",subCplex.getObjValue(0) );
        writeln("MIP obj 1 ",subCplex.getObjValue(1) );

    #DecisionOptimization
    #OPLusingCPLEXOptimizer