Topic
1 reply Latest Post - ‏2014-01-06T13:38:19Z by rdumeur
qtbgo
qtbgo
116 Posts
ACCEPTED ANSWER

Pinned topic The sequence of end method?

‏2014-01-05T13:34:17Z |

Hi, in the following code, is the sequence of the end methods (including cp.endSearch();
) correct?

main{  

  var modsource = new IloOplModelSource("CPInitialNoTuple.mod"); //
   var def = new IloOplModelDefinition(modsource);
   var cp = new IloCP();

   cp.param.TimeLimit = 10;

  var opl = new IloOplModel(def,cp);
   var dataSource = new IloOplDataSource(.....);
   opl.addDataSource(dataSource);
   opl.generate();
   
   opl.settings.mainEndEnabled =  true; 
     
         
   cp.startNewSearch();
   while( cp.next() )
   {  ......
        }
   

    cp.endSearch();
    opl.end();
    dataSource.end();
    def.end();
    modsource.end();

}

Updated on 2014-01-05T13:58:17Z at 2014-01-05T13:58:17Z by qtbgo
  • rdumeur
    rdumeur
    63 Posts
    ACCEPTED ANSWER

    Re: The sequence of end method?

    ‏2014-01-06T13:38:19Z  in response to qtbgo

    Dear qtbgo,

    Our OPL expert confirm that your code should work.

    What problem are you encountering?

     

    Cheers,