Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

slides_linearprogramming

Uploaded by

u22652150
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

slides_linearprogramming

Uploaded by

u22652150
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Linear programming: Examples

June 20, 2021

1/8
In linear programming problem, we try to find the best outcome of a function
that is a linear combination of the unknown variables with constraints that are
also linear in the unknown variables.

This is a linear function in x1 , x2 , ..., xN :

a1 · x1 + a2 · x2 + . . . + aN · xN (1)

The solution of the unknown variables should satisfy the constraints. An


equality constraint
x1 + x2 = 0 (2)
means that the unknown variables x1 + x2 must be equal to 0. An inequality
constraint
x1 ≥ 0 (3)
means that x1 should be larger than or equal to 0.

2/8
For a two variable problem, the feasible region has the following form for the
considered constraints:

2
4
x2 3
Feasible
region

x1
3/8
Find the maximum of the following function:

z = 3 · x1 + 2 · x2 (4)

subjected to

1 · x1 + 1 · x2 ≤ 15 (5)
4
· x1 + 1 · x2 ≤ 16 (6)
3
2 · x1 + 1 · x2 ≤ 20 (7)

(This is a high school maths problem that you can already solve).

4/8
The objective function we want to maximize:

z = 3 · x1 + 2 · x2 (8)

20
75
10 60
45
30
x2

0
15
0
−10 −15
−30
−20
0 5 10 15
x1

5/8
The different constraints are presented on separate graphs (a) - (c):

(a) (b)
20 20
x2 = 15 − x1 75 x2 = 16 − 4/3x1 75
10 60 10 60
45 45
30 30
x2

x2
0 0
15 15
0 0
−10 −15 −10 −15
−30 −30
−20 −20
0 5 10 15 0 5 10 15
x1 x1

(c) (d)
20 20
x2 = 20 − 2x1 75 x2 = (10 − 3 · x1 )/2 75
10 60 10
x2 = (20 − 3 · x1 )/2 60
x2 = (34 − 3 · x1 )/2
45 45
30 30
x2

x2
0 0
15 15
0 0
−10 −15 −10 −15
−30 −30
−20 −20
0 5 10 15 0 5 10 15
x1 x1

Three lines corresponding to distinct level sets of the objective function are
presented in (d).

6/8
The graphical solution of the linear programming problem:

10
x2 = 15 − x1 47.85
x2 = 16 − 4/3x1 45.30
x2 = 20 − 2x1
42.75
x2 = (34 − 3 · x1 )/2
8 40.20
37.65
x2

35.10
32.55
6 30.00
27.45
24.90
5 6 7 8 9 10
x1

Optimal variables:
x1∗ = 6 and x2∗ = 8 (9)
The function value corresponding to the optimal variables:

z ∗ = 34 (10)

7/8
We can easily do the same in Excel:

SUMPRODUCT is very useful.

8/8

You might also like