heuristics with mad queens and example from jssp

76
Heuristics with Mad queens and example from jssp

Upload: dora-shields

Post on 18-Jan-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Heuristics with Mad queens and example from jssp

Heuristics

with

Mad queens

and

example from jssp

Page 2: Heuristics with Mad queens and example from jssp

Heuristics in choco

Variable ordering

Value ordering

Page 3: Heuristics with Mad queens and example from jssp
Page 4: Heuristics with Mad queens and example from jssp
Page 5: Heuristics with Mad queens and example from jssp

Example: Mad Queens

Given a 8x8 chessboard put 4 non attackingQueens on the board and leave the remainingQueens off the board.

Just to show a simple static variable ordering heuristic

Page 6: Heuristics with Mad queens and example from jssp

Mad Queens with off the shelf static variable ordering heuristic

Page 7: Heuristics with Mad queens and example from jssp
Page 8: Heuristics with Mad queens and example from jssp

MyVarOrder

Page 9: Heuristics with Mad queens and example from jssp

MadQueens using MyVarOrder

Page 10: Heuristics with Mad queens and example from jssp
Page 11: Heuristics with Mad queens and example from jssp
Page 12: Heuristics with Mad queens and example from jssp
Page 13: Heuristics with Mad queens and example from jssp
Page 14: Heuristics with Mad queens and example from jssp
Page 15: Heuristics with Mad queens and example from jssp
Page 16: Heuristics with Mad queens and example from jssp
Page 17: Heuristics with Mad queens and example from jssp
Page 18: Heuristics with Mad queens and example from jssp
Page 19: Heuristics with Mad queens and example from jssp
Page 20: Heuristics with Mad queens and example from jssp
Page 21: Heuristics with Mad queens and example from jssp
Page 22: Heuristics with Mad queens and example from jssp

Slack-based heuristics for jssp

Page 23: Heuristics with Mad queens and example from jssp

jssp refresh

Page 24: Heuristics with Mad queens and example from jssp

We have

• a set of resources• a set of jobs

• a job is a sequence of operations/activities

• sequence the activities on the resources

Page 25: Heuristics with Mad queens and example from jssp

An example: 3 x 4

• We have 4 resources: green, yellow, red and blue• a job is a sequence of operations (precedence constraints)• each operation is executed on a resource (resource constraints)• each resource can do one operation at a time• the duration of an operation is the length of its box• we have a due date, giving time windows for operations (time constraints)

Op1.1 Op1.2 Op1.3 Op1.4Op1.1

Op2.1 Op2.2 Op2.3 Op2.4

Op3.1 Op3.2 Op3.3 Op3.4

job1

job2

job3

Page 26: Heuristics with Mad queens and example from jssp

Op1.1 Op1.2 Op1.3 Op1.4Op1.1

Op2.1 Op2.2 Op2.3 Op2.4

Op3.1 Op3.2 Op3.3 Op3.4

An example: 3 x 4

Op1.1Op2.3Op3.1

Op1.4Op2.4Op3.2

Op1.2Op2.1Op3.4

Op1.3Op2.2Op3.3

Page 27: Heuristics with Mad queens and example from jssp

The problem

Assign a start time to each operation such that(a) no two operations are in process on the same machine at the same time and(b) time constraints are respected

The problem is NP complete

Page 28: Heuristics with Mad queens and example from jssp

Op1.1 Op1.2 Op1.3 Op1.4Op1.1

Op2.1 Op2.2 Op2.3 Op2.4

Op3.1 Op3.2 Op3.3 Op3.4

An example: 3 x 4

Op1.1 Op2.3

Op3.1

On the “green” resource, put a direction on the arrowsA disjunctive graph

Page 29: Heuristics with Mad queens and example from jssp

Op1.1 Op1.2 Op1.3 Op1.4Op1.1

Op2.1 Op2.2 Op2.3 Op2.4

Op3.1 Op3.2 Op3.3 Op3.4

An example: 3 x 4

Op1.1 Op2.3

Op3.1

On the “green” resource, put a direction on the arrowsA disjunctive graph

We do not bind operations to start times

