Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Modelling a runlength constraint

    Posted 07/17/10 01:57 PM

    Originally posted by: MSaqib


    Hello everyone
    I have a decision variable in the form of an array of integers.
    dvar int MapS24TIMES in LOCATIONS;
    where S24, TIMES and LOCATIONS are all ranges of integers.
    I need a constraint on Map, so that at least n consecutive values in it must be the same. For example, if the solver assigns the value 13 to Map[1][1], then Map[1][2], Map[1][3] through Map[1]2+n must also be 13. Map[1]2+n+1 is free to take on any value, including 13. Supposing that Map[1]2+n+1 takes on the value 2, then Map[1]2+n+2, Map[1]2+n+3 through Map[1]2+n+1+n must also take on the value 2.
    Here, n is an integer model parameter, and of course, this sort of constraint must hold for Map[2][*], Map[3][*] etc as well.
    Any help/pointers would be helpful.
    Thanks and best regards
    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: Modelling a runlength constraint

    Posted 07/17/10 01:59 PM

    Originally posted by: MSaqib


    The message doesn't seem to have gone through correctly formatted. The Map variable was a two dimensional array. I hope that the question is clear.
    #ConstraintProgramming-General
    #DecisionOptimization