Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  dvar declaration

    Posted 02/11/09 08:18 PM

    Originally posted by: SystemAdmin


    [polochon said:]

    Hi,
    I have declared a decision variable like this:
    dvar int setup[Options,Slots] in 0..1;

    and I have an error message that I can't use a dvar int for constraint
    I don't know why?!
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: dvar declaration

    Posted 02/11/09 08:46 PM

    Originally posted by: SystemAdmin


    [jfk said:]

    I tried to imitate what you're doing but I was not able to reproduce your problem. Are you sure that the declaration with the ranges of  options, slots is OK? probably sharing a bigger chunk of the code would help understand the reason of the error...

    cheers
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: dvar declaration

    Posted 12/09/11 02:10 PM

    Originally posted by: UMQX_Olfat_ELMahi


    Hello,

    i am facing the same error but with different statement related to scheduling:

    if i used:
    int nbPkt2 = 3;
    int nbTsk2 = 9;
    range Ap2 = 0..nbPkt2*nbTsk2-1;
    int durationAp2i in Ap2 = 1;
    dvar interval operationsi in Ap2 size durationAp2[i];

    constraints {

    forall (j in Ap2 : j mod nbTsk2 <= nbTsk2-5)
    endBeforeStart(operations[j], operationsj+1);
    }

    it does work but when using :

    int nbPkt2 = 3;
    int nbTsk2 = 9;
    range Pkts = 0 .. nbPkt2-1;
    range Tsks = 0 .. nbTsk2-1;
    range Ap2 = 0..nbPkt2*nbTsk2-1;
    int Demandi in Pkts, j in Tsks = 1;
    dvar interval operationsi in Ap2 size durationAp2ftoi(j/nbTsk2),j mod nbTsk2;

    constraints {

    forall (j in Ap2 : j mod nbTsk2 <= nbTsk2-5)
    endBeforeStart(operations[j], operationsj+1);
    }

    it gives me two main errors:
    Invalid initialization expression operations
    bad conversion between integer object and numeric object

    can you help me?

    Thanks
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: dvar declaration

    Posted 12/09/11 02:21 PM

    Originally posted by: UMQX_Olfat_ELMahi


    i got it all i had to do is replacing / with div
    #DecisionOptimization
    #OPLusingCPOptimizer