The Two-Widget Problem

<< Graphics`FilledPlot`

p1 = 
      FilledPlot[{(1200 - 6  x)/3}, {x, 0, 200}, 
        Fills -> {{{1, Axis}, Hue[ .15]}}]

p2 = 
      FilledPlot[{(1000 - 3  x)/4}, {x, 0, 1000/3}, 
        Fills -> {{{1, Axis}, Hue[ .5]}}]

p3 = 
      FilledPlot[{(1200 - 6  x)/3}, {x, 120, 200}, 
        Fills -> {{{1, Axis}, Hue[ .4]}}]

p4 = 
      FilledPlot[{(1000 - 3  x)/4}, {x, 0, 120}, 
        Fills -> {{{1, Axis}, Hue[ .4]}}]

Show[{p1, p2, p3, p4}, 
      PlotRange -> {{-100, 1000/3}, {-100, 400}}]

g[z_] := g[z] = 
          Plot[2 (z - 2  x)/3, {x, -100, 1000/3}, 
            PlotRange -> {{-100, 1000/3}, {-100, 400}}, 
            DisplayFunction -> Identity];

\(boo[z_] := 
      Show[{p1, p2, p3, p4, g[z]}, DisplayFunction -> $DisplayFunction, 
        PlotRange -> {{\(-100\), 1000/3}, {\(-100\), 400}}, 
        PlotLabel -> 
          StringForm[\*""``=2\!\(x\_1\)+1.5\!\(x\_2\)"", z]]\)

boo[100]

boo[200]

boo[400]

boo[500]

Table[boo[z], {z, 0, 600, 10}];

Maximize[{2  x + 1.5  y, 3  x + 4  y ≤ 1000, 
        6  x + 3  y ≤ 1200, x ≥ 0, 
        y ≥ 0}, {x, y}]

The Three-Widget Problem

Maximize[{2  x + 1.5  y + 1.75  z, 
        3  x + 4  y + 6  z ≤ 1000, 
        6  x + 3  y + 2  z ≤ 1200, x ≥ 0, 
        y ≥ 0, z ≥ 0}, {x, y, z}]