Decision Optimization

Decision Optimization

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

 View Only
  • 1.  constraints on the start and end of interval variables

    Posted Wed March 07, 2012 09:24 AM

    Originally posted by: S3PU_Yaqing_Tan


    Hello everyone,

    I am trying to solve a scheduling problem, which need to implement constraints on the interval variables. Under a certain condition, I want them to be a certain number. For example,
    when the endOf(a interval variable)<=5, the startOf(the same variable)=4.
    I tried several ways, but did not succeed. Thanks a lot!!

    Yatsing
    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: constraints on the start and end of interval variables

    Posted Wed March 07, 2012 09:45 AM

    Originally posted by: SystemAdmin


    Hi,

    I think, you can use imply (=>) constrants, as:

    
    ( endOf(intervalvar <= 5) ) => ( startOf(intervalvar==4) );
    

    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: constraints on the start and end of interval variables

    Posted Mon March 12, 2012 07:24 AM

    Originally posted by: S3PU_Yaqing_Tan


    Thank you very much. I solved the problem by imply constraint.
    #ConstraintProgramming-General
    #DecisionOptimization


  • 4.  Re: constraints on the start and end of interval variables

    Posted Wed March 07, 2012 10:15 AM

    Originally posted by: SystemAdmin


    Hello,
    As a possible complement to Mehmet's answer, depending on the particular type of conditions you have, you may be able to use more "global" constraints than a (potentially large) set of composite constraints ( (endOf(a)<=U) => (startOf(a)==V) ). For instance you may look at the "forbidExtent" constraint that prevents an interval variable to overlap a set of fixed time windows. Maybe you can also model your constraints as something like startOf(a)== EXPR ( endOf(a) ) where EXPR is a CP Optimizer expression (example: startOf(a) == 4 * (endOf(a) div 4)).
    But of course it is not always possible, that will depend on the particular type of conditions you want to model.

    Philippe
    #ConstraintProgramming-General
    #DecisionOptimization


  • 5.  Re: constraints on the start and end of interval variables

    Posted Mon March 12, 2012 07:25 AM

    Originally posted by: S3PU_Yaqing_Tan


    thank you. sorry for that i did not read those documents carefully
    #ConstraintProgramming-General
    #DecisionOptimization