• 沒有找到結果。

Optimization Method

N/A
N/A
Protected

Academic year: 2022

Share "Optimization Method"

Copied!
41
0
0

加載中.... (立即查看全文)

全文

(1)

Optimization Method

Xi Chen

Department of Management Science and Engineering International Business School

Beijing Foreign Studies University

(2)

1 General Procedure

2 Modeling

3 Solution Approach Linear Programming

Sensitivity Analysis Duality Theory Commercial Softwares

Integer Programming Dynamic Programming Game Theory

4 LATEX

(3)

Problem Description Modeling

Solution Approach

Computational Experiments and Analysis

(4)

1 General Procedure

2 Modeling

3 Solution Approach Linear Programming

Sensitivity Analysis Duality Theory Commercial Softwares

Integer Programming Dynamic Programming Game Theory

4 LATEX

(5)

Example 1

Giapetto’s Woodcarving, Inc., manufactures two types of wooden toys:

soldiers and trains. Demand for trains is unlimited, but at most 40 soldiers are bought each week.

A soldier sells for $27 and uses $10 worth of raw materials. Each soldier that is manufactured increases Giapetto’s variable labor and overhead costs by $14. A train sells for $21 and uses $9 worth of raw materials. Each train built increases Giapetto’s variable labor and overhead costs by $10.

The manufacture of wooden soldiers and trains requires two types of skilled labor: carpentry and finishing. A soldier requires 2 hours of finishing labor and 1 hour of carpentry labor. A train requires 1 hour of finishing and 1 hour of carpentry labor. Each week, Giapetto can obtain all the needed raw material but only 100 finishing hours and 80 carpentry hours.

How to maximize Giapetto’s weekly profit?

(6)

Decision Variables: The decision variables completely describe the decisions to be made. Denote by x1 the number of soldiers produced each week, and by x2 the number of trains produced each week.

Objective Function: The function to be maximized or minimized is called the objective function. Since fixed costs (such as rent and insurance) do not depend on the values of x1 and x2, Giapetto can concentrate on maximizing his weekly profit, i.e.,

max 3x1+ 2x2. Constraints:

1 Each week, no more than 100 hours of finishing time may be used.

2 Each week, no more than 80 hours of carpentry time may be used.

3 Because of limited demand, at most 40 soldiers should be produced each week.

2x1+ x2≤ 100, x1+ x2≤ 80, x1≤ 40.

Sign Restrictions: x1 ≥ 0 and x2≥ 0.

(7)

1 General Procedure

2 Modeling

3 Solution Approach Linear Programming

Sensitivity Analysis Duality Theory Commercial Softwares

Integer Programming Dynamic Programming Game Theory

4 LATEX

(8)

Linear Programming (LP) Integer Programming (IP) Dynamic Programming (DP) Game Theory

(9)

1 General Procedure

2 Modeling

3 Solution Approach Linear Programming

Sensitivity Analysis Duality Theory Commercial Softwares

Integer Programming Dynamic Programming Game Theory

4 LATEX

(10)

Simplex Method:

The Big M Method

The Two-Phase Simplex Method

Sensitivity Analysis Duality

(11)

The Graphical Solution

(12)

The simplex algorithm proceeds as follows:

Step 1 Convert the LP to standard form.

Step 2 Obtain a bfs (if possible) from the standard form.

Step 3 Determine whether the current bfs is optimal.

Step 4 If the current bfs is not optimal, then determine which nonbasic variable should become a basic variable and which basic variable should become a nonbasic variable to find a new bfs with a better objective function value.

Step 5 Use EROs to find the new bfs with the better objective function value. Go back to step 3.

(13)

Example 2

The Dakota Furniture Company manufactures desks, tables, and chairs.

The manufacture of each type of furniture requires lumber and two types of skilled labor: finishing and carpentry. The amount of each resource needed to make each type of furniture is given in the following table.

Currently, 48 board feet of lumber, 20 finishing hours, and 8 carpentry hours are available. A desk sells for $60, a table for $30, and a chair for

$20. Dakota believes that demand for desks and chairs is unlimited, but at most five tables can be sold. Because the available resources have already been purchased, Dakota wants to maximize total revenue.

(14)

Define the decision variables as x1 the number of desks produced, x2 the number of tables produced, and x3 the number of chairs produced.

