E-CE0603 — Unknown constraint hint name
Error Type |
|
|---|---|
Phase |
configuring constraint detection |
Python exception |
|
Message
`{name}` is not a recognized constraint hint name.
Possible fix: use `"onehot"` or `"sos1"` (case-insensitive; `-` and `_` spellings are also accepted), or pass a `ConstraintHintName` value.
({name} is the string you passed)
Cause
A string passed where a constraint hint name is expected — typically in the constraint_hints argument of ConstraintDetectionConfig — did not match any known hint.
The recognized names are "onehot" (also "one-hot" and "one_hot") and "sos1" (also "sos-1" and "sos_1"), compared case-insensitively.
For example, constraint_hints=["one hot"] or constraint_hints=["sos2"] raises this error.
Fix
Use one of the recognized spellings, or the ConstraintHintName values directly:
import jijmodeling as jm
config = jm.ConstraintDetectionConfig(constraint_hints=["onehot", "sos1"])
# equivalently:
config = jm.ConstraintDetectionConfig(
constraint_hints=[jm.ConstraintHintName.OneHot, jm.ConstraintHintName.Sos1],
)