0% found this document useful (0 votes)
10 views

1. Linear programming, first examples - filled

Uploaded by

Abhay Dhiman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

1. Linear programming, first examples - filled

Uploaded by

Abhay Dhiman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

MATH308 D100, Spring 2016

1. Linear programming, first examples


(based on notes from Dr. J. Hales)

Ladislav Stacho

SFU Burnaby

1 / 10
Linear Programming
What is it? What is it for?

What programming?. . .
LP—introduced in 1950’s
surprisingly not directly related to computer programming
‘programming’ was a military term for strategic planning
‘linear’—feasible plans are restricted by linear constraints (inequalities) and also
quality of the plan is measured by a linear function
solving problems in industry (minimizing cost, maximizing production), in theory
(network-flows)
programming in sense of LP—development of e↵ective algorithms for solving
problems

So what is it?
modelling the problem—choosing variables, determining constraints, choosing
function to optimize
solving the linear program
interpreting the solution

2 / 10
Informal definition
Linear Programming is a collection of procedures for maximizing or minimizing linear - .

functions subject to given linear constraints.


- - -

Why not calculus?


the
First example
·
it only tells a solution is on
boundary
Maximize the value f (x, y ) = x + y subject to constraints

FIIKEE
(1) x > 0
(2) y > 0 y
(3) y x 6 1
(4) x + 6y 6 15
(5) 4x y 6 10

(3)y -
x 1
=
(4) x+
6y
15
6y
x+
10 [(c)
=

I
ll
10,17
(15,0)
( 1,0)
-

10
(5) 4x -

y
=

(0, 10)
-

x
(E,0) I

3 / 10
objective function f(x) = x +
y

=
- set to
any
number and plot
x +
y
y

EvEEEr
(9/7, 16/7)
(3, 2)

(0, 1)

A
(0, 0) (5/2, 0) x

4 / 10
Real world example (TB, Example 1, p. 5)
An appliance company manufactures heaters and air conditioners. The production of one
heater requires 2 hours in the parts division and 1 hour in the assembly division; the
production of one air conditioner requires 1 hour in the parts division and 2 hours in the
assembly division. The parts division is operated for at most 8 hours per day and the
assembly division is operated for at most 10 hours per day. Sale profits are $30 per
heater and $50 per air conditioner. How many heaters and air conditioners should the
company manufacture per day so as to maximize the profits?
# of aircond

FEEFFOe-was
x2 x...
# of heaters X...

maximize f(x,,xx) 30x, =


+ TOXz

PD: 2x, + X218

AD: x, + 2x2 =10

x,, Xc
>
O (integers)

maximized at
30x, + 50xc

(4,0)
x1
Rint:HoOT woodwood
for a
profit of $260, 5 / 10
3D example
Maximize function f (x, y , z) = x 2y z subject to constraints
(1) 3x + 4y + 12 5
z 6 12
(2) 2y + 4z 6 8 2y + 4z 8
=

(3) x, y , z > 0
(0,0,2)

extHOtE
R

(0,4,0)

For
t
·

Fall i

6 / 10
:
P X0
=

z0
=

7 / 10
objective f. x
-2y-z>
max.

k
· a
plane x-2y-z =

want
·sliding the plane, we

while
to maximizek
insides with
staying
(x,y,z).
we must maximize X
S
·

n and minimize
y, z

H

(4,0,0) r


will be attained
Maximum

at (4,0,0)
8 / 10
Geometric example
Given four points A = (0, 0), B = (4, 0), C = (2, 3), and D = (0, 2) in the plane. Find
the largest circular disk that fits in the quadrangle ABCD.
its centre
variables:Disk determined by
x2 radius ty
T =
(t, tc) and

maximize
objectivef: ft., tct) =ts ->

(2, 3)
line ` : ax1 + bx2 + c = 0
point T = (t1 , t2 )
point-line distance formula:
(0, 2)

-...
|at1 + bt2 + c|
d(T , `) = p x t3
a2 + b 2

(0, 0)

we first
t
constraint
(4, 0)
x1

T. Then we use
↑ to constraint the

to be inside the polygon.


radius of disk not to be too
large
9 / 10
(X,.x) (1 5)(0,2) 5(2,3)
->parametric
+
-

x2

3
x 1 22 x. /2
33
=

2Xz 4 0 2X,+4
=

X, 0
X,
-
+ =
-
=

X2
2 5X i
+

2 x,/2
+

es/
= =

(2, 3) line ` : ax1 + bx2 + c = 0


point T = (t1 , t2 )
point-line distance formula:
(0, 2) t3
|at1 + bt2 + c|
t2 d(T , `) = p
T
l =3x, 2xz + - 12 0
=
a2 + b 2
ly:
X 0
,
=

(4, 0)
(0, 0) t1 x1
l,:Xz 0 =

(1)
-
radius cannot
be negative
constraints:tg> 0

I be inside
t,,t,30(2)(3) point must

t, -

2tz 44,0(9)
+
the
of
quadrangle
3t, 2tc +
-
12 0(5) -

the circle
cannot
radius of

d(T,ei),t, (i=1 ..4) (6-5) -

exceed the four distances

d(5,e.),d(T.D), d(T,3),d(T,2,)
10 / 10
linear constraint
|at, st c)>Vbts not
-

+
+

#
r+5 ty
j
at, btn cs to two linear
equivalent
+

is
+

cs(5'ts constraints
-

at, -

btc -

Maximize f(t,t,, ts) tg =

subject to

·t,,tz,ty>0

4 =0
t 2tz
-
-
+

= 0
·

It, 2tc +
- 12

dinear constraints based on (6-9) above


·
six

11.

You might also like