E-MD0101 — Name already in use
Error Type |
|
|---|---|
Phase |
building the model |
Python exception |
|
Message
The name `{name}` is already used by a {kind}{...}.
Possible fix: choose a different name.
(the of type `{type}` part is omitted when the existing entity has no recorded type)
Cause
A placeholder, decision variable, named expression, or category label was declared with a name that is already bound in the same problem. The check does not depend on the kind: declaring a second placeholder with the same name — even with an identical definition — is rejected, as is reusing a name across kinds (e.g. a placeholder and a decision variable both called x). This error fires at declaration time; a collision between instance data and a non-placeholder is reported separately as E-CE0004.
Fix
Choose a different name for the new declaration, or reuse the object returned by the original declaration instead of declaring it again.