6
$\begingroup$

Given a continuous nonnegative decision variable $x\in [0,T]$ bounded by $T$, how can we enforce a relation between $x$ and another binary decision variable $y$ such that when $x$ is equal to its upper bound ($T$), $y$ must be one and otherwise $y$ must zero?

$\endgroup$

1 Answer 1

7
$\begingroup$

Let $\epsilon > 0$ be a small constant tolerance. The following linear constraints enforce $y=0 \implies 0 \le x \le T-\epsilon$ and $y=1 \implies x=T$: $$0(1-y) + Ty \le x \le (T-\epsilon)(1-y) + Ty$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.