Does a shadow variable update when a source variable is set to null? #856
Replies: 2 comments 1 reply
-
to be clear, the end time is never to long, it's usually entirely correct, and occasionally..it's too short. The variable being null in my case would create a longer interval, which is what made me suspicious of that scenario. |
Beta Was this translation helpful? Give feedback.
-
Hello @mikepictor! There is no code in the solver which would skip shadow variable updates under any circumstances; a successful triggering of shadow variables leaves the solution in a consistent state, with all shadow variables on all entities having been updated. However, the solver can only recompute what it knows to have been changed. Are you sure your variable listeners/custom moves are correctly calling all variable changes? If so, this may be a bug, in which case I will ask you to please submit a simplified reproducible code that I can run to see the issue on my end. |
Beta Was this translation helpful? Give feedback.
-
I have a shadow variable watching 2 properties. One in the same class that it is declared in, one watching a nullable planning variable in a different class.
The shadow variable is meant to balance both planning variables and compute an end time of a task. I have noticed some examples where my end time is shorter than it should be based on the end state of the planning variables. The first variable always has a value, but the second, being nullable, may not. I am just wondering whether the shadow variable may get computed when the 2nd property gets a new value, but maybe is NOT computed if the second property is assigned a null value?
I am on Timefold 1.6.0
Beta Was this translation helpful? Give feedback.
All reactions