Artificial intelligent assistant

How can I linearize this IF-THEN constraint? Let, $m=1,2,\cdots,M$ $b_{m}$ is a binary variable $c_{m}$ is a continuous variable I have an IF-THEN constraint like this IF $a_{m}=1$, THEN $f_{m}> 0$ IF $a_{m}=0$, THEN $f_{m}=0$

A similar approach as in this answer can be used. Let $K$ be a sufficiently large constant. Then add constraints:

$$\begin{align} f_{m,n} & \le Ka_{m,n} \\\ f_{m,n} & \ge 0.2\sum_{l=1}^M f_{l,n} - K(1-a_{m,n}) \end{align}$$

(Note that I changed the summation index to $l$ since $m$ is already used in the constraint. I am also using "big-$K$" instead of "big-$M$" since $M$ means something else in your model.)

So: If $a_{m,n}=0$, then $f_{m,n}$ must equal $0$ by the first constraint (and the second constraint has no effect). If $a_{m,n}=1$, then the second constraint prevails, and the first constraint has no effect.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 2719c5809dc01a4508f20dad538a7f06