max 60x1+ 30x2+ 20x3

s.t. 8x1+ 6x2+ x3≤ 48 (Lumber constraint) 4x1+ 2x2+ 1.5x3 ≤ 20 (Finishing constraint) 2x1+ 1.5x2+ 0.5x3 ≤ 8 (Carpentry constraint) x2 ≤ 5 (Limitation on table demand) x1, x2, x3≥ 0

BV = {z, s1, s2, s3, s4} and NBV = {x1, x2, x3}.

(15)

Is the Current Basic Feasible Solution Optimal?

If we solve for z by rearranging row 0, then we obtain z = 60x1+ 30x2+ 20x3.

Because a unit increase in x1 causes the largest rate of increase in z, we choose to increase x1 from its current value of zero (the entering variable). Observe that x1 has the most negative coefficient in row 0.

How large we can make x1? s1 ≥ 0 for x1 ≤ 48

8 = 6, s2 ≥ 0 for x1≤ 20 4 = 5, s3 ≥ 0 for x1 ≤ 8

2 = 4, s4≥ 0 for all values of x1. Therefore, we have

x1= min{6, 5, 4} = 4.

(16)

Definition 3.1 (The Ratio Test)

When entering a variable into the basis, compute the ratio for every constraint in which the entering variable has a positive coefficient. The constraint with the smallest ratio is called the winner of the ratio test.

The smallest ratio is the largest value of the entering variable that will keep all the current basic variables nonnegative.

To make x1 a basic variable in row 3, we use EROs to make x1 have a coefficient of 1 in row 3 and a coefficient of 0 in all other rows. The final result is that x1 replaces s3 as the basic variable for row 3 (pivoting, pivot row, pivot term). Now BV = {z, s1, s2, x1, s4} and NBV = {s3, x2, x3}.

(17)

Definition 3.2

The procedure used to go from one bfs to a better adjacent bfs is called an iteration (or sometimes, a pivot) of the simplex algorithm.

We now try to find a bfs that has a still larger z-value by examining canonical form 1,

z = 240 − 15x2+ 5x3− 30s3. After one more iteration, we reach

BV = {z, s1, x3, x1, s4} and NBV = {s2, s3, x2}.

(18)

If we rearrange row 000 and solve for z, we obtain z = 280 − 5x2− 10s2− 10s3.

Our current bfs from canonical form 2 is an optimal solution.

Step 1 Convert the LP to standard form.

Step 2 Find a bfs. This is easy if all the constraints are ≤ with

nonnegative right-hand sides as the slack variable si may be used as the basic variable for row i . If no bfs is readily apparent, then use the techniques to be discussed in later sections.

Step 3 If all nonbasic variables have nonnegative coefficients in row 0, then the current bfs is optimal. If any variables in row 0 have negative coefficients, then choose the variable with the most negative coefficient in row 0 to enter the basis.

Step 4 Use EROs to make the entering variable the basic variable in any row that wins the ratio test (ties may be broken arbitrarily). After the EROs have been used to create a new canonical form, return to step 3, using the current canonical form.

(19)

A Graphical Introduction to Sensitivity Analysis

Definition 3.3

Sensitivity analysis is concerned with how changes in an LP’s parameters affect the optimal solution.

Reconsider the Giapetto problem:

max 3x1+ 2x2 s.t. 2x1+ x2≤ 100,

x1+ x2≤ 80, x1 ≤ 40, x1, x2≥ 0.

The optimal solution is z = 180, x1 = 20, x2 = 60. How would changes in the problem’s objective function coefficients or right-hand sides change this optimal solution?

(20)

Let c1 be the contribution to profit by each soldier. For what values of c1

does the current basis remain optimal?

If a change in c1 causes the isoprofit lines to be flatter than the carpentry constraint, then the optimal solution will change from the current optimal solution (point B) to a new optimal solution (point A).

(21)

Definition 3.4

Associated with any LP is another LP, called the dual. When taking the dual of a given LP, we refer to the given LP as the primal.

A normal max problem may be written as max c1x1+ c2x2+ . . . + cnxn

s.t.

a11x1 + a12x2 + . . . + a1nxn ≤ b1

a21x1 + a22x2 + . . . + a2nxn ≤ b2

. . . .

am1x1 + am2x2 + . . . + amnxn ≤ bm

