Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Discretization of an interval variable in CP Optimizer

    Posted yesterday

    Hello everyone,

    I have a question about discretization for interval variables.

    I define an interval variable x using calls like:
    - setStartMin(a) / setStartMax(b);
    - setEndMin(c) / setEndMax(d);
    - setLengthMin(e) / setLengthMax(e).

    This produces something like:
    x = intervalVar(optional, start = a..b, end = c..d, length = e).
    With this setup the variable is discretized with step 1 (i.e., start/end/length take integer values with increment 1). 

    I would like the variable to use a coarser discretization, for example step = 10 (so values go a, a+10, a+20, ...), rather than step = 1.
    Is there a direct API/parameter to set the discretization (granularity / step size) for an interval variable? Or do I need to rescale/transform my parameters manually to achieve that behavior? 

    Thanks in advance for any pointers or examples.



    ------------------------------
    Mateus Martin
    ------------------------------


  • 2.  RE: Discretization of an interval variable in CP Optimizer

    Posted 12 hours ago

    Hello Mateus,

            

            There is no direct API/parameter to do this. You can use the startOf method for instance:

    model.add(IloStartOf(x) % 10 == 0);

    Regards,



    ------------------------------
    Thierry Sola
    ------------------------------