Problem in Modelling if-else-end statements #1413
Replies: 1 comment
-
Runs without issues here. If you really have infeasibility issues I would suspect cplex to have a bug since the problem is trivial and even solved by YALMIPs internal bnb solver in the root node (find a presolve option in cplex and turn it off, very common reason for bugs. or even better, dump cplex and use gurobi/xpress/mosek instead) ` struct with fields:
|
Beta Was this translation helpful? Give feedback.
-
Dear prof.,

I am encountering difficulties while modeling with if-else-end statements. Here are the mathematical formulas I am working with:
Here is my code:
However, the results indicate that the model is infeasible. For debugging purposes, I have considered adding slack variables:
The model is feasible now, but I don't know why there must be slack variables to make the model feasible.
I would appreciate any assistance or guidance you can provide in resolving this issue. Thank you for your time and attention.
Beta Was this translation helpful? Give feedback.
All reactions