1. Trang chủ >
  2. Kinh Tế - Quản Lý >
  3. Tiêu chuẩn - Qui chuẩn >

Appendix 6.1 Excel Solution of Transportation, Assignment, and Transshipment Problems

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (24.99 MB, 1,043 trang )


WWW.YAZDANPRESS.COM

WWW.YAZDANPRESS.COM

Appendix 6.1



309



Excel Solution of Transportation, Assignment, and Transshipment Problems



FIGURE 6.22 EXCEL SOLUTION OF THE FOSTER GENERATORS PROBLEM

A



WEB file

Foster



1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22



B



C



D



E



F



G



H



Foster Generators

Origin

Cleveland

Bedford

York

Demand



Boston

3

7

2

6000



Destination

Chicago

St. Louis

2

7

5

2

5

4

4000

2000



Lexington

6

3

5

1500



Supply

5000

6000

2500



Model

Min Cost



Origin

Cleveland

Bedford

York

Total



Boston

3500

0

2500

6000

=

6000



39500

Destination

Chicago

St. Louis

1500

0

2500

2000

0

0

4000

2000

=

=

4000

2000



Lexington

0

1500

0

1500



Total

5000

6000

2500



<=

<=

<=



5000

6000

2500



=

1500



objective function is the total transportation cost; the left-hand sides are the number of units

shipped from each origin and the number of units shipped into each destination; and the

right-hand sides are the origin supplies and the destination demands.

The formulation and solution of the Foster Generators problem are shown in Figure 6.22.

The data are in the top portion of the worksheet. The model appears in the bottom portion of

the worksheet; the key elements are screened.



Formulation

The data and descriptive labels are contained in cells A1:F8. The transportation costs are in

cells B5:E7. The origin supplies are in cells F5:F7, and the destination demands are in cells

B8:E8. The key elements of the model required by the Excel Solver are the decision variables, the objective function, the constraint left-hand sides, and the constraint right-hand

sides. These cells are screened in the bottom portion of the worksheet.

Decision Variables



Objective Function



Left-Hand Sides



Cells B17:E19 are reserved for the decision variables. The optimal values are shown to be x11 ϭ 3500, x12 ϭ 1500, x22 ϭ 2500,

x23 ϭ 2000, x24 ϭ 1500, and x41 ϭ 2500. All other decision variables equal zero, indicating nothing will be shipped over the corresponding routes.

The formulaϭSUMPRODUCT(B5:E7,B17:E19) has been placed

into cell C13 to compute the cost of the solution. The minimum cost

solution is shown to have a value of $39,500.

Cells F17:F19 contain the left-hand sides for the supply constraints, and cells B20:E20 contain the left-hand sides for the demand constraints.

Cell F17 ϭ SUM(B17:E17) (Copy to F18:F19)

Cell B20 ϭ SUM(B17:B19) (Copy to C20:E20)



WWW.YAZDANPRESS.COM

WWW.YAZDANPRESS.COM

310



Chapter 6



Distribution and Network Models



FIGURE 6.23 SOLVER PARAMETERS DIALOG BOX FOR THE FOSTER

GENERATORS PROBLEM



Right-Hand Sides



Cells H17:H19 contain the right-hand sides for the supply constraints and Cells B22:E22 contain the right-hand sides for the

demand constraints.

Cell H17 ϭ F5 (Copy to H18:H19)

Cell B22 ϭ B8 (Copy to C22:E22)



Excel Solution

The solution shown in Figure 6.22 can be obtained by selecting Solver from the Analysis

group under the Data tab, entering the proper values into the Solver Parameters dialog

box, selecting the Make Unconstrained Variables Non-Negative checkbox, and selecting

Simplex LP from the Select a Solving Method drop-down box. Then click Solve. The information entered into the Solver Parameters dialog box is shown in Figure 6.23.



WWW.YAZDANPRESS.COM

WWW.YAZDANPRESS.COM

Appendix 6.1