We take a least commitment approach

Consequently we get a set of solutions!

Page 30: Heuristics with Mad queens and example from jssp

op1.before(op2)

Page 31: Heuristics with Mad queens and example from jssp

op1.before(op2)

earliest start latest end

duration

Picture of an operation

Page 32: Heuristics with Mad queens and example from jssp

op1.before(op2)

earliest start latest start

duration

Picture of an operation

Constrained integer variable represents start time

Page 33: Heuristics with Mad queens and example from jssp

op1.before(op2)Picture of an operation

op1

op2

op1.before(op2) op1.start() + op1.duration() ≤ op2.start()

Page 34: Heuristics with Mad queens and example from jssp

op1.before(op2)Picture of an operation

op1

op2

op1.before(op2) op1.start() + op1.duration() ≤ op2.start()

propagate

Page 35: Heuristics with Mad queens and example from jssp

op1.before(op2)Picture of an operation

op1

op2

op1.before(op2) OR op2.before(op1)op1 and op2 cannot be in process at same time

Not easy to propagate until decision made (disjunction broken)

Page 36: Heuristics with Mad queens and example from jssp

op1.before(op2)Picture of an operation

op1

op2

d[i][j] = 0 op[i]1.before(op[j])

Use a 0/1 decision variable d[i][j] as follows

d[i][j] = 1 op[j]1.before(op[i])

Page 37: Heuristics with Mad queens and example from jssp

heuristics

Page 38: Heuristics with Mad queens and example from jssp

JUST ONE EXAMPLE

Page 39: Heuristics with Mad queens and example from jssp
Page 40: Heuristics with Mad queens and example from jssp
Page 41: Heuristics with Mad queens and example from jssp
Page 42: Heuristics with Mad queens and example from jssp
Page 43: Heuristics with Mad queens and example from jssp
Page 44: Heuristics with Mad queens and example from jssp
Page 45: Heuristics with Mad queens and example from jssp
Page 46: Heuristics with Mad queens and example from jssp
Page 47: Heuristics with Mad queens and example from jssp
Page 48: Heuristics with Mad queens and example from jssp
Page 49: Heuristics with Mad queens and example from jssp
Page 50: Heuristics with Mad queens and example from jssp
Page 51: Heuristics with Mad queens and example from jssp
Page 52: Heuristics with Mad queens and example from jssp
Page 53: Heuristics with Mad queens and example from jssp
Page 54: Heuristics with Mad queens and example from jssp
Page 55: Heuristics with Mad queens and example from jssp
Page 56: Heuristics with Mad queens and example from jssp
Page 57: Heuristics with Mad queens and example from jssp
Page 58: Heuristics with Mad queens and example from jssp

We have an engineering problem. Search solver uses IntDomainVar and model used IntegerVariable. To work out slack on a decision variablewe need to get access to information on Operations, in particularduration and start time. How do we do that?

Page 59: Heuristics with Mad queens and example from jssp
Page 60: Heuristics with Mad queens and example from jssp
Page 61: Heuristics with Mad queens and example from jssp
Page 62: Heuristics with Mad queens and example from jssp
Page 63: Heuristics with Mad queens and example from jssp
Page 64: Heuristics with Mad queens and example from jssp
Page 65: Heuristics with Mad queens and example from jssp
Page 66: Heuristics with Mad queens and example from jssp
Page 67: Heuristics with Mad queens and example from jssp
Page 68: Heuristics with Mad queens and example from jssp
Page 69: Heuristics with Mad queens and example from jssp
Page 70: Heuristics with Mad queens and example from jssp
Page 71: Heuristics with Mad queens and example from jssp
Page 72: Heuristics with Mad queens and example from jssp

Anyway, will the variable ordering heuristic make a differenceon it’s own? Admittedly the heuristic is rather expensive to

run so will it reduce search effort to the point that it reducesrun time (the bottom line)

Page 73: Heuristics with Mad queens and example from jssp

Do some experiments

Page 74: Heuristics with Mad queens and example from jssp
Page 75: Heuristics with Mad queens and example from jssp
Page 76: Heuristics with Mad queens and example from jssp