-
Enhancement
-
Resolution: Won't Do
-
Minor
-
6.3.0.CR2
-
None
-
NEW
-
NEW
Construction Heuristics only initialize a planning variable if it's null. Otherwise they leave it as is.
This behavior is undesirable for primitive types, as they are never null, so CH's don't touch them by default (although that's overridable through the reinitializefilter in @PlanningVariable).
If then later Local Search comes around and it finds it easier to leave those vars alone, them might fall out of the valid range, for example IntValueRange 2 to 30 and an int defaults to 0.
Proposals:
- Treat int 0 and long 0L as null, so threat them as uninitialized. That's not good for repeated planning if 0 is in the value range.
- Treat any primitive type value as uninitialized. That's not good for repeated planning.
- Fail fast or warn if primitive value types are used.
- Info log a message for each variable already initialized at startup. Or for how many in total are already initialized