# PHPSimplex

## Optimizing resources with Linear Programming

### Transporting troops' problem

A military detachment consists of 50 engineers, 36 sappers, 22 special forces, and 120 private soldiers as support troop, must be transported to an important strategic position. In the base park there are 4 types of vehicles A, B, C, and D, for transport of troops. The number of people that each vehicle can transport is 10, 7, 6, and 9, as detailed in the following table:

 Engineers Sappers Special forces Private soldiers A 3 2 1 4 B 1 1 2 3 C 2 1 2 1 D 3 2 3 1

The fuel required for each vehicle until the destination point is estimated at 160, 80, 40, and 120 liters respectively. If we want to save fuel, how many vehicles of each type should be used to reduce consumption to a minimum?

Determining decision variables and expressing them algebraically. In this case:

• Xi: number of vehicles of i type

• X1: number of vehicles of A type
• X2: number of vehicles of B type
• X3: number of vehicles of C type
• X4: number of vehicles of D type

Determining the restrictions and expressing them as equations or inequalities in function of the decision variables. Such restrictions can be obteined from soldiers that must be transported:

• Engineers: 3·X1 + X2 + 2·X3 + 3·X4 ≥ 50
• Dynamiters: 2·X1 + X2 + X3 + 2·X4 ≥ 36
• Anti-guerrillas: X1 + 2·X2 + 2·X3 + 3·X4 ≥ 22
• Infants: 4·X1 + 3·X2 + X3 + X4 ≥ 120

Expressing all implicit conditions established by the origin of variables: negativeness, integer, only a few allowed values... In this case, the restrictions are the quantities of vehicles that can't be negatives and also an integer number:

• Xi ≥ 0
• Xi are integers

Determining objective function:

• Minimize Z = 160·X1 + 80·X2 + 40·X3 + 120·X4
X

PHPSimplex
Version 0.81