If Wenzhou ships to Wencheng X, Wenzhou ships to Taishun 12-X, Hangzhou ships to Wencheng 8-X, and Hangzhou ships to Taishun X-2 (because the total number of units is18) x > =0, 12-X & gt; =0,8-X & gt; =0,X-2 & gt; =0,
30X+40(8-X)+50( 12-X)+80(X-2)& lt; =840,x < =4,
X & gt=0,12-x > =0,8-X & gt; =0,X-2 & gt; =0,X & gt=2
So the values of x are 2, 3 and 4.