0

in my CP model I have a state function

stateFunction f(a in aRange) with TransitionTimes[a]

By default, the value of f[a] equals -1 until time 0, e.g.

id,value
1,stepwise{ -1 -> 0; 1 -> 3; -1 -> 8; 1 -> 10; -1 }

Is there a possibility in CP Optimizer to define an initial value unlike -1, e.g. 42?

So to say, I would like to have the following values:

id,value
1,stepwise{ 42 -> 0; 1 -> 3; -1 -> 8; 1 -> 10; -1 }

Unfortunately, I have not found a solution studying the documentation and corresponding forum discussions.

Thanks in advance!

1 Answer 1

0

what you call "initial value" is the value corresponding to "NoState". You cannot change it, it is an internal value, and it is a negative value in order to avoid conflicts with the other states that must be positive values.

What is your need?

I suspect you want to group the value "NoState" with another state "s1", for instance because you want to constrain the state to be either s1 or NoState during an interval a.

Note that the constraint alwaysIn(f, a, s1, s1) does exactly that, it does consider "NoState" as a kind of escape value. It is different from alwaysEqual(f, a, s1) that forces the state to be s1. See https://www.ibm.com/docs/en/icos/22.1.1?topic=f-alwaysin

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.