IllegalStateException: fact was never inserted, so it cannot update

34 Views Asked by At

I have separate CH phases for initialization of my two planning entity classes RestBreak and DutyGrain. The class DutyGrain includes a boolean shadow variable resting which is updated whenever the begin time of a RestBreak changes. In addition I have a hard constraint punishing any assignment to a DutyGrain if its shadow variable resting is set to true. The planning variable in DutyGrain needs to be nullable, so this constraints selects all including null values. During the first CH phase initializing all rest breaks this hard constraint produces an IllegalStateException saying the fact (DutyGrain) was never inserted, so it cannot update.

Changing the order of the CH phases makes no sense. Is there are way to make all entities known before starting the first CH phase? Or is it possible to filter entities that are not yet known in constraint streams?

0

There are 0 best solutions below