37
1 Lecture 1 Introduction Lecture 1 Introduction

1 Lecture 1 Introduction. 2 Agenda typical problems in transportation and logistics modeling shortest-path problems assignment problems

Embed Size (px)

Citation preview

Page 1: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

1

Lecture 1 IntroductionLecture 1 Introduction

Page 2: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

2

AgendaAgenda

typical problems in transportation and typical problems in transportation and

logistics logistics modelingmodeling

shortest-path problems shortest-path problems

assignment problems assignment problems

Page 3: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

3

Typical Problems in Typical Problems in Transportation and LogisticsTransportation and Logistics

Page 4: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

4

Typical Problems in Typical Problems in Transportation and LogisticsTransportation and Logistics

network-flow problems

routing problems

location problems

arc-routing problems

Page 5: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

5

Network-Flow ProblemsNetwork-Flow Problems

problems with an underlying network structure arcs

directed, undirected, or mixed of known lengths, capacities, and costs per unit flow

nodes net in flow, net out flow, or net no flow

flows along arcs, from one node to another

21

3

45 5

Page 6: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

6

Network-Flow ProblemsNetwork-Flow Problems

Shortest-Path Problems: Find the

shortest path from one node to another in

a network

Maximal Flow Problems: Find the

maximal possible flow from one node to

another in the network

21

3

4

Page 7: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

7

Network-Flow ProblemsNetwork-Flow Problems

Minimum Cost Flow Problems: Find the cheapest way to send goods from the specified sources nodes to the sink nodes

Minimum Spanning Tree Problems: Find the minimum-cost set of arcs that connect all nodes

Multi-commodity Flow Problems: The minimum cost flow problem with multiple products bounded by common constraints

Page 8: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

8

Routing Problems

still on a network sequence of nodes matter more

for any choice of the sequence of nodes in a segment, the number of possible sequences for the remaining nodes does not depend on the choice and sequence of nodes in the segment

in other problems such as finding the shortest path, the sequence of nodes selected affect the number of feasible solutions for the remaining decisions

Page 9: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

9

Routing Problems

Traveling Salesman Problem: Given a set

of cities and the distances among them,

find the shortest cycle that visits all cities

once and returns to the starting city? applications: a subproblem in vehicle routing,

drill path, placement problem, transition cost

between jobs, examination scheduling

Page 10: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

10

Routing Problems

Vehicle Routing Problem: Goods are to be picked up and sent to the depot by a group of vehicles. Given the distances of the locations of goods from the depot, the volume of goods, and the capacity of vehicles, find the allocation of goods to and the routing of vehicles such that the total distance travelled by vehicles is minimized.

Page 11: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

11

Location ProblemsLocation Problems

decisions: where to put something, possibly multiple items

different levels of decisions strategic level: a new city, an airport, headquarter of a company, a

nuclear plant tactical level: a new factory, a new warehouse operational level: location of a machine, storage slot of an item

the medium for location consideration: line, an area, a node in a network

items to locate: points (e.g., warehouses), lines (e.g., flights routes), networks (e.g., flights routes), area (e.g., regional office) criteria: distance, cost, coverage, accessibility, market share

Page 12: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

12

Arc Routing ProblemsArc Routing Problems

Given a network, find the shortest cycle

that visits all arcs once and returns to the

original city Mail Delivery, Garbage Collection, Street

Cleaning, Snow Removing, Meter reading

Page 13: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

13

What is Modeling? What is Modeling?

Page 14: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

14

The Most Important The Most Important Modeling Problem in My LifeModeling Problem in My Life

雞免同籠雞免同籠共 25 隻,有腳 80 隻,問雞兔各有幾隻?

let let xx ( (yy) be the number of chickens ) be the number of chickens

(rabbits) in the cage (rabbits) in the cage

xx + + yy = 25 = 25

22xx + 4 + 4yy = 80 = 80

Page 15: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

15

More Complicate ProblemsMore Complicate Problems

雞、免、豬同籠雞、免、豬同籠共 25 隻,有腳 80 隻,問雞、兔、豬、豬各有幾隻?

