E-MD0006 — Inconsistent constraint dimensions

Error Type

Modeling Error

Phase

building the model (adding a constraint)

Python exception

jijmodeling.ModelingError

Message

Constraint `{name}` is defined again with a different number of subscripts.

The existing definition uses {expected_dim} subscript(s), but the new one uses {actual_dim}.

Possible fix: give every definition of `{name}` the same number of subscripts, or use a different constraint name.

Cause

The same constraint name was defined again with a different number of subscripts — for example one definition indexed as c[i] and a later one as c[i, j]. Defining a constraint name more than once is allowed only when every definition uses the same number of subscripts.

Fix

Give every definition of the constraint the same number of subscripts, or split the differently-indexed constraints into separately named constraints.