ConstrainedMax::cmcons ConstrainedMin::cmcons

Details

  • This message is generated when the indicated expression from the second argument in ConstrainedMin or ConstrainedMax is not an equation or inequality.
  • Equations can be entered using the notation lhs==rhs, and inequalities can be entered using lhs<rhs, lhs<=rhs, lhs>rhs, and lhs>=rhs.
  • The notation lhs=rhs is used for assignments rather than for equations. Evaluation of this input will attempt to assign a value to lhs.
  • Off[message] switches off the message; On[message] switches it on. For example: Off[ConstrainedMax::cmcons].

Examples

Basic Examples  (1)

One of the elements in the second argument is not an equation or inequality:

This shows valid input to ConstrainedMax:

After this error, the right-hand side of the expression may have been assigned a value:

The value assigned by mistake must be cleared before this input will behave as intended: