Problem definition¶
Din Djarin is a retired bounty hunter that now runs a small factory specialised in making classic weapons in a colony recently restablished in Mandalore. The factory manufactures two different types of weapons, swords and spears. Din uses special alloys, mixtures of metals and rare materials, which have made a name for the endurance of his weapons across the colony. The table below shows the weight in pounds of each material needed to make each type of weapon:
Metal |
spear |
sword |
|---|---|---|
Beskar |
1 |
0.5 |
Tungsten |
1 |
1 |
Titanium |
3 |
1 |
And the table below shows the total amount of each metal available, also in pounds:
Metal |
Amount |
|---|---|
Beskar |
125 |
Tungsten |
225 |
Titanium |
300 |
The price of a spear is 40 credits and the price of a sword is 5 credits. Din has already sold 100 swords, so he needs to manufacture at least that many.
Write a CLP problem to find the optimal number of spades and swords that maximise revenues