# PHPSimplex

## Optimizing resources with Linear Programming

### Stock exchange investment's problem

An investor has 50.000€ for invest in the followin 4 possibilities invertir: X Stock Exchange, Y Stock Exchange, X Bonds, and Y Bonds, for the period of a year. A peak of 10.500€ can be insvested in X bonds, and a peak of 10.000 € in Y bonds. Investment in the X Stock Exchange entails a considerable risk so is determined that a quarter of the total investment will not be inverted. The quantity invested in Y Stock Exchange must be at least three times the quantity invested in X Stock Exchange. Besides, the investor requires that bond investment be at least so much as half of investment in bags.Is estimated that the net yearly returns are the shows up in the following board:

 X Stock Exchange Y Stock Exchange X Bonds Y Bonds 20% 10% 9% 11%

Wich is the optimal way to accomplish the investmen to get the maximun profits?

Determining decision variables and expressing them algebraically:

• X1: investment in X Stock Exchange
• X2: investment in Y Stock Exchange
• X3: X Bond Investment
• X4: Y Bond Investment

Determining the restrictions and expressing them as equations or inequalities in function of the decision variables. Such restrictions can be obteined from the decisions taken by the investor on the way to invest and from maximum investment that can do:

• X1 + X2 + X3 + X4 ≤ 50000
• X1 ≤ 12500
• X3 ≤ 10500
• X4 ≤ 10000
• 3·X1 - X2 ≤ 0
• 0.5·X1 + 0.5·X2 - X3 - X4 ≤ 0

Expressing all implicit conditions established by the origin of variables: negativeness, integer, only a few allowed values... . In this case, the only restrictions is that the variables can't be negatives:

• Xi ≥ 0

Determining objective function:

• Maximize Z = 0.2·X1 + 0.1·X2 + 0.09·X3 + 0.11·X4
X

PHPSimplex
Version 0.81