, xj ≥ 0 (1)

The dual of a normal max problem (normal min problem) is defined to be min b1y1+ b2y2+ . . . + bmym

s.t.

a11y1 + a21y2 + . . . + am1ym ≥ c1 a12y1 + a22y2 + . . . + am2ym ≥ c2

. . . .

a1ny1 + a2ny2 + . . . + amnym ≥ cn

, yi ≥ 0 (2)

(22)

The Dual Simplex Method (max)

Suppose the initial simplex tableau is dual feasible.

Step 1 Is the right-hand side of each constraint nonnegative? If so, an optimal solution has been found; if not, at least one constraint has a negative right-hand side, and we go to step 2.

Step 2 Choose the most negative basic variable as the variable to leave the basis. The row in which the variable is basic will be the pivot row. To select the variable that enters the basis, we compute the following ratio for each variable xj that has a negative coefficient in the pivot row, and choose the one with the smallest ratio (absolute value):

Coefficient of xj in row 0 Coefficient of xj in pivot row.

Step 3 If there is any constraint in which the right-hand side is negative and each variable has a nonnegative coefficient, then the LP has no feasible solution. If no constraint indicating infeasibility is found, return to step 1.

(23)

Changing a Right-Hand Side

If the rhs of a constraint is changed and the current basis becomes infeasible, the dual simplex can be used to find the new optimal solution.

Suppose that 30 finishing hours are now available.

(24)

Matlab Cplex Gurobi

Lingo or Lindo . . .

(25)

1 General Procedure

2 Modeling

3 Solution Approach Linear Programming

Sensitivity Analysis Duality Theory Commercial Softwares

Integer Programming Dynamic Programming Game Theory

4 LATEX

(26)

Definition 3.5

An integer programming problem (IP) is an LP in which some or all of the variables are required to be non-negative integers, i.e., the Divisibility Assumption in LP does not hold.

A pure integer programming problem max 3x1+ 2x2

s.t. x1+ x2≤ 6 x1, x2≥ 0, x1, x2 integer.

A mixed integer programming problem max 3x1+ 2x2

s.t. x1+ x2 ≤ 6, x1, x2 ≥ 0, x1 integer.

A 0-1 integer programming problem max x1− x2

s.t. x1+ 2x2 ≤ 2, 2x1− x2 ≤ 1, x1, x2 = 0 or 1.

(27)

If you solve the LP relaxation of a pure IP and obtain a solution in which all variables are integers, then the optimal solution to the LP relaxation is also the optimal solution to the IP.

Example 3

The Telfa Corporation manufactures tables and chairs. A table requires 1 hour of labor and 9 square board feet of wood, and a chair requires 1 hour of labor and 5 square board feet of wood. Currently, 6 hours of labor and 45 square board feet of wood are available. Each table contributes $8 to profit, and each chair contributes $5 to profit.

Formulate and solve an IP to maximize Telfa’s profit.

max 8x1+ 5x2

s.t. x1+ x2 ≤ 6 (Labor constraint)

9x1+ 5x2≤ 45 (Wood constraint), x1, x2 ≥ 0, x1, x2 integer.

(28)
(29)

The key aspects of the branch-and-bound method for solving pure IPs may be summarized as follows:

Step 1 If it is unnecessary to branch on a subproblem, then it is fathomed.

The following three situations result in a subproblem being fathomed:

(1) The subproblem is infeasible;

(2) the subproblem yields an optimal solution in which all variables have integer values; and

(3) the optimal z-value for the subproblem does not exceed (in a max problem) the current LB.

Step 2 A subproblem may be eliminated from consideration in the following situations:

(1) The subproblem is infeasible (in the Telfa problem, subproblem 4 was eliminated for this reason);

(2) the LB (representing the z-value of the best candidate to date) is at least as large as the z-value for the subproblem (in the Telfa problem, subproblems 3 and 7 were eliminated for this reason).

(30)

1 General Procedure

2 Modeling

3 Solution Approach Linear Programming

Sensitivity Analysis Duality Theory Commercial Softwares

Integer Programming Dynamic Programming Game Theory

4 LATEX

(31)

Figure: Technician Routing Problem with Experience-based Service Times

(32)

Technician Routing Problem with Experience-based Service Times (TRP-EST)

Technicians have varying levels of experience across the tasks.

