I'm playing a game and would like to leverage mathematics to use optimal resource utilization.
There are three troops I can build (ground, air, and horse). There are also three resources (wood, stone, and ore). The costs are
troop wood stone ore
G 400 200 100
A 100 400 200
H 200 100 400
I'm trying to determine how to make the best use of X wood, Y stone, and Z ore. As a current example, I've got 1320k wood, 436k stone, and 711k ore.
So far I've thrown together a spreadsheet.
The simplest method just says 'what's the most of each troop type I can currently build?' Right now, that's 2180 ground, 1090 air, or 1777 horse. So it seems that the 2180 ground would be the best option. But, I know if I can 2170 ground instead of 2180, I can squeeze in 20 horse, for a total of 2190.
I've been trying to tweek the numbers here, but there has to be some kind of mathematical model I can use. I can't be the first person to encounter this kind of resource problem. I just don't have the mathematical background (actually I bet I do, I just don't have the relevant practice...) to create a formula or model to solve the problem.
Is there a formula, model, principle, or at least further reading I can use to solve this resource problem? Is it perhaps not purely mathematical, in which case where should I be looking?