Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  soft Constraints

    Posted 06/06/08 01:57 PM

    Originally posted by: SystemAdmin


    [shadi said:]


    i have a model (start with using CP) which i call for each trip, inside this model i have the following constraint:

    pay >= 0.9*drivingDistance;

    In some trips I have an infeasible problem. when i delete this constraint i have always a soluation,
    can i ignore this this constraint when i have an infeasible soluation???

    thank you
    Kshieboun Shadi



    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: soft Constraints

    Posted 06/06/08 02:23 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    You can write a relaxed version of your model. And for instance, run the relaxed version if your problem doesn't have a solution.

    Here is an example:


    using CP;

    int relaxMode = 1;

    dvar boolean enforcement;
    dvar int pay;
    dvar int drivingDistance;

    maximize enforcement;

    constraints {

      if (relaxMode == 0)
        enforcement == 1;

    enforcement == (pay >= 0.9*drivingDistance) ;
    }


    Didier.
    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: soft Constraints

    Posted 06/06/08 02:44 PM

    Originally posted by: SystemAdmin


    [shadi said:]

    Dear Didier,
    i really cant understand how i can do this, how i can maximize a boolean variable???
    is there an example which i can read??


    thank you
    Kshieboun Shadi


    #ConstraintProgramming-General
    #DecisionOptimization


  • 4.  Re: soft Constraints

    Posted 06/09/08 01:32 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    Hello,

    Here are some answers to your questions, which, I hope, will help you understand the model I posted

    how i can maximize a boolean variable???

    In OPL, a boolean variable has value 0 when false, and 1 when true. Its domain is 0..1 . This is why you can maximize it.
    An logical expression (pay >= 0.9*drivingDistance) is considered a boolean expression by OPL (when using CP), with the same convention (0 if false, 1 if true). You can make comparison, sums, product, and any arithmetic operation you want with such expressions. An equality between enforcement, the boolean variable, and a logical expression, means that the enforcement's value is one if and only if the logical expression is true.

    Hope this helps.

    Didier.
    #ConstraintProgramming-General
    #DecisionOptimization


  • 5.  Re: soft Constraints

    Posted 06/09/08 02:38 PM

    Originally posted by: SystemAdmin


    [shadi said:]

    Dear Didier

    i understand now this point...

    thank you again...
    Kshieboun Shadi
    #ConstraintProgramming-General
    #DecisionOptimization