Division by an OptimizationVariable not supported.
16 views (last 30 days)
I met a problem that in my equation, there is a part where includes a division of two optimization varaibles. For example, if i let
then my equation would be like: (1-yi)/sum(yi)
However, matlab says division of two optimization variable is not supported by optimization toolbox, while I don't think i can change the form of my equation. So I
'm wondering if it's possible to proceed.
Matt J on 27 Jul 2019
Edited: Matt J on 27 Jul 2019
The problem-based solver is largely limited to linear and (in R2019) quadratic programs. If you find yourself computing non-linear/non-quadratic OptimizationExpressions, it will typically mean that you have a more general optimization problem than that and must resort to another solver.
Or, you could try to reformulate your problem as a linear problem, but to know if that is possible, we would have to see the full problem, not just a single expression that occurs in it somewhere.