Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  IntSetVar in CPO

    Posted 01/02/12 05:24 PM

    Originally posted by: WJvanHoeve


    Hi,

    I am porting older ILOG Solver 6.4 code to CPO, version 12.3.

    The code uses set variables and a custom global constraint on a set variable. I have been able to adapt the code using the information in cpext.h, but during compilation I get the following error:

    sumfree.o: In function `IlcSumFreeCstI::propagate()':
    sumfree.cpp:(.text+0x49): undefined reference to `IlcCPOIntSetVar::_isInProcess() const'

    The code that is referred to is the following (here var is of type IlcIntSetVar):

    void IlcSumFreeCstI::propagate() {
    if (!var.isInProcess()) // this is not accepted apparently
    return;

    for (IlcIntSetVarDeltaIterator iter1(var, IlcRequiredIteration); iter1.ok(); ++iter1) {
    IlcInt val1 = *iter1;
    for (IlcIntSetVarIterator iter2(var, IlcRequiredIteration); iter2.ok(); ++iter2) {
    IlcInt val2 = *iter2;
    var.removePossible(val1 + val2);
    var.removePossible((IlcInt)abs(val1 - val2));
    }
    }
    }

    Could you please suggest how isInProcess() should be ported to CPO for IlcIntSetVar?

    Thank you,

    Willem
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: IntSetVar in CPO

    Posted 01/06/12 05:59 AM

    Originally posted by: rdumeur


    Dear WJvanHoeve,

    Set variables are not supported by CP Optimizer
    and as such do not appear in the documentation. The remaining option would be to use arrays of boolean variables or other appropriate integer structures.

    Best regards,

    Renaud
    #CPOptimizer
    #DecisionOptimization