Error message examples
The constraint left-hand side is indexed by Ind. The «lhs» should evaluate to a single number since there is only one constraint and no constraint index was specified in NlpDefine. The non-linear optimizer does not automatically array abstract over extra dimensions in «lhs».
«Lhs» passed to the NlpDefine function is indexed and not scalar, but no constraint index is passed to the function. If there are more than one constraint, a constraint index must be passed, and «lhs», «rhs» and «sense» must be indexed by the constraint index.
This can also occur when you are indeed defining an optimization having a single constraint, but your model injects another index into the constraint, where you expect Analytica to array-abstract over that index, solving multiple optimization problems. The page on NlpDefine discusses in more detail how to configure your problem to array abstract.
If a non linear optimization problem has more than one constraint, then you should pass in a constraint index that indexes «lhs», «rhs» and «sense».
Else, lhs passed to the function must evaluate to a scalar.