In: Operations Management
The boxes in green, are decision variables
The boxes in blue are constrains
The boxes in orange is the objective function

The formulae:
| Dec var | Oil A | Oil B | Elec A | Elec B | Gov | Total | ||
| Amount in each | 20000 | 2.72848410531878E-12 | 30000 | 0 | 50000 | =SUM(B2:F2) | <= | 100000 |
| <= | <= | Total availability constraint | ||||||
| 20000 | 30000 | |||||||
| constraint 3 | constraint 4 | |||||||
| Total oil | Total Elec | Total Elec+Oil | ||||||
| =SUM(B2:C2) | <= | =SUM(D2:E2) | =SUM(B2:E2) | |||||
| <= | constraint 5 | <= | <= | |||||
| 30000 | 50000 | =F2 | ||||||
| constraint 1 | constraint 2 | constraint 6 | ||||||
| Return | 0.11 | 0.075 | 0.08 | 0.06 | 0.05 | |||
| Total return | =SUMPRODUCT(B2:F2,B11:F11) | |||||||
| Objective func | Maximization | |||||||
The solution:
| Dec var | Oil A | Oil B | Elec A | Elec B | Gov | Total | ||
| Amount in each | 20000 | 0 | 30000 | 0 | 50000 | 100000 | <= | 100000 |
| <= | <= | Total availability constraint | ||||||
| 20000 | 30000 | |||||||
| constraint 3 | constraint 4 | |||||||
| Total oil | Total Elec | Total Elec+Oil | ||||||
| 20000 | <= | 30000 | 50000 | |||||
| <= | constraint 5 | <= | <= | |||||
| 30000 | 50000 | 50000 | ||||||
| constraint 1 | constraint 2 | constraint 6 | ||||||
| Return | 11.0% | 7.5% | 8.0% | 6.0% | 5.0% | |||
| Total return | 7100 | |||||||
| Objective func | Maximization | |||||||