Excel Solution of Transportation, Assignment, and Transshipment Problems



311



FIGURE 6.24 EXCEL SOLUTION OF THE FOWLE MARKETING RESEARCH PROBLEM

A



WEB file

Fowle



1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21



B



C



D



E



F



G



Fowle Marketing Research

Project Leader

Terry

Carle

McClymonds



10

9

6



Client

2

15

18

14



Min Time



26



1



3

9

5

3



Model



Project Leader

Terry

Carle

McClymonds

Total



Client

2



1

0

0

1

1

=



=

1



Total



3

1

0

0

1



0

1

0

1



1

1

1



<=

<=

<=



1

1

1



=

1



1



ASSIGNMENT PROBLEM

The first step is to enter the data for the assignment costs in the top portion of the worksheet. Even though the assignment model is a special case of the transportation model, it is

not necessary to enter values for origin supplies and destination demands because they are

always equal to one.

The linear programming model is developed in the bottom portion of the worksheet. As

with all linear programs the model has four key elements: the decision variables, the objective function, the constraint left-hand sides, and the constraint right-hand sides. For an

assignment problem, the decision variables indicate whether an agent is assigned to a task

(with a 1 for yes or 0 for no); the objective function is the total cost of all assignments; the

constraint left-hand sides are the number of tasks that are assigned to each agent and the

number of agents that are assigned to each task; and the right-hand sides are the number of

tasks each agent can handle (1) and the number of agents each task requires (1). The worksheet formulation and solution for the Fowle Marketing Research Problem are shown in

Figure 6.24.



Formulation

The data and descriptive labels are contained in cells A1:D7. Note that we have not inserted

supply and demand values because they are always equal to 1 in an assignment problem.

The model appears in the bottom portion of the worksheet with the key elements screened.



WWW.YAZDANPRESS.COM

WWW.YAZDANPRESS.COM

312



Chapter 6



Distribution and Network Models



Decision Variables



Objective Function



Left-Hand Sides



Right-Hand Sides



Cells B16:D18 are reserved for the decision variables. The optimal values are shown to be x12 ϭ 1, x23 ϭ 1, and x31 ϭ 1 with all

other variables ϭ 0.

The formula ϭSUMPRODUCT(B5:D7,B16:D18) has been

placed into cell C12 to compute the number of days required to

complete all the jobs. The minimum time solution has a value of

26 days.

Cells E16:E18 contain the left-hand sides of the constraints for

the number of clients each project leader can handle. Cells

B19:D19 contain the left-hand sides of the constraints requiring

that each client must be assigned a project leader.

Cell E16 ϭ SUM(B16:D16) (Copy to E17:E18)

Cell B19 ϭ SUM(B16:B18) (Copy to C19:D19)

Cells G16:G18 contain the right-hand sides for the project leader

constraints and cells B21:D21 contain the right-hand sides for the

client constraints. All right-hand side cell values are 1.



FIGURE 6.25 SOLVER PARAMETERS DIALOG BOX FOR THE FOWLE MARKETING

RESEARCH PROBLEM



WWW.YAZDANPRESS.COM

WWW.YAZDANPRESS.COM

Appendix 6.1



313



Excel Solution of Transportation, Assignment, and Transshipment Problems



Excel Solution

The solution shown in Figure 6.24 can be obtained by selecting Solver from the Analysis

group under the Data tab, entering the proper values into the Solver Parameters dialog

box, selecting the Make Unconstrained Variables Non-Negative checkbox, and selecting

Simplex LP from the Select a Solving Method drop-down box. Then click Solve. The information entered into the Solver Parameters dialog box is shown in Figure 6.25.



TRANSSHIPMENT PROBLEM

The worksheet model we present for the transshipment problem can be used for all the network flow problems (transportation, assignment, and transshipment) in this chapter. We organize the worksheet into two sections: an arc section and a node section. Let us illustrate by

showing the worksheet formulation and solution of the Ryan Electronics transshipment problem. Refer to Figure 6.26 as we describe the steps involved. The key elements are screened.



