الشريحة 1

advertisement

Introduction to linear programming:-

- Linear programming (LP) applies to optimization models in which the objective and constraints functions are strictly linear.

- The technique is used in a wide range of applications including agriculture, industry, economics and the military.

Two variables LP model :-

- We will deal with the graphical solution of a two variable LP.

- The LP model, as in any OR model, has three basic components:

A)Decision variables [ what we seek to determine].

B)Objective Function(goal) [ what we aim to optimize ].

C)Constraints [ what we need to satisfy].

Example:-

Sadoline produce both interior and exterior paints from two raw materials, M1 and M2, the following table provides the basic data of the problem:-

Tons of row material per one

Exterior paint

Interior paint

6 4

Maximum daily a availability ton

24 Raw material M1

Raw material M2

Profit per tan

(Ro 1000)

1

5

2

4

6

- A market survey indicates that daily demand for interior pain can not exceed that of exterior paint by more than 1 ton.

- Also, the maximum daily demand of interior paint is 2 tans.

- Sadoline want to determined the optimum (best) product mix of interior and exterior paints that maximizes the total daily profit.

( Max z = 5 x1 + 4 x2 )

Solution:-

-The variables of the model are defined as:-

X1 =tons produced of exterior paint.

X2 =tons produced of interior.

- The objective of company is expressed as:

Maximize z = 5 x1 + 4 x2 where z represent the total daily profit in thousands of Omani Rial.

- M1 and M2 are limited to 24 and 6 tons this gives:-

6 x1 + 4 x2 ≤ 24 , x1 + 2 x2 ≤ 6

-The different between the daily production of interior and exterior paints x2 – x1 does not exceed 1 ton which translates to x2 – x1 ≤ 1.

-The maximum daily demand of interior paint is limited to 2 tons which translates to x2 ≤ 2.

-The non negativity restrictions x1 ≥ 0 , x2 ≥ 0

The complete sadoline model is:

Maximize z = 5 x1 + 4 x2

Subject to 6 x1 + 4 x2 ≤ 24 x1 + 2 x2 ≤ 6

-x1 + x2 ≤ 1 x2 ≤ 2 x1 , x2 ≥ 0

- Graphical LP solution :-

The graphical procedure includes two steps :-

A) Determination of the solution space that defines all feasible solution of the model.

B) Determination of the optimum solution from among all the feasible points in the solution space.

- Determination of the feasible solution space.

A) We account for the non negativity constraints x1 ≥ 0 and x2 ≥ 0.

B) To account the remaining constrains :-

- Replace each inequality with an equation and then graph the resulting straight line by locating two distinct points on it.

- Consider the effect of the inequality by choose any reference point if it satisfies the inequality, then the side in which it lies is the feasible half-space, else the other side is.

Example:To solve solidane model

The horizontal axis x1 and the vertical axis x2 as shown in the following figure.

Account the remaining four constraints, for example replace

6x1 + 4x2 ≤ 24 with 6 x1 + 4 x2 = 24 two distinct point can be determine by setting x1 = 0 to obtain x2 = 24/4 = 6 and then setting x2 = 0 to obtain x2 =24/6 = 4 so we get the points (0,6) and (4,0) as shown in the figure.

- Use the reference point(0,0) with the constraint 6 x1 + 4 x2 ≤ 24,

6 * 0 + 4 * 0 = 0 is less than 24, the half-space representing the inequality includes the origin as shown in the figure.

Constraints

1) 6 x1 + 4 x2 ≤ 24

2) x1 + 2 x2 ≤ 6

3) –x1 + x2 ≤ 1

4) x2 ≤ 2

5) x1 ≥ 0

6) x2 ≥ 0

Maximize z=5x1 +4 x2

A=(0,0) => z= 5*0 + 4*0 = 0

B= (4,0) => z= 5*4+ 4*0= 20

C= (3,1.5)_ => z=5*3 + 4*1.5= 21

D= (2,2) => z=5*2 + 4*2= 18

E= (1,2) =>z=5*1 + 4*2=13

F= (0,1) =>z=5*0 + 4*1=4

1) 6x1 + 4x2 =24

2) x1 +x2 = 6 x1 = 6 – 2 x2

6(6-2x2) + 4 x2 = 24

36 – 12 x2 + 4 x2 = 24

8 x2 = 36 – 24

X2 = 12/7

= 3/2

=1.5

X1 = 6 – 2 * 1.5

= 6 – 3

= 3

Determination of the optimum solution:-

- The optimum solution occurs at corner point of the solution space where two lines intersect.

Example:-

The optimum solution occurs at C , the value of x1 and x2 are determined by solving the equations associated with lines (1) and (2) that is 6 x1 + 4 x2 = 24 x1 + 2 x2 = 6

The solution is x1 = 3 and x2 = 1.5

With z = 5 * 3 + 4 * 1.5 = 21.

Examples for Graphical Solution:

1)Determine the feasible space for each of the following constraints?

A)-3x1 + x2 <= 6

B) –x1+x2 >= 0

Jack is an aspiring freshman, like to play more than study. Jack wants to divide his available time which about 10 hours between work and play. He estimate that play is twice pleasure as much as fun as work.

He also wants to study at least as much he plays. But he realizes that he cannot play more than 4 hours a day. How should Jack allocate his time to maximize his pleasure?

- Solution of minimization model: same as maximization models.

Example:- ( Diet problem)

Barka farms uses at least 800 kilo of special feed daily. The special feed is a mixture of corn and soybean meal with the following compositions:

Kilo per kilo of feed stuff

Feed stuff corn soybean protein

0.09

0.60

fiber

0.02

0.06

Cost

(RO/kilo)

0.30

0.90

- The feed requirements at least 30% protein and at most

5% fiber.

- Barka farms wishes to determine the daily minimum cost feed mix.

Solution :-

- The decision variables: x1 = kilo of corn in the daily mix. x2 = kilo of soybean meal in the daily mix.

- The objective function: minimize z=0.3x1 + 0.9 x2.

- The constraints:

• Barka farm need at least 800 kilo of feed: x1 + x2 ≥ 800.

• The protein requirement: 0.09 x1 + 0.6 x2 ≥ 0.3(x1+x2).

• The fiber requirement: 0.02x1+0.06x2≤0.05(x1+x2).

- The complete model thus becomes: minimize z= 0.3x1 + 0.9x2

subject to: x1 +x2 ≥ 800

0.21 x1 – 0.3 x2 ≤ 0

0.03 x1 – 0.01 x2 ≥0 x1, x2 ≥0

Minimize z = 0.3 x1 + 0.9 x2

1) x1 + x2 =800 x1 = 0 , x2 = 800 , (0,800) x2 = 0 , x1 = 800 , (800,0)

2) 0.21 x1 – 0.3x2 = 0 x1 =0 , x2 = 0 , (0,0) x1 = 500 , 0.21 * 500 – 0.3 x2 = 0 x2 = 0.2 * 500/0.3 = 350 , (500,350)

3) 0.03 x1 – 0.01 x2 = 0 x1 = 0 , x2 = 0 , (0,0) x1 = 200 , x2 = 0.03 * 200 /0.01 =600 , (200,600)

- The following provided the graphical solution of the model.

- The optimum solution is the intersection of two lines x1 + x2 = 800 and 0.21 x1 – 0.3x2 =0 which yields x1

= 470.6 kilo and x2= 329.4 kilo.

- The associated minimum cost of the feed mix is z= 0.3 * 470.6 + 0.9 * 329. 4 = 437.64 Per day

Download