I am trying to perform an optimization using Pyomo but I am struggling to define a constraint for a problem like this:
if Variable 1 > Parameter
Variable 2 = Variable 1 - Parameter
else skip constraint (?)
if Parameter > Variable 1
Variable 3 = Variable 4 -(Parameter - Variable 1)
else skip constraint (?)
Does this work somehow? About the skip constraint: I am not quite sure if that is even necessary.
Basically, I just want to express the relations between the Variables and the Parameters.
I have seen something similar here (Mixed integer programming: variable assignment per condition (if then else)) but I am not able to adjust it to my problem.
Thanks in advance!