let let xx ( (y, zy, z) be the number of chickens ) be the number of chickens

(rabbits, pigs) in the cage (rabbits, pigs) in the cage

xx + + yy + + zz = 25 = 25

22xx + 4 + 4yy + 4 + 4zz = 80 = 80

Page 16: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

16

More Complicate ProblemsMore Complicate Problems

雞、免、豬同籠雞、免、豬同籠共 25 隻,有腳 80 隻,問雞、兔、豬、豬各有幾隻?

The answer: {(The answer: {(xx, , y, zy, z) | ) | xx = 10, = 10, yy++z z = 15, = 15,

y, y, zz {0, 1, …}} {0, 1, …}}

implicit constraints: implicit constraints: xx, , yy, , z z {0, 1, …}{0, 1, …}

Page 17: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

17

More Complicate ProblemsMore Complicate Problems

suppose that there is a weird three-leg animal called suppose that there is a weird three-leg animal called 雞、免、雞、免、同籠同籠共 25 隻,有腳 80 隻,問雞、兔、、 各

有幾隻? let let xx ( (y, zy, z) be the number of chickens (rabbits, ) be the number of chickens (rabbits, s) in the s) in the

cage cage constraintsconstraints

xx + + yy + + zz = 25 = 25 22xx + 4 + 4yy + 3 + 3zz = 80 = 80 xx + + yy + + zz {0, 1, 2, …} {0, 1, 2, …}

x y

0 5 20

1 6 18

2 7 16

… … …

8 13 4

9 14 2

10 15 0

Page 18: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

18

More Complicate ProblemsMore Complicate Problems

suppose that there is a weird three-leg animal called suppose that there is a weird three-leg animal called 籠子可容雞、免、籠子可容雞、免、共 25 隻,腳 80 隻( !?please don’t ask what this

means ) 。雞每隻可售 $150 , 兔 $250 , $180 。要售出最高價錢,籠子內應有幾籠子內應有幾隻雞、免、雞、免、?

max 150max 150x +x + 250 250y + y + 180180zz s.t. s.t. xx + + yy + + zz = 25 = 25 22xx + 4 + 4yy + 3 + 3zz = 80 = 80 xx + + yy + + zz {0, 1, 2, …} {0, 1, 2, …}

x y Revenue0 5 20 48501 6 18 48902 7 16 49303 8 14 49704 9 12 50105 10 10 50506 11 8 50907 12 6 51308 13 4 51709 14 2 5210

10 15 0 5250

Page 19: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

19

A Typical ModelA Typical Model

opt x1 + … + xn

s.t.

a11x1 + a12x2 + … + a1nxn = b1

a21x1 + a22x2 + … + a2nxn = b2

… am1x1 + am2x2 + … + amnxn = bm

xn X

Page 20: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

20

Comments on a Typical ModelComments on a Typical Model

opt optimize, which can be max ( maximize) or

min ( minimize)

three types of constraints, equality (=), less than or

equal to (), and greater than or equal to ()

often a mixture of all three types in a model

decision variables xnbelonging to a set X, which can

be discrete (e.g., the set of non-negative integers) or

continuous (e.g., the set of non-negative real numbers)

Page 21: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

21

Comments on a Typical ModelComments on a Typical Model

usually more decision variables than number of

constraints easy to have a problem of tens of million of variables

and hundred thousands of constraints

Page 22: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

22

Which Problem is Easier to Which Problem is Easier to Solve, Discrete or Continuous X?Solve, Discrete or Continuous X?

in general discrete X is much more

difficult to solve than continuous X this course on modeling, leaving the solution

methods to other courses

Page 23: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

23

Importance of ModelingImportance of Modeling

existence of magical solution tools

magical tools such as

CPLEX, Gurobi, Lingo,

etc

optimal solution

This simplifies reality quite a

bit.

Page 24: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

24

More on ModelingMore on Modeling

Page 25: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

25

ModelingModeling

(in our case) the process of representing a

physical phenomenon by mathematical

relationships

