# PHPSimplex

## Optimizing resources with Linear Programming

### Location problem

A company has the exclusive for distribution of a product in 4 populations. Potential demand has been determined in a market research, according to he shows up in the following board:

 Population 1 Population 2 Population 3 Population 4 3000 units 2000 units 2500 units 2700 units

Is knwon that the transport expenses are 0.02€ per Km and unit transported. The distance among towns is the shows in the board following:

 Population 1 Population 2 Population 3 Population 4 Population 1 - 25Km 35Km 40Km Population 2 25Km - 20Km 40Km Population 3 35Km 20Km - 30Km Population 4 40Km 40Km 30Km -

In order to cheap the transportation costs is decided to install in two of that 4 populations a store with capability for 6000 units. Determining in wich populations must install the stores.

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

• Xij: quantity sended from i store to j population
• Yi: store located at i population (0 points that there is not store, 1 yes)

Determining the restrictions and expressing them as equations or inequalities in function of the decision variables.

• The units that are sended to each population from each store, that must obey with the population demand:

• X11 + X21 + X31 + X41 ≥ 3000
• X12 + X22 + X32 + X42 ≥ 2000
• X13 + X23 + X33 + X43 ≥ 2500
• X14 + X24 + X34 + X44 ≥ 2700

• Only will be created two stores:

• Y1 + Y2 + Y3 + Y4 = 2

• The units quantity that can send each store must be less or equal to the capability of this one:

• X11 + X12 + X13 + X14 ≤ 6000·Y1
• X21 + X22 + X23 + X24 ≤ 6000·Y2
• X31 + X32 + X33 + X34 ≤ 6000·Y3
• X41 + X42 + X43 + X44 ≤ 6000·Y4

Expressing all implicit conditions established by the origin of variables: negativeness, integer, only a few allowed values... . In this case, the restrictions are that the delivered units from each store can't be negatives and also the variable determine that determine if a store is created or not must be boolean (0 isn't created, 1 yes):

• Xij ≥ 0
• Yi are boolean

Determining objective function:

• Minimize Z = 0.5·X12 + 0.7·X13 + 0.8·X14 + 0.5·X21 + 0.4·X23 + 0.8·X24 + 0.7·X31 + 0.4·X32 + 0.6·X34 + 0.8·X41 + 0.8·X42 + 0.6·X43

X

PHPSimplex
Version 0.81