Service for Solving Linear Programming Problems

and other interesting typical problems
Ðóññêèé

Linear Programming Graphical Method Calculator

This is the first problem that is solved when studying linear programming.
This method allows solving the linear programming problem for the function of two variables.
The solution is accompanied by detailed comments and a large number of pictures.
You can solve your problem or see all possible solutions to this problem.
Enter integers or ordinary fractions. For example: 12, -3/4.
Find the     value of the function
F   =    x1 +    x2
subject to the constraints:
Çíàê ñèñòåìû  x1 +    x2      
 x1 +    x2      
 x1 +    x2      
 x1 +    x2      
 x1 +    x2      
x1 ≥ 0     x2 ≥ 0
Problem:
Find the maximum value of the function

F = 5 x1 + 9 x2

subject to the constraints:

Çíàê ñèñòåìû - x1 + 5 x2 3
5 x1 + 3 x2 27

x1 ≥ 0     x2 ≥ 0
Solution:

Points whose coordinates satisfy all the inequalities of the constraint system are called a region of feasible solutions.

It is necessary to solve each inequality of the constraint system to find the region of feasible solutions to this problem. (see step 1 - step 2)

The last two steps are necessary to get the answer.
(see step 3 - step 4)

This is a standard solution plan. If the region of feasible solutions is a point or an empty set then the solution will be shorter.

See the plan for solving this problem in pictures

By the condition of the problem: x1 ≥ 0     x2 ≥ 0.

Now we have the region of feasible solutions shown in the picture.

Step ¹1

Let's solve 1 inequality of the system of constraints.

- x1 + 5 x2  ≤  3

We need to plot a straight line: - x1 + 5 x2 = 3

Let x1 =0 => 5 x2 = 3 => x2 = 3/5

Let x2 =0 => - x1 = 3 => x1 = -3

Two points were found: (0, 3/5) and (-3 ,0)

Now we can plot the straight line (1) through the found two points.

Let's go back to the inequality.

- x1 + 5 x2  ≤  3

We need to transform the inequality so that only x2 is on the left side.

5 x2  ≤  x1 + 3

x2  ≤  1/5 x1 + 3/5

The inequality sign is  ≤
Therefore, we must consider points below the straight line (1).

Let's combine this result with the previous picture.
Now we have the region of feasible solutions shown in the picture.

Step ¹2

Let's solve 2 inequality of the system of constraints.

5 x1 + 3 x2  ≤  27

We need to plot a straight line: 5 x1 + 3 x2 = 27

Let x1 =0 => 3 x2 = 27 => x2 = 9

Let x2 =0 => 5 x1 = 27 => x1 = 27/5

Two points were found: (0, 9) and (27/5 ,0)

Now we can plot the straight line (2) through the found two points.

Let's go back to the inequality.

5 x1 + 3 x2  ≤  27

We need to transform the inequality so that only x2 is on the left side.

3 x2  ≤  - 5 x1 + 27

x2  ≤  - 5/3 x1 + 9

The inequality sign is  ≤
Therefore, we must consider points below the straight line (2).

Let's combine this result with the previous picture.
Now we have the region of feasible solutions shown in the picture.

Step ¹3

We need to plot the vector C = (5, 9), whose coordinates are the coefficients of the function F.

Step ¹4

We will move a "red" straight line perpendicular to vector C from the lower left corner to the upper right corner.

The "red" straight line is called the level line. At each point of the level line, the value of the function F is a constant value.

The function F has a minimum value at the point where the "red" straight line crosses the region of feasible solutions for the first time.

The function F has a maximum value at the point where the "red" straight line crosses the region of feasible solutions for the last time.

Function F has a maximum value at point A. (see picture)

Let's find the coordinates of point A.

Point A is on the straight line (1) and on the straight line (2) at the same time.

Çíàê ñèñòåìû - x1 + 5 x2 = 3   =>   x1 = 9/2
5 x1 + 3 x2 = 27 x2 = 3/2

Let's calculate the value of the function F at point A (9/2,3/2).

F (A) = 5 * 9/2 + 9 * 3/2 = 36

Result:

x1 = 9/2

x2 = 3/2

F max = 36

Comment: if there is any doubt that the function F has a maximum at point A, you should find the value of the function F at the point of interest and compare it to F (A).






© 2010-2024

If you have any comments, please write to siteReshmat@yandex.ru