Conditional constraint if else in JuMP

Take a read of the first post in Please read: make it easier to help you - #11.

It’s easier to help if you do the following:

  • format your code using the triple backticks: ```
  • provide a minimal working example of what you are trying to accomplish.
    • Simplify it down to one constraint, and two or three variables. Remove any redundant information.
    • It may help to provide the math formulation of your simple problem as well.
  • What solver are you using? If you are trying to solve MPEC-type models, JuMP is a little behind compared to GAMS. You either have to do the reformulations manually, or using a solver like KNITRO.jl.
  • You could also use a mixed-integer reformulation.