Artificial intelligent assistant

Linearization of product of three variables Let $h=xyz$, where $x,y \in \\{0,1\\}$ and $z \in [0,T]$ with $T>0$ being a constant. Is there any method that can linearize $h=xyz$? For example, if $h=xy$ the method in here can be used to linearize this.

We want to model $h=xyz$, where $x,y \in \\{0,1\\}$ and $z \in [0,T]$ with $T>0$ being a constant. We first linearize $xy$ in the same way as described in the link you posted. To do so, we introduce a new variable $w$ along with the following constraints:

$$w \leq x$$ $$w \leq y$$ $$w \geq x+y-1$$ $$ 0 \leq w \leq 1$$ All that is left now is to model $h=wz$. Since $z$ is upper bounded by $T$ and lower bounded by 0 we can do this in the following way:

$$h\leq T w$$ $$h \leq z$$ $$h \geq z - (1-w)T$$ $$h \geq 0$$.

So, if either $x$ or $y$ is zero, it will follow from the first two and the fourth constraint that $w = 0$. From constraint 5 and 8 it will then follow that $h=0$.

If, however $x=y=1$, constraints 1 to 3 will force $w=1$. Constraints 6 and 7 will then force $h=z$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy cde27b5745f65303953e537bac668726