The experience depends on the number of times the technician has performed the task.

The more experienced a technician is, the less time he/she needs to complete the task.

The objective is to minimize the expected sum of the completion time of the last task for each day.

(33)

Modeling the Problem as a Markov Decision Process

Decision epochs correspond to days

States correspond to experience levels of technicians on tasks Actions correspond to a feasible set of routes that satisfy following constraints:

P

i ∈Ct∪{0}

P

k∈Kxijtk = 1 ∀j ∈ Ct, (3) P

j ∈Ct∪{Ct+1}x0jtk = 1 ∀k ∈ K, (4) P

i ∈Ct∪{0}xi (Ck

t+1)t = 1 ∀k ∈ K, (5)

P

j ∈Ct∪{0}xjitk −P

j ∈Ct∪{Ct+1}xijtk = 0 ∀i ∈ Ct, ∀k ∈ K, (6) Bj ≥ Bi+P

k∈K(P

r ∈Rzirditk+ τij)xijtk ∀i ∈ Ct∪ {0},

∀j ∈ Ct, (7)

xitk ∈ {0, 1} ∀i ∈ Ct, ∀k ∈ K, (8) Bi ≥ 0 ∀i ∈ C ∪ {0, Ct+ 1}.(9)

(34)

Modeling the Problem as a Markov Decision Process

Exogenous information corresponds to today’s customer requests.

Transition function: qkr ,t+1(st, at) = qrtk +P

i ∈Ct:r (i )=rxitk Contribution function: c(st, at) = emaxt ∀at ∈ At(st) Objective function: minπ∈ΠE

hPT

t=1C (st, δtπ(st)) i Bellman’s equation:

V (st) = min

at∈At(st){c(st, at) + E [V (st+1) | st, at]}.

(35)

Solution Approach: Approximate Dynamic Programming

Approximate the value functions:

Lookup tables Parametric models Nonparametric models

(36)

1 General Procedure

2 Modeling

3 Solution Approach Linear Programming

Sensitivity Analysis Duality Theory Commercial Softwares

Integer Programming Dynamic Programming Game Theory

4 LATEX

(37)

Stackelberg Leadership Model

Players: Leader and follower.

Objective: Find the subgame perfect Nash equilibrium or equilibria (SPNE)

Backward induction:

1 The leader considers what the best response of the follower is, i.e. how it will respond once it has observed the quantity of the leader.

2 The leader then picks a quantity that maximises its payoff, anticipating the predicted response of the follower.

3 The follower actually observes this and in equilibrium picks the expected quantity as a response.

(38)

Stackelberg Leadership Model

The profit of firm 2 (the follower) is revenue minus cost:

Π2 = P(q1+ q2) · q2− C2(q2) (10) To maximize Π2, set

∂Π2

∂q2

= 0 (11)

(39)

Stackelberg leadership model

The profit of firm 1 (the leader) is revenue minus cost:

Π1 = P(q1+ q2) · q1− C1(q1) (12) To maximize Π1, set

∂Π1

∂q1

= 0 (13)

(40)

TEX

1 General Procedure

2 Modeling

3 Solution Approach Linear Programming

Sensitivity Analysis Duality Theory Commercial Softwares

Integer Programming Dynamic Programming Game Theory

4 LATEX

(41)

TEX

LATEX: A document preparation system TeXShop: For IOS

CTEX: TEX with Chinese

參考文獻

相關文件

If x or F is a vector, then the condition number is defined in a similar way using norms and it measures the maximum relative change, which is attained for some, but not all

Quadratically convergent sequences generally converge much more quickly thank those that converge only linearly.

denote the successive intervals produced by the bisection algorithm... denote the successive intervals produced by the

Students are asked to collect information (including materials from books, pamphlet from Environmental Protection Department...etc.) of the possible effects of pollution on our

Structured programming 14 , if used properly, results in programs that are easy to write, understand, modify, and debug.... Steps of Developing A

In Activity 6, students are required to decide whether Model D should be sold during the Lunar New Year Fair. Students should note that only future variable costs and

this: a Sub-type reference variable pointing to the object itself super: a Base-type reference variable pointing to the object itself. same reference value, different type

/** Class invariant: A Person always has a date of birth, and if the Person has a date of death, then the date of death is equal to or later than the date of birth. To be