NMinimize::bcons NMaximize::bcons
Details
-
- This message is generated when the indicated elements within the first argument of NMinimize or NMaximize do not have the indicated form.
- If the first argument in NMinimize or NMaximize is a list, the first element in that list is expected to be a numerical expression, and the remaining elements are expected to be constraints.
- Off[message] switches off the message; On[message] switches it on. For example: Off[NMinimize::bcons].
Examples
Basic Examples (2)
This message can be generated if the constraints are not given in a valid form:
NMinimize[{x ^ 2, Real[x]}, {x}]This message can also be generated if the function to minimize is not the first element in the first argument of NMinimize:
NMinimize[{x ≥ 1, x ^ 2}, {x}]This shows a correct use of NMinimize with a constraint:
NMinimize[{x ^ 2, x ≥ 3}, {x}]