Skip to main content
edited tags
Link
RobPratt
  • 34.3k
  • 2
  • 47
  • 90
Source Link

How to deal with a decision variable in the objective function that depends on if-else conditions involving other decision variables?

I'm modeling an optimization problem in which a decision variable $x_1$ in the objective function depends on if-else conditions involving decision variables $x_2$ and $x_3$, as the following equation, where $a$, $b$, $c$, and $d$ are constants. I know a possibility would be using binary variables, but I'm not sure how to do it. Could someone help me? \begin{equation} x_1 = \begin{cases} a, & \text{if } x_2 \geq c \ \text{and} \ x_3 \geq d\\ b \cdot x_3, & \text{if } x_2 \geq c \ \text{and} \ 0 \leq x_3 \leq d\\ 0, & \text{otherwise} \end{cases} \end{equation}