Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Delete an IloArray

    Posted 08/14/14 06:00 PM

    Originally posted by: sana_


    Hi,

    I want to know how to make the instruction for(IloInt i=0; i<C.getSize(); i++) C[i].end(); where C is an IloArray<IloConversion> more efficient because I notice that this loop is very slow in my code.

     

    Thanks!


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Delete an IloArray

    Posted 08/15/14 01:22 AM

    Are the IloConversion instances in a model that is currently extracted to an instance of IloAlgorithm? If they are then that IloAlgorithm instance gets notified about deletion of each IloConversion instance and this notification may be time consuming.

    You can try to temporarily un-extract the model:

    IloModel model = cplex.getModel();
    cplex.clearModel();
    // Delete your conversion here
    ...
    cplex.extract(model);

    You could also store all your conversion in an IloExtractableArray and then use that classes removeFromAll() or endElements() functions. Those should usually be faster than your loop since they remove all conversions in one shot.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Delete an IloArray

    Posted 08/26/14 10:17 AM

    Originally posted by: sana_


    The IloConversion instances are in a model that it is already extracted to an instance of IloAlgorithm.

    I'll try these options.

    Thanks a lot!

    Sana.


    #CPLEXOptimizers
    #DecisionOptimization