Fit a boolean condition into the framework of Linear Programming

31 Views Asked by At

$a=k.B$, where $a$, $B$ (binary), $k$ all are scaler variables.

When $B=0$, $a=0$; and when $B=1$, $a=k$.

$B$ is binary, i.e., $0$ or $1$.

$k$ is $0$ or positive integer, i.e., $0, 1, 2, 3, 4...$

How to decompose it in Linear Programming so that two variables are not in multiplication format?

Is it even possible?


As the question is on hold and I got how to do it, I'm posting it here in the question itself. The link is given in the comment of this question by Erwin Kalvelagen.

$0 \le a \le k_{max}$

$a \le k_{max}.B$

$a \le k$

$a \ge k - k_{max}(1-B)$