let let xx ( (yy) be the # of ) be the # of

chickens (rabbits) in chickens (rabbits) in

the cage the cage

xx + + yy = 25 = 25

22xx + 4 + 4yy = 80 = 80

(definitions (definitions

of) symbolsof) symbols

the bridge between the bridge between

physical phenomenon physical phenomenon

and mathematical and mathematical

relationshiprelationship

constraintsconstraints

each constraint each constraint

describes a physical describes a physical

property of the physical property of the physical

phenomenonphenomenon

Page 26: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

26

ModelingModeling

often not easy to define the variables

careful examination of the physical

phenomenon in construction of

constraints

Page 27: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

27

Is Modeling Useful?Is Modeling Useful?

Can all physical phenomena be represented

numerically? 雞免同籠雞免同籠共 25 隻,有腳 76 隻,問雞兔各有幾隻?

a possible real-life answer: 雞 11 隻,兔 14 隻 Is it possible to get the precise values of the

parameters in a model?

Page 28: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

28

Is Modeling Useful?Is Modeling Useful?

Our view: Models are useful tools that

provide insights to a problem; however,

blindly applying the result of a model

only indicates that we don’t fully

understand the art of modeling.

Page 29: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

29

Shortest-Path ModelsShortest-Path Models

Page 30: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

30

A NetworkA Network

definitions circles: nodes ( 節點 ), vertices ( 角 ) arcs: lines, branches directed (具方向的) or not

2

1

3

4

2

1

3

4

2

1

3

4

2

1

3

4

Page 31: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

31

An Example to Formulate Constraints An Example to Formulate Constraints The Shortest Route Problem The Shortest Route Problem

motivation: to find the shortest route from the origin ( 起點, i.e., one location, source node) to the destination ( 終點, i.e., another location, sink node) in a network

problem on hand:

Page 32: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

32

Universal Solution TechniquesUniversal Solution Techniques

If you don’t know how to solve a difficult problem, start with a simpler one with the similar properties. Observe the general principle in solving the simpler problem, which hopefully is applicable to the difficult problem.

It is generally helpful to work with a small concrete numerical example.

Page 33: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

33

A Simple Concrete A Simple Concrete Numerical ExampleNumerical Example

a one-arc, two-node problem source node 1 sink node 2

how to formulate? either the upper or the lower route (上路還是下路?

) ; how to model mathematically? min 9U + 7L

s.t.

U + L = 1

U, L {0, 1}

7

9

1 2

Page 34: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

34

Another Simple Concrete Another Simple Concrete Numerical ExampleNumerical Example

a three-arc, three-node problem source node 1

sink node 3

either the upper or the lower route; how to model mathematically?

min (3+2)U + 4L

s.t.

U + L = 1

U, L {0, 1}

2

9

3

1

2

3

Page 35: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

35

What Have We Learnt About the Art of What Have We Learnt About the Art of Formulation from the Two Examples?Formulation from the Two Examples?

We calculate the lengths of all possible paths from the source to the sink.

Is it possible to pre-calculate the lengths of all possible paths for a general problem? No.

7

9

1 22

9

3

1

2

3

Page 36: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

36

Yet Another Simple Concrete Yet Another Simple Concrete Numerical ExampleNumerical Example

obvious shortest path between node 1 and node 4

But how to formulate? What is the direction of flow in

the middle arc, upward or downward? Or any flow at

all?

1

2

5

6

3

1

2

4

3

Page 37: 1 Lecture 1 Introduction. 2 Agenda  typical problems in transportation and logistics  modeling  shortest-path problems  assignment problems

37

Yet Another Simple Concrete Yet Another Simple Concrete Numerical ExampleNumerical Example

a route from the source to the sink = a collection of arcs from the source to the sink

some restriction on the choice of arcs in to form a path

question: How to define the values of a group of xij such that xijs form a route from the source to the sink?

1

25

6

3

1

2

4

3 1

25

6

3

1

2

4

31

25

6

3

1

2

4

3 1

25

6

3

1

2

4

3

12

5

6

31

2

43