Error Messages/41321
Error message
The 'Variable Nutrition_coefs', which was passed to the «constraints» parameter of OptInfo, does not identify a constraint within the optimization problem defined in 'Variable Opt_def'.
Cause
You've called a function that accepts a constraint as a parameter (OptInfo, OptShadow, OptSlack, or OptRhsSa), but passed something to that «constraint» parameter that doesn't make sense. The value expected for that parameter should be the identifier of a constraint node in your model, and it should be a constraint that participates in your optimization problem.
In the above example, DefineOptimization was called in the definition of the variable Opt_def. Nutrition_coefs was not a constraint provided to DefineOptimization there. In this example, Nutritional_constraint was the constraint, and was the identifier that should have been passed to the «constraint» parameter of OptInfo.
Remedy
You probably put the wrong identifier in the «constraint» parameter to OptInfo (or whatever function your error occurred with). Replace it with the correct identifier.
Enable comment auto-refresher