Convert an IF statement in Mixed Integer Programming
Let $x_i$ represents the quantity bought from the $i$-th supplier, and
consider the following scenario: the price of the 2nd supplier is 170\$ per tonne but, if you buy at least 300 tonnes, then you get to choose a non-negative quantity $d \le x_2 - 300$ and you get a 20\$/tonne discount on $d$ tonnes, otherwise $d=0$ (i.e., you get no discount).
Clearly this is equivalent to your original problem since, given $x_1, \dots, x_3$, it is always convenient to maximize $d$.
You can model this as follows:
$$
\min 150x_1 + 170 x_2 + 170x_3 - 20d \quad \mbox{s.t.}\\[6pt]
\begin{align*}
x_1 &amp;\le 100 \\
x_2 &amp;\le 400 \\
x_3 &amp;\le 1600 \\
x_1 + x_2 + x_3 &amp;= 800 \\[6pt]
100 y &amp;&gt; x_2 - 300 &amp; (1)\\
300 y &amp;\le x_2 &amp;(2)\\[6pt]
d &amp;\le x_2 - 300y &amp;(3)\\
d &amp;\le 100y &amp;(4)\\[6pt]
x_1, x_2, x_3,d &amp;\ge 0 \\
y &amp;\in \{0,1\} 
\end{align*}
$$
Notice that $y$ is a binary variable that equals $1$ if and only if $x_2 \ge 300$. Indeed, if $x_2 \ge 300$ the constraint $(1)$ is satisfied only when $y=1$ (recall that $x_2 - 300$ is at most $100$), and the constraint $(2)$ simplifies to $300 \le x_2$, which is true. If $x &lt; 300$ then the constraint $(2)$ forces $y=0$ and the constraint $(1)$ simplifies to $0 \ge x_2 - 300$, which is true.
If $y=0$, then $d$ must be $0$, and this is enforced by constraint $(4)$ which becomes $d \le 0$ (recall that $d$ is non-negative), while $(3)$ is always satisfied. If $y=1$, then constraint $(3)$ enforces $d \le x_2 - 300$, which also implies constraint $(4)$ since $d \le x_2 - 300 \le 100 = 100y$.