Formulation

The arc section uses cells A3:D16. For each arc, the start node and end node are identified

in cells A5:B16. The arc costs are identified in cells C5:C16, and cells D5:D16 are reserved

for the values of the decision variables (the amount shipped over the arcs).

The node section uses cells F5:K14. Each of the nodes is identified in cells F7:F14. The

following formulas are entered into cells G7:H14 to represent the flow out and the flow in

for each node:

Units shipped in:



ϭD5ϩD7

ϭD6ϩD8

ϭD9ϩD13

ϭD10ϩD14

ϭD11ϩD15

ϭD12ϩD16



Cell G9

Cell G10

Cell G11

Cell G12

Cell G13

Cell G14



FIGURE 6.26 EXCEL SOLUTION FOR THE RYAN ELECTRONICS PROBLEM

A



WEB



file



Ryan



1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18



B



C



D



E



F



G



H



I



J



K



<=

<=

=

=

=

=

=

=



Supply

600

400

0

0

-200

-150

-350

-300



Ryan Electronics Transshipment

Arc

Units

Start Node End Node

Cost Shipped

Denver

Kansas City

2

550

Denver

Louisville

3

50

Atlanta

Kansas City

3

0

Atlanta

Louisville

1

400

Kansas City Detroit

2

200

Kansas City Miami

6

0

Kansas City Dallas

3

350

Kansas City New Orleans 6

0

Louisville

Detroit

4

0

Louisville

Miami

4

150

Louisville

Dallas

6

0

Louisville

New Orleans 5

300



Node

Denver

Atlanta

Kansas City

Louisville

Detroit

Miami

Dallas

New Orleans



Units Shipped

Net

In

Out Shipments

600

600

400

400

550

550

0

450

450

0

200

-200

150

-150

350

-350

300

-300



Total Cost



5200



WWW.YAZDANPRESS.COM

WWW.YAZDANPRESS.COM

314



Chapter 6



Distribution and Network Models



Units shipped out:



Cell H7

Cell H8

Cell H9

Cell H10



ϭSUM(D5:D6)

ϭSUM(D7:D8)

ϭSUM(D9:D12)

ϭSUM(D13:D16)



The net shipments in cells I7:I14 are the flows out minus the flows in for each node. For

supply nodes, the flow out will exceed the flow in, resulting in positive net shipments. For

demand nodes, the flow out will be less than the flow in, resulting in negative net shipments. The “net” supply appears in cells K7:K14. Note that the net supply is negative for

demand nodes.

As in previous worksheet formulations, we screened the key elements required by the

Excel Solver.



FIGURE 6.27 SOLVER PARAMETERS DIALOG BOX FOR THE RYAN

ELECTRONICS PROBLEM



WWW.YAZDANPRESS.COM

WWW.YAZDANPRESS.COM

Appendix 6.1



Excel Solution of Transportation, Assignment, and Transshipment Problems



Decision Variables

Objective Function



Left-Hand Sides



Right-Hand Sides



315



Cells D5:D16 are reserved for the decision variables. The optimal number of units to ship over each arc is shown.

The formula ϭSUMPRODUCT(C5:C16,D5:D16) is placed into

cell I18 to show the total cost associated with the solution. As

shown, the minimum total cost is $5200.

The left-hand sides of the constraints represent the net

shipments for each node. Cells I7:I14 are reserved for these

constraints.

Cell I7 ϭ H7-G7 (Copy to I8:I14)

The right-hand sides of the constraints represent the supply at

each node. Cells K7:K14 are reserved for these values. (Note the

negative supply at the four demand nodes.)



Excel Solution

The solution can be obtained by selecting Solver from the Analysis group under the Data

tab, entering the proper values into the Solver Parameters dialog box, selecting the Make

Unconstrained Variables Non-Negative checkbox, and selecting Simplex LP from the

Select a Solving Method drop-down box. Then click Solve. The information entered into

