Sei sulla pagina 1di 9

Notes

Slides adopted from Prof. Gesualdo Scutari (SP 2016)

Lecture 4: Part I: (Continuing) Graphical solution


method for two-variable optimization problems
IE 335: Operations Research - Optimization

Instructor: Professor Chris Quinn

August 28, 2016

Notes

Announcements

Midterm 1: Tuesday Oct. 18 from 6:30-7:30pm in CL50 rm 224


If you have a conflict for the midterm, but did not receive an email, email
me.

Notes

Review
Steps to building an optimization problem
1

Determine the decision variables.

Write the objective function (and goal) in terms of the decision


variables.

Write the constraints in terms of the decision variables:


I
I

Main constraints
Variable-type constraints

An optimization problem looks like this:


minimize or maximize
subject to

(objective function)
(main constraints)
(variable-type constraints)

A bit of terminology: feasible set, feasible point, etc.


3

Notes

Outcomes of optimization problems

An optimization model can:


I

have a unique optimal solution, or

have multiple optimal solutions, or

be infeasible, or

be unbounded

Notes

Review
Graphical solution method for two-variable optimization models
I

Gives helpful intuition on properties and solution methods for


optimization models

For two-variable cases, with x1 and x2 , we need the third


dimension to plot function values f (x1 , x2 ). This can be
challenging to plot well. An alternative is to depict value using
contours, like those depicting altitude on maps.

Notes

Drawing contour lines of the objective function


Optimal solution: (2,2)
max

(1

x2

)
(3

s.t.

3x1 + 5x2
2x1 + 3x2 10
(1)
x1 + 3x2 8 (2)
x1 + x2 5 (3)
x1

(5)
3

4 (4)
x2 3 (5)

x1

(2)

(4)

0 (6)
x2 0 (7)

x1

3x1 + 5x2 = 16

3x1 + 5x2 = 14

3x1 + 5x2 = 12

3x1 + 5x2 = 10

3x1 + 5x2 = 8

3x1 + 5x2 = 6

3x1 + 5x2 = 4

3x1 + 5x2 = 2

3x1 + 5x2 = 0

Notes

What happens if...


Multiple optimal solutions
x2

(1

2x1 + 3x2 10
(1)

(2)

x1 + 3x2 8 (2)
x1 + x2 5 (3)

(4)

s.t.

2x1 + 3x2

(3

max

(5)
3

4 (4)

x1

x2 3 (5)

0 (6)

x1

x2 0 (7)

x1

5
2x1 + 3x2 = 10

2x1 + 3x2 = 8

2x1 + 3x2 = 6

2x1 + 3x2 = 4

2x1 + 3x2 = 2

2x1 + 3x2 = 0

Notes

What happens if...


(3

x2
(4)

No feasible solutions!
5

Feasible region:
(1

2x1 + 3x2 10

(1)

x1 + 3x2 8

(2)

x1 + x2 5

(3)

(4)

x2 3

(5)

(6)

x2 0

(7)

x1
x1

(2)

3
(5)
2

x1

Notes

What about this case?


max
s.t.

3x1 + x2
x1 + x2 1

(1)

(2)

(1
)

x2
3

x1 2x2 4 (2)
0

(3)

x2 0

(4)

x1

2
1

x1

3x1 + x2 = 18

3x1 + x2 = 16

3x1 + x2 = 14

3x1 + x2 = 12

3x1 + x2 = 10

3x1 + x2 = 8

3x1 + x2 = 6

3x1 + x2 = 4

The problem is
unbounded from
above.

3x1 + x2 = 2

3x1 + x2 = 0

The contour lines grow


to infinity!

Notes

What happens if we change the objective function?

s.t. x1 + x2 1

(1)

(2)

(1
)

x2
max 3x1 x2
3

x1 2x2 4 (2)
x1

(3)

x2 0

(4)

2
1

x1

3x1 x2 = 18

3x1 x2 = 16

3x1 x2 = 14

3x1 x2 = 12

3x1 x2 = 10

3x1 x2 = 8

3x1 x2 = 6

3x1 x2 = 4

3x1 x2 = 2

The problem has a


unique optimal solution.

3x1 x2 = 0

The contour lines grow


to zero.

10

Notes

Outcomes of optimization problems

An optimization model can:


I

have a unique optimal solution, or

have multiple optimal solutions, or

be infeasible, or

be unbounded

11

Notes

Relating contour maps to 3D objects


Linear functions define hyperplanes (lines in 2D, planes in 3D, hyperplanes in nD)

Top view

Optimal solution: (2,2)


)

(2)

x2

)
(3

(1

(4)
(5)

Side view

x1

3x1 + 5x2 = 16

3x1 + 5x2 = 14

3x1 + 5x2 = 12

3x1 + 5x2 = 10

3x1 + 5x2 = 8

3x1 + 5x2 = 6

3x1 + 5x2 = 4

3x1 + 5x2 = 2

3x1 + 5x2 = 0

(code on blackboard)

12

Notes

Integer and mixed-integer problems


Optimal solution: (2,2)

(2)

(4)

x2

(3

What happens if variables


are not integers? Feasible
region looks different.

(1

(5)
3

Have to be careful with


integer and mixed integer
cases. The optimal solution
is not always next to
where it would be if all
variables were continuous.

x1

3x1 + 5x2 = 16
13

Notes

Integer and mixed-integer problems


Optimal solution: (2,2)
(1

(2)

x2

)
(3

What happens if variables


are not integers? Feasible
region looks different.

(4)
(5)

x1
3x1 + 5x2 = 16

Have to be careful with


integer and mixed integer
cases. The optimal solution
is not always next to
where it would be if all
variables were continuous.

14

Notes

Graphical solution of nonlinear optimization problems


Your turn

min

(x1 2)2 + (x2 1)2

s.t.

x1 0
x2 0
x21 x2 1 0
x1 R, x2 R

Plot the feasible set.


Recall that x21 x2 1 = 0 is a parabola in the (x1 , x2 ) plane.
Plot the contour curves of the objective functions.
Recall that (x1 2)2 + (x2 1)2 = k 2 is a circle in the (x1 , x2 )
plane, centered in (2,1) and having radius equal to k.
The optimal solution is at the intersection between the smallest
contour curve and the feasible set.
15

Notes

Warm up
(3)

k=4

x2
3

k=2

min

(x1 2) + (x2 1)

x1 0

s.t.

k=1

x2 0

x21 x2 1 0
x1 R, x2 R
3

x1

Optimal solution at
(1, 0) with value 2.

3
16

Notes

Your Turn ...


Consider the following optimization
problem. Note that c1 and c2 are
unspecified.
[A]

min c1 x1 + c2 x2

x1 + x2 1

(1)

2x1 + x2 9

(2)

x1 x2 1

(3)

x2 3

(4)

(4)

(3

d
f

(1

x2

(2)

s.t.

Feasible region of [A]:

x1

x1 0, x2 0
Suppose [A] has a unique optimal solution. Which points could it be,
if any?

Suppose e is an optimal solution to [A]. Which other points must also


be optimal, if any?

Suppose f and h are both optimal solutions to [A]. Which other


points must also be optimal, if any?

17

Notes

Potrebbero piacerti anche