Making Weapons

Problem Definition

Din Djarin is a retired bounty hunter that now runs a small factory specialised in making classic weapons in a colony recently re-established 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 spade 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.

Find the optimal number of spades and swords that maximise revenues

Model

The objective is to maximise the revenues obtained with the sales of both types of weapons. The objective function can be modeled as:

\(\max z = 40x_{1} + 5x_{2}\)

where z represents the objective variable (profits) and the decision variables are:

  • \(x_{1}\): units of spears

  • \(x_{2}\): units of swords

Let us for now consider that they are real and non-negative.

The objective function is subject to the following constraints:

Metal availability constraints:

\(x_{1} + 0.5x_{2} \leq 125\)

\(x_{1} + x_{2} \leq 225\)

\(3x_{1} + x_{2} \leq 300\)

And the demand on swords:

\(x_{2} \geq 100\)