Example Want to build the strongest army for the 3160 Empires. Resources we have:9366 wood,7173 food,2131 gold 9366717321310/200 Imperial Age2的包a口【Wc2 Soldiers we can produce: 80 food 60 food 80 wood 75 gold 50 gold Power:1 Power:2 Power:3 How to maximize the power of our army?
• Want to build the strongest army for the 3160 Empires. • Resources we have: 9366 wood, 7173 food, 2131 gold • Soldiers we can produce: • How to maximize the power of our army? Example 80 food Power: 1 80 wood 50 gold Power: 3 60 food 75 gold Power: 2
9366 7173 2131地0/200 Imperial Age Ba口 Linear Program 。Variables: 80 food 60 food 80 wood 75 gold 50 gold -X units Power:1 Power:2 Power:3 X,units -X3 units max X1+2X2+3X3 Constraints subject to 80X1+60X2≤7173 Food supply is 7173 75x2+50X3≤2131 Wood supply is 9366 80x3≤9366 Gold supply is 2131 X1+X2+X3≤200 Max population is 200 X1,X2,X3≥0 。Objective Maximize the power of the army
80 food Power: 1 80 wood 50 gold Power: 3 60 food 75 gold Power: 2 Linear Program max subject to x1 + 2x2 + 3x3 80x1 + 60x2 ≤ 7173 75x2 + 50x3 ≤ 2131 80x3 ≤ 9366 x1+x2+x3 ≤ 200 x1 , x2 , x3 ≥ 0 • Variables: – x1 units – x2 units – x3 units • Constraints – Food supply is 7173 – Wood supply is 9366 – Gold supply is 2131 – Max population is 200 • Objective – Maximize the power of the army