• Ingen resultater fundet

Static & Dynamic Optimization 42111 Introduction

N/A
N/A
Info
Hent
Protected

Academic year: 2022

Del "Static & Dynamic Optimization 42111 Introduction"

Copied!
89
0
0

Indlæser.... (se fuldtekst nu)

Hele teksten

(1)

Static & Dynamic Optimization 42111

Introduction

Richard Lusby

Department of Management Engineering Technical University of Denmark

(2)

(jg

Primary Contacts Static: Richard Lusby

I rmlu@dtu.dk, office: 424/033A Dynamic: Niels Kjølstad Poulsen

I nkpo@dtu.dk, office: 303b/016

(3)

Course Objective

(jg

Main Objective

To give a well-founded knowledge, both theoretical and practical, of static and dynamic optimization models for data-based decision making.

You will be able to formulate and solve operations research and technical-economic models, and to appreciate the interplay between optimization models and the real-life problems described by these.

My part of the course Static Optimization Non-Linear Programs

Theoretical properties, Formulations, Solution Methods

(4)

(jg

Main Objective

To give a well-founded knowledge, both theoretical and practical, of static and dynamic optimization models for data-based decision making.

You will be able to formulate and solve operations research and technical-economic models, and to appreciate the interplay between optimization models and the real-life problems described by these.

My part of the course Static Optimization Non-Linear Programs

Theoretical properties, Formulations, Solution Methods

(5)

Learning Objectives (1)

(jg

Analyze a given problem in order to formulate an optimization model Formulate and analyze models as these are met in static and

dynamic optimization.

Describe and explain the assumptions underlying models and computations

Analyze an optimization problem in order to identify an appropriate solution method

Understand and - using software - solve systems of equations for given optimization problems

Interpret the solutions from a given optimization model

(6)

(jg

Describe and explain the mathematical background for the applied solution methods.

Perform sensitivity analysis as part of the evaluating of what-if scenarios in decision making.

Make use of the possibilities for sensitivity analysis in standard optimization software.

(7)

Course Evaluation

(jg

Two written projects (one for static, one for dynamic) To be completed individually

If you collaborate with another student, this must be documented Your final mark will be based on the evaluation of the two projects Reports must be submitted electronically via CampusNet

Project one will be distributednext week

(8)

(jg

Components:

I Decision variables

I Objective function

I Constraints Model types:

I Linear Programming

I Integer Programming

I Nonlinear Programming Today’s Agenda:

I Linear programming review

I Non-linear programming intro

I Chapter 12 Hillier & Liberman 9th Edition

(9)

Linear Programming (1)

(jg

Example

The WYNDOR GLASS CO. produces high quality glass products, including windows and glass doors. It has 3 plants. Aluminium frames and hardware are made in Plant 1, wood frames are made in Plant 2, and Plant 3 produces the glass and assembles the products. Management is introducing the following two products to be sold in batches of 20:

Product 1: An 8-foot glass door with an aluminum frame (ppb = $3,000) Product 2: A 4×6 foot double hung wood-framed window (ppb = $5,000)

Data

Production Time Required (hrs)

Plant Product 1 Product 2 Hours avail.

1 1 0 4

2 0 2 12

(10)

(jg

maximize Z = 3x1 +5x2

subject to: x1 ≤4

2x2 ≤12 3x1 +2x2 ≤18

x1 ≥0

x2 ≥0

(11)

Linear Programming (2)

(jg

maximize Z = 3x1 +5x2

subject to: x1 ≤4

2x2 ≤12 3x1 +2x2 ≤18

x1 ≥0

x2 ≥0

(12)

(jg

maximize Z = 3x1 +5x2

subject to: x1 ≤4

2x2 ≤12 3x1 +2x2 ≤18

x1 ≥0

x2 ≥0

(13)

Linear Programming (2)

(jg

maximize Z = 3x1 +5x2

subject to: x1 ≤4

2x2 ≤12 3x1 +2x2 ≤18

x1 ≥0

x2 ≥0

(14)

(jg

maximize Z = 3x1 +5x2

subject to: x1 ≤4

2x2 ≤12 3x1 +2x2 ≤18

x1 ≥0

x2 ≥0

(15)

Linear Programming (2)

(jg

maximize Z = 3x1 +5x2

subject to: x1 ≤4

2x2 ≤12 3x1 +2x2 ≤18

x1 ≥0

x2 ≥0

(16)

(jg

maximize Z = 3x1 +5x2

subject to: x1 ≤4

2x2 ≤12 3x1 +2x2 ≤18

x1 ≥0

x2 ≥0

(17)

Linear Programming

Continued(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1

(18)

Continued(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1

(19)

Linear Programming

Continued(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1

(20)

Continued(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1 Z = 25

(21)

Linear Programming

Matrix Notation(jg

maximize cTx subject to: Ax ≤b

x ∈ X

(22)

Things you should already know (1)(jg

Consider the polyhedronX =Ax≤b A solutionx000 is feasible ifAx000≤b

A solutionx is optimalifAx ≤b,cTx ≥,cTx ∀x∈ X

The set of feasible solutions to an LP is termed the feasible region

I forms a (possiblyunbounded)convexset.

Anextreme point ofX cannot be written as a linear combination of other points inX

@λ∈(0,1) :x=λy+ (1−λ)z, x,y,z∈ X,x6=y,x6=z A solutionx000 is a basic feasible solutionifAx0 ≤b, ∃B :x0 =A−1B b or,x0 is a basic feasible solution if and only if x0 is an extreme point

(23)

Linear Programming

Things you should already know (2)(jg

Every linear program can be one of : infeasible,unbounded, or have aunique optimal solution value

Every linear program has an extreme point that is an optimal solution

A solution approach need only consider extreme points A constraint of a linear program isbindingat a pointx0 if the inequality is met with equality atx0. It isnonbinding/slackotherwise.

What is a dual variable?

If I have an unbounded polyhedron is my formulation unbounded?

Can an LP have multiple optimal solutions? What does this mean?

How do we solve linear programs?

(24)

Things you should already know (2)(jg

Every linear program can be one of : infeasible,unbounded, or have aunique optimal solution value

Every linear program has an extreme point that is an optimal solution

A solution approach need only consider extreme points A constraint of a linear program isbindingat a pointx0 if the inequality is met with equality atx0. It isnonbinding/slackotherwise.

What is a dual variable?

If I have an unbounded polyhedron is my formulation unbounded?

Can an LP have multiple optimal solutions? What does this mean?

How do we solve linear programs?

(25)

Solution Method

Simplex Algorithm(jg

(26)

Matrix Notation - Example(jg

maximize

"

3 5

#T "

x1 x2

#

subject to:

 1 0 3 2 0 2

"

x1

x2

#

 4 18 12

"

x1 x2

#

"

0 0

#

(27)

Non Linear Programming

Introduction(jg

maximize f(x)

subject to: gi(x) ≤bi ∀i x ≥0

(28)

(jg

Production: y

Price required to selly units: p(y) Total cost of producing y units: c(y) Profit:

π(y) =yp(y)−c(y)

hours needed in departmenti: ai(y) Formulation

maximize P

jπ(xj) subject to: P

jai(xj) ≤bi ∀i

xj ≥0 ∀j

(29)

Product-mix problem

(jg

Production: y

Price required to selly units: p(y) Total cost of producing y units: c(y) Profit:

π(y) =yp(y)−c(y)

hours needed in departmenti: ai(y) Formulation

maximize P

jπ(xj) subject to: P

jai(xj) ≤bi ∀i

xj ≥0 ∀j

(30)

(jg

Production: y

Price required to selly units: p(y) Total cost of producing y units: c(y) Profit:

π(y) =yp(y)−c(y)

hours needed in departmenti: ai(y) Formulation

maximize P

jπ(xj) subject to: P

jai(xj) ≤bi ∀i

xj ≥0 ∀j

(31)

Product-mix problem

(jg

Production: y

Price required to selly units: p(y) Total cost of producing y units: c(y) Profit:

π(y) =yp(y)−c(y)

hours needed in departmenti: ai(y) Formulation

maximize P

jπ(xj) subject to: P

jai(xj) ≤bi ∀i

xj ≥0 ∀j

(32)

(jg

Production: y

Price required to selly units: p(y) Total cost of producing y units: c(y) Profit:

π(y) =yp(y)−c(y)

hours needed in departmenti: ai(y) Formulation

maximize P

jπ(xj) subject to: P

jai(xj) ≤bi ∀i

xj ≥0 ∀j

(33)

Product-mix problem

(jg

Production: y

Price required to selly units: p(y) Total cost of producing y units: c(y) Profit:

π(y) =yp(y)−c(y)

hours needed in departmenti: ai(y) Formulation

maximize P

jπ(xj) subject to: P

jai(xj) ≤bi ∀i

xj ≥0 ∀j

(34)

(jg

Production: y

Price required to selly units: p(y) Total cost of producing y units: c(y) Profit:

π(y) =yp(y)−c(y)

hours needed in departmenti: ai(y) Formulation

maximize P

jπ(xj) subject to: P

jai(xj) ≤bi ∀i

xj ≥0 ∀j

(35)

Product-mix problem

(jg

Production: y

Price required to selly units: p(y) Total cost of producing y units: c(y) Profit:

π(y) =yp(y)−c(y)

hours needed in departmenti: ai(y) Formulation

maximize P

jπ(xj) subject to: P

jai(xj) ≤bi ∀i

xj ≥0 ∀j

(36)

(jg

Cost of shipping one extra unit: stair-case constant Cost of shipping y units: c(y), piecewise linear xij: The volume shipped from source i to destination j

Formulation

maximize P

i

P

jCij(xij)

subject to: P

jxij =si ∀i

P

ixij =dj ∀j

xj ≥0 ∀i,j

max. f(x), s.t. g(x)≥0 andh(x) =0

(37)

Transportation problem

(jg

Cost of shipping one extra unit: stair-case constant Cost of shipping y units: c(y), piecewise linear xij: The volume shipped from source i to destination j

Formulation

maximize P

i

P

jCij(xij)

subject to: P

jxij =si ∀i

P

ixij =dj ∀j

xj ≥0 ∀i,j

max. f(x), s.t. g(x)≥0 andh(x) =0

(38)

(jg

Cost of shipping one extra unit: stair-case constant Cost of shipping y units: c(y), piecewise linear xij: The volume shipped from source i to destination j

Formulation

maximize P

i

P

jCij(xij)

subject to: P

jxij =si ∀i

P

ixij =dj ∀j

xj ≥0 ∀i,j

max. f(x), s.t. g(x)≥0 andh(x) =0

(39)

Transportation problem

(jg

Cost of shipping one extra unit: stair-case constant Cost of shipping y units: c(y), piecewise linear xij: The volume shipped from source i to destination j

Formulation

maximize P

i

P

jCij(xij)

subject to: P

jxij =si ∀i

P

ixij =dj ∀j

xj ≥0 ∀i,j

max. f(x), s.t. g(x)≥0 andh(x) =0

(40)

(jg

Cost of shipping one extra unit: stair-case constant Cost of shipping y units: c(y), piecewise linear xij: The volume shipped from source i to destination j

Formulation

maximize P

i

P

jCij(xij)

subject to: P

jxij =si ∀i

P

ixij =dj ∀j

xj ≥0 ∀i,j

max. f(x), s.t. g(x)≥0 andh(x) =0

(41)

Transportation problem

(jg

Cost of shipping one extra unit: stair-case constant Cost of shipping y units: c(y), piecewise linear xij: The volume shipped from source i to destination j

Formulation

maximize P

i

P

jCij(xij)

subject to: P

jxij =si ∀i

P

ixij =dj ∀j

xj ≥0 ∀i,j

max. f(x), s.t. g(x)≥0 andh(x) =0

(42)

(jg

Share price of stockj: pj

Return on one share of stockj is a random variable with meanµj and varianceσjj

Covariance between stock returns of two stocksi and j: σij

Portfolio is to consist of xj shares of stock j ∀j Mean of portfolio return:

X

j

µjxj

Variance of portfolio return:

X

i

X

j

σijxixj

(43)

Portfolio Selection

(jg

Share price of stockj: pj

Return on one share of stockj is a random variable with meanµj and varianceσjj

Covariance between stock returns of two stocksi and j: σij

Portfolio is to consist of xj shares of stock j ∀j Mean of portfolio return:

X

j

µjxj

Variance of portfolio return:

X

i

X

j

σijxixj

(44)

(jg

Share price of stockj: pj

Return on one share of stockj is a random variable with meanµj and varianceσjj

Covariance between stock returns of two stocksi and j: σij

Portfolio is to consist of xj shares of stock j ∀j Mean of portfolio return:

X

j

µjxj

Variance of portfolio return:

X

i

X

j

σijxixj

(45)

Portfolio Selection

(jg

Share price of stockj: pj

Return on one share of stockj is a random variable with meanµj and varianceσjj

Covariance between stock returns of two stocksi and j: σij

Portfolio is to consist of xj shares of stock j ∀j Mean of portfolio return:

X

j

µjxj

Variance of portfolio return:

X

i

X

j

σijxixj

(46)

(jg

Share price of stockj: pj

Return on one share of stockj is a random variable with meanµj and varianceσjj

Covariance between stock returns of two stocksi and j: σij

Portfolio is to consist of xj shares of stock j ∀j Mean of portfolio return:

X

j

µjxj

Variance of portfolio return:

X

i

X

j

σijxixj

(47)

Portfolio Selection

(jg

Share price of stockj: pj

Return on one share of stockj is a random variable with meanµj and varianceσjj

Covariance between stock returns of two stocksi and j: σij

Portfolio is to consist of xj shares of stock j ∀j Mean of portfolio return:

X

j

µjxj

Variance of portfolio return:

X

i

X

j

σijxixj

(48)

Continued(jg

We usually want a high return with a low risk Minimum acceptable expected return: r Maximum budget available: b

Formulation

minimize P

i

P

jσijxixj subject to: P

jµjxj ≥r

P

jpjxj ≤b

Non-negativity constraints?

Parametric programming onr yields the efficient frontier

(49)

Portfolio Selection

Continued(jg

We usually want a high return with a low risk Minimum acceptable expected return: r Maximum budget available: b

Formulation

minimize P

i

P

jσijxixj subject to: P

jµjxj ≥r

P

jpjxj ≤b

Non-negativity constraints?

Parametric programming onr yields the efficient frontier

(50)

Continued(jg

We usually want a high return with a low risk Minimum acceptable expected return: r Maximum budget available: b

Formulation

minimize P

i

P

jσijxixj subject to: P

jµjxj ≥r

P

jpjxj ≤b

Non-negativity constraints?

Parametric programming onr yields the efficient frontier

(51)

Portfolio Selection

Continued(jg

We usually want a high return with a low risk Minimum acceptable expected return: r Maximum budget available: b

Formulation

minimize P

i

P

jσijxixj subject to: P

jµjxj ≥r

P

jpjxj ≤b

Non-negativity constraints?

Parametric programming onr yields the efficient frontier

(52)

Continued(jg

We usually want a high return with a low risk Minimum acceptable expected return: r Maximum budget available: b

Formulation

minimize P

i

P

jσijxixj subject to: P

jµjxj ≥r

P

jpjxj ≤b

Non-negativity constraints?

Parametric programming onr yields the efficient frontier

(53)

Portfolio Selection

Continued(jg

We usually want a high return with a low risk Minimum acceptable expected return: r Maximum budget available: b

Formulation

minimize P

i

P

jσijxixj subject to: P

jµjxj ≥r

P

jpjxj ≤b

Non-negativity constraints?

Parametric programming onr yields the efficient frontier

(54)

Continued(jg

We usually want a high return with a low risk Minimum acceptable expected return: r Maximum budget available: b

Formulation

minimize P

i

P

jσijxixj subject to: P

jµjxj ≥r

P

jpjxj ≤b

Non-negativity constraints?

Parametric programming onr yields the efficient frontier

(55)

Non-Linear Programming Example 1

Introduce a non-linear constraint(jg

maximize Z = 3x1 +5x2

subject to: x1 ≤4

9x12 +5x22 ≤216

x1 ≥0

x2 ≥0

(56)

(Figure 12.5)(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1 Z = 36 (2,6)

(57)

Graphical Illustration (2)

Figure 12.5 Key Points(jg

The optimal solution remains unchanged It is NOTa corner point of the feasible region

Depending on the objective function a corner point can be optimal Wecannot limit the search to just corner points

(58)

Figure 12.5 Key Points(jg

The optimal solution remains unchanged It is NOTa corner point of the feasible region

Depending on the objective function a corner point can be optimal Wecannot limit the search to just corner points

(59)

Graphical Illustration (2)

Figure 12.5 Key Points(jg

The optimal solution remains unchanged It is NOTa corner point of the feasible region

Depending on the objective function a corner point can be optimal Wecannot limit the search to just corner points

(60)

Figure 12.5 Key Points(jg

The optimal solution remains unchanged It is NOTa corner point of the feasible region

Depending on the objective function a corner point can be optimal Wecannot limit the search to just corner points

(61)

Graphical Illustration (2)

Figure 12.5 Key Points(jg

The optimal solution remains unchanged It is NOTa corner point of the feasible region

Depending on the objective function a corner point can be optimal Wecannot limit the search to just corner points

(62)

Introduce a non-linear objective function(jg

maximize Z = 126x1−9x12 +182x2−13x22

subject to: x1 ≤4

2x2 ≤12

3x1 +2x2 ≤18

x1 ≥0

x2 ≥0

(63)

Graphical Illustration (1)

(Figure 12.6)(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1 Z = 857 (83,5)

(64)

Figure 12.6 Key Points(jg

The optimal solution is also not a corner point

The locus of points withZ =36 intersects the feasible region at this point only

The locus of points with a largerZ value does not intersect the feasible region at all

(65)

Graphical Illustration (2)

Figure 12.6 Key Points(jg

The optimal solution is also not a corner point

The locus of points withZ =36 intersects the feasible region at this point only

The locus of points with a largerZ value does not intersect the feasible region at all

(66)

Figure 12.6 Key Points(jg

The optimal solution is also not a corner point

The locus of points withZ =36 intersects the feasible region at this point only

The locus of points with a largerZ value does not intersect the feasible region at all

(67)

Graphical Illustration (2)

Figure 12.6 Key Points(jg

The optimal solution is also not a corner point

The locus of points withZ =36 intersects the feasible region at this point only

The locus of points with a largerZ value does not intersect the feasible region at all

(68)

Introduce a non-linear objective function(jg

maximize Z = 54x1−9x12 +78x2−13x22

subject to: x1 ≤4

2x2 ≤12

3x1 +2x2 ≤18

x1 ≥0

x2 ≥0

(69)

Graphical Illustration (1)

(Figure 12.7)(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1

(70)

(Figure 12.7)(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1

Z= 117

(71)

Graphical Illustration (1)

(Figure 12.7)(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1

Z= 162 Z= 117

(72)

(Figure 12.7)(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1

Z= 189 Z= 162 Z= 117

(73)

Graphical Illustration (1)

(Figure 12.7)(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1

(3,3)

Z= 198 Z= 189 Z= 162 Z= 117

(74)

Figure 12.7 Key Points(jg

The optimal solution is aninteriorpoint of the feasible region Solution to the unconstrained global maximum

A general solution approach needs to considerall points

(75)

Graphical Illustration (2)

Figure 12.7 Key Points(jg

The optimal solution is aninteriorpoint of the feasible region Solution to the unconstrained global maximum

A general solution approach needs to considerall points

(76)

Figure 12.7 Key Points(jg

The optimal solution is aninteriorpoint of the feasible region Solution to the unconstrained global maximum

A general solution approach needs to considerall points

(77)

Graphical Illustration (2)

Figure 12.7 Key Points(jg

The optimal solution is aninteriorpoint of the feasible region Solution to the unconstrained global maximum

A general solution approach needs to considerall points

(78)

(jg

Convex Function Concave Function Convex Set

Pseudoconvex Function Quasiconvex Function Local Optimum Global Optimum

(79)

Convexity

(jg

Convex Function Concave Function Convex Set

Pseudoconvex Function Quasiconvex Function Local Optimum Global Optimum

(80)

(jg

Convex Function Concave Function Convex Set

Pseudoconvex Function Quasiconvex Function Local Optimum Global Optimum

(81)

Convexity

(jg

Convex Function Concave Function Convex Set

Pseudoconvex Function Quasiconvex Function Local Optimum Global Optimum

(82)

(jg

Convex Function Concave Function Convex Set

Pseudoconvex Function Quasiconvex Function Local Optimum Global Optimum

(83)

Convexity

(jg

Convex Function Concave Function Convex Set

Pseudoconvex Function Quasiconvex Function Local Optimum Global Optimum

(84)

(jg

Convex Function Concave Function Convex Set

Pseudoconvex Function Quasiconvex Function Local Optimum Global Optimum

(85)

Convexity

Continued(jg

Convex Programming Problem

maximize f(x)

subject to: gi(x) ≤bi ∀i x ≥0

f is concave, each gi is convex

→ a local maximum is also global

(86)

Non-convex feasible region(jg

maximize Z = 3x1 +5x2

subject to: x1 ≤4

8x1−x12 +14x2−x22 ≤49

x1 ≥0

x2 ≥0

(87)

Graphical Illustration (1)

(Figure 12.7)(jg

1 2 3 4 5 6 7 1

2 3 4 5 6 7

x2

x1 Z = 27 Z = 35

(4,3) (0,7)

(88)

(jg

Unconstrained Optimization

I No constraints

Linearly Constrained Optimization

I linear constraints Quadratic Programming

I quadratic objective function, linear constraints Convex Programming

I minimize a convex function on a convex set Separable Programming

I objective function and constraints are separable i.e. sum of functions of individual decision variables

(89)

Class Exercises

(jg

Problem 1

minimize (x1−255)2 +10(x1−220) +(x2−x1)2 +10(x2−240)

+(x3−x2)2 +10(x3−200) +(255−x3)2 subject to: x1≥220 x2≥240 x3≥200

Problem 2

maximize 36x1+9x12−6x13+36x2−3x23 subject to: x1+x2≤3,x1≥0,x2≥0

Referencer

RELATEREDE DOKUMENTER

For the present value of a signal and for local variables we consider each entry in the Re- source Matrix, if the present value of a variable or signal is read (R 0 ) we can use

Let’s consider the simplest case: Unconstrained optimization with just a single variable x, where the differentiable function to be maximized is concave. The necessary and

Theorem 5 : Consider the dynamic optimization problem of bringing the system (3.17) from the initial state to a terminal state such that the end point constraints in (3.19) is met

Recall [8] that (X, φ) is a Cantor minimal system if (X, d) is a compact, totally disconnected metric space with no isolated points and φ is a homeo- morphism of X such that every

In this paper we prove that X is an inner product space if and only if every three point subset of S X has a Chebyshev center in its convex hull.. We also give other

Protocol Correctness A protocol implementation is correct with respect to collision if the following two conditions are satisfied: (1) if the frame transmitted by a sender X

Copyright © 2008 Danish Technological Institute Page 16 of 20 Figure 8: Class diagram depicting the structure of each Concrete

A L´evy process {X t } t≥0 is a continuous-time stochastic process with independent, stationary increments: it represents the motion of a point whose successive dis- placements