22
Graph Transformations Graph Transformations for Vehicle Routing for Vehicle Routing and Job Shop and Job Shop Scheduling Scheduling Problems Problems J.C.Beck, P.Prosser, E.Selensky [email protected], {pat,evgeny}@dcs.gla.ac.u k

Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky [email protected], {pat,evgeny}@dcs.gla.ac.uk

Embed Size (px)

Citation preview

Page 1: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

Graph Transformations for Graph Transformations for Vehicle Routing and Job Shop Vehicle Routing and Job Shop

SchedulingScheduling Problems Problems

J.C.Beck, P.Prosser, E.Selensky

[email protected], {pat,evgeny}@dcs.gla.ac.uk

Page 2: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 2

w1

w2

w12

wn

wi

wn-1

w1,n

wn-1,nw1,n-1

w2,n

w2,n-1

Find a cycle of min cost

Basic Problem

Page 3: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 3

Lexicographic ordering of nodes: A,B,C,D

Example

Page 4: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 4

Motivation

• Core problem in vehicle routing and shop scheduling

• Edge weights to node weights:– Large for VRP, small for JSP

• Can we use graph transformations to make VRP look like JSP and vice versa?

Page 5: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 5

Vehicle Routing

[2:25pm 2:40am]

[9:00am 9:15am]

[3:00pm 5:00am]

[3:00pm 5:00am]

[9:00am 5:00am]

[4:00pm 5:00am]

NP-hard!Go find vehicle tours with min travel

Page 6: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 6

Job Shop Scheduling

J1: (M1,t11) (M3,t13) (M2,t12)J2: (M3,t23) (M1,t21) (M2,t22)J3: (M2,t32) (M3,t33) (M1,t31)

3 machines: M1, M2, M3

3 jobs: J1, J2, J3

Go find a schedule with min Makespan NP-complete

TimeMakespan0

M1

M2

M3

Page 7: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 7

Hypothesis

Graph Transformation

VRP Solver

JSP Solver

Graph Transformation

VRP

JSP

Is it important?

Page 8: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 8

Cost-Preserving Transformations

• Assumptions:– Graphs: complete (true for VRP, JSP subsumed),

undirected (directed case subsumed);

– A solution is a cycle on the graph (for Hamiltonian paths everything is similar);

– Transformations should preserve cost and order of nodes in a cycle.

Page 9: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 9

Caveat

• This is not a comprehensive study of all possible transformations

• Rather, we propose some transformations and study them

Page 10: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 10

Types of TransformationsDirect: Reduce Edge Weights, Increase Node Weights

Inverse: Increase Edge Weights, Reduce Node Weights

Page 11: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 11

• lexicographic order of nodes

• choose a node whose cheapest incident edge is a maximum

• choose a node whose cheapest incident edge is a minimum

Order Dependent Transformations

MaxMin:

MinMin:

Lex:

Page 12: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 12

Example

Order Independent Transformation

Page 13: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 13

Inverse TransformationReminder: Increase Edge Weights, Reduce Node Weights

• Order-independent• GG’inv; GG’dodG’inv; GG’doiG’inv;

Express as if odd and if even 12 kwiiw kwi 2

Page 14: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 14

• Weight transfer from nodes to edges:– change in proportion of weight of cycle C:

– a similar measure for the whole graph:

where W and W’ are graph weights before and after transformation

Performance measures

iji

ijijc ww

ww

,

,W

wij ,W

wij

Page 15: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 15

• Relative edge/node weights ordering:– Sort edge/node weights in ascending order:

• e.g. {w11, w12, w13} for edges (1,1), (1,2) and (1,3);

– Apply transformations and count how many pair-wise changes there are:

• e.g. {w’13, w’11, w’12}, so we have 2 changes;

• Two measures: and edges .nodes

Performance measures

Page 16: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 16

Experiments

• Purpose: – Assess performance of the transformations on complete

undirected graphs

• Layout: – Randomly generate 100-instance sets of graphs of

different sizes; – Apply andMaxMin, MinMin,Lex, DirOrderInd

Inverse.

Page 17: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 17

Experiments

iji

ijijc ww

ww

Page 18: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 18

Experiments

W

wW

w

W

w

ij

ijij

Page 19: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 19

Experiments

Page 20: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 20

Experiments

Page 21: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 21

Analysis of Results

• Weight Transfer: Inverse >> Order Independent >> Order Dependent

• Changes in Edge/Node Ordering:Inverse: constant w.r.t. graph size;

Inverse>>MaxMin >> Order Independent, Lex >> MinMin

Page 22: Graph Transformations for Vehicle Routing and Job Shop Scheduling Problems J.C.Beck, P.Prosser, E.Selensky c.beck@4c.ucc.ie, {pat,evgeny}@dcs.gla.ac.uk

ICGT 2002, E. Selensky 22

Future Work

• Systematically apply the transformations to VRP/JSP instances and study their performance in practice.