Decision Optimization

Decision Optimization

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

 View Only
  • 1.  doubt CPLEX Ilog Concert about IloRangeArray

    Posted Mon March 14, 2011 02:40 PM

    Originally posted by: dbaena


    Hi,

    If I work with IloRangeArray C++ and I do:

    model.add(IloRange(env,0,expr,10); //small example

    // and I add to rngs (IloRAngeArray)

    rngs.add(IloRange(env,0,expr,10);

    but when I want to remove that constraint it is easy to remove from the model:

    model.remove(rngshttp://rngs.getSize()-1) but...

    how can I remove that from IloRangeArray. That class haven't got method remove...

    Thanks a lot,
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: doubt CPLEX Ilog Concert about IloRangeArray

    Posted Mon March 14, 2011 03:47 PM

    Originally posted by: SystemAdmin


    You need to keep track of the index (i) of the entry you wish to delete. Then invoke the end() method on rngs[i].

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: doubt CPLEX Ilog Concert about IloRangeArray

    Posted Mon March 14, 2011 06:01 PM

    Originally posted by: dbaena


    Thank you Paul.
    #CPLEXOptimizers
    #DecisionOptimization