the Solver Parameters dialog box is shown in Figure 6.27.



WWW.YAZDANPRESS.COM

WWW.YAZDANPRESS.COM



This page intentionally left blank



WWW.YAZDANPRESS.COM

WWW.YAZDANPRESS.COM



CHAPTER

Integer Linear

Programming

CONTENTS

7.1



TYPES OF INTEGER LINEAR

PROGRAMMING MODELS



7.2



GRAPHICAL AND COMPUTER

SOLUTIONS FOR AN ALLINTEGER LINEAR PROGRAM

Graphical Solution of the LP

Relaxation

Rounding to Obtain an Integer

Solution

Graphical Solution of the

All-Integer Problem

Using the LP Relaxation to

Establish Bounds

Computer Solution



7.3



APPLICATIONS INVOLVING 0-1

VARIABLES

Capital Budgeting

Fixed Cost



Distribution System Design

Bank Location

Product Design and Market Share

Optimization

7.4



MODELING FLEXIBILITY

PROVIDED BY 0-1 INTEGER

VARIABLES

Multiple-Choice and Mutually

Exclusive Constraints

k out of n Alternatives Constraint

Conditional and Corequisite

Constraints

A Cautionary Note About

Sensitivity Analysis



7



WWW.YAZDANPRESS.COM

WWW.YAZDANPRESS.COM

318



Chapter 7



Information about opensource software can be

found at the COIN-OR

foundation website.



Integer Linear Programming



In this chapter we discuss a class of problems that are modeled as linear programs with the

additional requirement that one or more variables must be integer. Such problems are

called integer linear programs. If all variables must be integer, we have an all-integer linear program. If some, but not all, variables must be integer, we have a mixed-integer linear

program. In many applications of integer linear programming, one or more integer variables are required to equal either 0 or 1. Such variables are called 0-1 or binary variables.

If all variables are 0-1 variables, we have a 0-1 integer linear program.

Integer variables—especially 0-1 variables—provide substantial modeling flexibility.

As a result, the number of applications that can be addressed with linear programming

methodology is expanded. For instance, the Management Science in Action, Crew

Scheduling at Air New Zealand, describes how that airline company employs 0-1 integer

programming models to schedule its pilots and flight attendants. Later Management

Science in Actions describe how Valley Metal Containers uses a mixed-integer program for

scheduling aluminum can production for Coors beer, and how the modeling flexibility provided by 0-1 variables helped Ketron build a customer order allocation model for a sporting goods company. Many other applications of integer programming are described

throughout the chapter.

The objective of this chapter is to provide an applications-oriented introduction to integer linear programming. First, we discuss the different types of integer linear programming models. Then we show the formulation, graphical solution, and computer solution of

an all-integer linear program. In Section 7.3 we discuss five applications of integer linear

programming that make use of 0-1 variables: capital budgeting, fixed cost, distribution system design, bank location, and market share optimization problems. In Section 7.4 we provide additional illustrations of the modeling flexibility provided by 0-1 variables. Chapter

appendices illustrate the use of Excel and LINGO for solving integer programs.

The cost of the added modeling flexibility provided by integer programming is that

problems involving integer variables are often much more difficult to solve. A linear programming problem with several thousand continuous variables can be solved with any of

several commercial linear programming solvers. However, an all-integer linear programming problem with fewer than 100 variables can be extremely difficult to solve. Experienced management scientists can help identify the types of integer linear programs that are

easy, or at least reasonable, to solve. Commercial computer software packages, such as

LINGO, CPLEX, Xpress-MP, and the commercial version of Solver have extensive integer

programming capability, and very robust open-source software packages for integer

programming are also available.



MANAGEMENT SCIENCE IN ACTION

CREW SCHEDULING AT AIR NEW ZEALAND*

As noted in Chapter 1, airlines make extensive use

of management science (see Management Science

in Action, Revenue Management at American

Airlines). Air New Zealand is the largest national

and international airline based in New Zealand.

