Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

CP State Functions: state duration

  • 1.  CP State Functions: state duration

    Posted 09/10/15 11:45 AM

    Originally posted by: AdamGregory


    Hi,

    Is it possible to sum the total duration that a resource is in a certain state and use this values as part of the objective function for the problem?
    Extending from the example presented in the documentation, suppose I have an oven with 3 different temperature states. In each of these temperature states, a different amount of natural gas is used to run the oven. Suppose I want to minimize the total amount of natural gas used while still ensuring that all of the required baking is completed on time. Is it possible to sum the total amount of time that the oven was in each of the three resource states?
    Additionally, I notice that the optimizer can also assign resources a state value of NoState. Is it possible to remove this as an allowed state? An oven, for example, can't have a NoState temperature.
    Can resources also be given an initial state? Perhaps there is an off state on the oven and it states in that state. How do you ensure the resource states in this state?

    Thanks,

    Adam


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: CP State Functions: state duration

    Posted 09/11/15 04:47 AM

    Originally posted by: Petr Vilím


    Hello Adam,

    those are hard problems to model. I'm afraid that I can't give you a general pattern to follow. Special cases can be usually handled much better than fully generic one.

    One possibility is to model the oven by stateFunction and noOverlap at the same time. Using expression startOfNext it is possible to make sure that there is no delay between intervals on the noOverlap. The intervals on the noOverlap can model different setting of the oven and demand the setting on the stateFunction using appropriate alwaysFoo constraint. The intervals can be optional and you need enough of them.

    An example of a special case is when the oven has only two different states. Then noOverlap constraint is not necessary, instead there could be a chain of intervals modeling alternative states that is sticked together using endAtStart constraints.

    Do you have fully general case? Is there a way to simplify it somehow?

    I hope it helps, Petr


    #CPOptimizer
    #DecisionOptimization