Over the past 15 years, Air New Zealand developed

integer programming models for crew scheduling.

Air New Zealand finalizes flight schedules at

least 12 weeks in advance of when the flights are to

take place. At that point the process of assigning

crews to implement the flight schedule begins. The



crew-scheduling problem involves staffing the

flight schedule with pilots and flight attendants. It

is solved in two phases. In the first phase, tours of

duty (ToD) are generated that will permit constructing sequences of flights for pilots and flight

attendants that will allow the airline’s flight schedule to be implemented. A tour of duty is a one-day

or multiday alternating sequence of duty periods

(flight legs, training, etc.) and rest periods (layovers). In the ToD problem, no consideration is

given to which individual crew members will



WWW.YAZDANPRESS.COM

WWW.YAZDANPRESS.COM

7.1



Types of Integer Linear Programming Models



perform the tours of duty. In the second phase, individual crew members are assigned to the tours of

duty, which is called the rostering problem.

Air New Zealand employs integer programming models to solve both the ToD problem and

the rostering problem. In the integer programming

model of the ToD problem, each variable is a 0-1

variable that corresponds to a possible tour of duty

that could be flown by a crew member (e.g., pilot

or flight attendant). Each constraint corresponds to

a particular flight and ensures that the flight is included in exactly one tour of duty. The cost of variable j reflects the cost of operating the jth tour of

duty, and the objective is to minimize total cost.

Air New Zealand solves a separate ToD problem

for each crew type (pilot type or flight attendant

type).

In the rostering problem, the tours of duty

from the solution to the ToD problem are used to

construct lines of work (LoW) for each crew member. In the integer programming model of the rostering problem, a 0-1 variable represents the

possible LoWs for each crew member. A separate

constraint for each crew member guarantees that



319



each will be assigned a single LoW. Other constraints correspond to the ToDs that must be covered by any feasible solution to the rostering

problem.

The crew-scheduling optimizers developed by

Air New Zealand showed a significant impact on

profitability. Over the 15 years it took to develop

these systems, the estimated development costs

were approximately NZ$2 million. The estimated

savings are NZ$15.6 million per year. In 1999 the

savings from employing these integer programming models represented 11% of Air New

Zealand’s net operating profit. In addition to the

direct dollar savings, the optimization systems provided many intangible benefits such as higherquality solutions in less time, less dependence on a

small number of highly skilled schedulers, flexibility to accommodate small changes in the schedule,

and a guarantee that the airline satisfies legislative

and contractual rules.

*Based on E. Rod Butchers et al., “Optimized Crew

Scheduling at Air New Zealand,” Interfaces (January/

February 2001): 30–56.



NOTES AND COMMENTS

1. Because integer linear programs are harder to

solve than linear programs, one should not try to

solve a problem as an integer program if simply

rounding the linear programming solution is adequate. In many linear programming problems,

such as those in previous chapters, rounding has

little economic consequence on the objective

function, and feasibility is not an issue. But, in

problems such as determining how many jet engines to manufacture, the consequences of

rounding can be substantial and integer programming methodology should be employed.

2. Some linear programming problems have a

special structure, which guarantees that the



7.1



variables will have integer values. The assignment, transportation, and transshipment problems of Chapter 6 have such structures. If the

supply and the demand for transportation and

transshipment problems are integer, the optimal

linear programming solution will provide integer amounts shipped. For the assignment problem, the optimal linear programming solution

will consist of 0s and 1s. So, for these specially

structured problems, linear programming

methodology can be used to find optimal integer solutions. Integer linear programming algorithms are not necessary.



TYPES OF INTEGER LINEAR PROGRAMMING MODELS

The only difference between the problems studied in this chapter and the ones studied in

earlier chapters on linear programming is that one or more variables are required to be integer. If all variables are required to be integer, we have an all-integer linear program.

The following is a two-variable, all-integer linear programming model:



Xem Thêm
Tải bản đầy đủ (.pdf) (1,043 trang)

×