Top Banner
Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009
36

Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Dec 30, 2015

Download

Documents

Shonda Young
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Using Hardware Scheduling Methods

Peter LieberECEn 625

2 December 2009

Page 2: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

I like trains, trains are cool…They go fastThey follow a predetermined routeThey can haul an enormous amount of cargoThey sound coolI can play with them until I dieThey just look cool

Page 3: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Public TransitSchedules: The difference between success

and failureGood Schedule == economical and enjoyableBad Schedule == low use and waste of time

Infrastructure: Dictates much of the cost of a systemAnalogues to Binding and Area usage in

hardwareBetter infrastructure can encourage ridership

Page 4: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Public TransitGood Bad

Page 5: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

FreightSchedules: The difference between success

and failureGood Schedule == economical and speedBad Schedule == low use and hard to manage

Infrastructure: Dictates much of the cost of a systemAnalogues to Binding and Area usage in

hardwareBetter infrastructure can get trucks off the road

Page 6: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Model TrainsSchedules: The difference between bored

kids and funGood Schedule == lots to seeBad Schedule == long waits and short thrills

Infrastructure: Cost? We don’t care, we like trainsAnalogues to Binding and Area usage in

hardwareBetter infrastructure can seem more realistic

Page 7: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Model TrainsGood Bad

Page 8: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

GoalApply what we have learned about hardware

scheduling and binding to the train scheduling problem

Use what I learn to enable good scheduling of model trains with the goal of :As much movement as possible!

Page 9: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Model Not the trains, the circles and linesThe common way railroad infrastructure is

modeled in the literatureVertices: Railroad stations or important

network pointsEdges: Tracks connecting these points

Page 10: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Traditional ApproachDevelop a modelDetermine objective(s) and constraintsMap model into mathematical formulationMap objectives and constraints into

equationsThrow it at an ILP solverSound simple?

Page 11: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Traditional Approach - ExampleTheir parameters:

Page 12: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Traditional Approach - ExampleTheir parameters:

Page 13: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Traditional Approach - ExampleTheir parameters:

Page 14: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Traditional Approach - ExampleTheir parameters:

Page 15: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Traditional Approach - ExampleTheir decision variables:

Page 16: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Traditional Approach - ExampleTheir decision variables:

Page 17: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Traditional Approach - ExampleTheir Objective Equations:

Fuel Consumption Cost

Page 18: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Traditional Approach - ExampleTheir Objective Equations:

Travel Time Cost

Page 19: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Traditional Approach - ExampleTheir Constraint Equations

Page 20: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Traditional Approach - ExampleTheir Constraint Equations

Page 21: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

My ApproachUse hardware scheduling concepts to

schedule trainsAlgorithmic approach rather than ILPCan we use IMS?Start with a simple, greedy approachMove to better algorithms and heuristics

Page 22: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

ModelLayout – track configurationRoute – path a train takes on the layout

a b

f

c

g

d e

2

Page 23: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Model

a b

f

c

g

d e

2

Route 1: A B C D E D C BRoute 2: A B F C G BRoute 3: E D C F B G C DRoute 4: B F C G B F C G

Page 24: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Naïve Greedy Algorithmforeach route { t = 0 while route is not done { if step s of route at time t is not occupied schedule the route's next step at time t t++ else wait at time t (stall) t++ }}

Page 25: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Naïve Greedy – Results

a b

f

c

g

d e2

Page 26: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Greedy Algorithmt = 0while any route's schedule is not done { foreach route that is not done { if the route's next segment is no occupied schedule the route's next step at time t else schedule the route's current step again (stall) } t++}

Problem: we can get into deadlock

Page 27: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Backtracking Greedy Algorithmt = 0while any route’s schedule is not done {… if all routes stalled { unschedule stalled steps force the first route to schedule next step foreach other route { if the route's next segment is no occupied schedule the route's next step at time t else if the route's current segment is overfull increase capacity of the next segment schedule the route's next step at time t else schedule the route's current step again (stall) } }…}

Page 28: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Backtracking Greedy Algorithm

a b

f

c

g

d e

2 2 2

Page 29: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Restarting BT Greedy Algt = 0While any route's schedule is not done { foreach route that is not done { … } if all routes stalled { … foreach other route { if the route's next segment is no occupied schedule the route's next step at time t else if the route's current segment is overfull increase capacity of the next segment restart scheduling with new capacities else schedule the route's current step again (stall) } } t++}

Page 30: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Restarting BT Greedy Alg

a b

f

c

g

d e

2 2 2

Page 31: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Improvement AttemptsSo far, the order of iterating through the

routes is not knownCan we order them in such a way to minimize

route duration?Can we order them to maximize movement?

Page 32: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Ordered BT Greedy Algorithmt = 0while any route's schedule is not done { foreach route that is not done ordered by number of steps left { if the route's next segment is no occupied schedule the route's next step at time t else schedule the route's current step again (stall) } if all routes stalled { … } t++}

Page 33: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Restarting Ord BT Greedy Algt = 0While any route's schedule is not done { foreach route that is not done orderd by number of steps left { … } if all routes stalled { … foreach other route { if the route's next segment is no occupied schedule the route's next step at time t else if the route's current segment is overfull increase capacity of the next segment restart scheduling with new capacities else schedule the route's current step again (stall) } } t++}

Page 34: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

ChallengesFind the right heuristic for route order

Next step is to be less greedyBig difference from what we are used to:

while an operation of a DG cannot be executed, we usually dont think of it as taking any resources. Under this model, however, the train actually is still using the previous resource.

A TRAIN CANNOT BE NOWHERE!!!

Page 35: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Mapping to IMSNot only are we resource-constrained, the

DGs (routes) are bound already. The DG is ALL routes combined into one,

unconnected, graphEach station in the layout is a resource typeAfter running IMS, the required number of

each resource is the minimum capacity for that station

Page 36: Using Hardware Scheduling Methods Peter Lieber ECEn 625 2 December 2009.

Mapping to IMS

a b c d e d c b

a b f c g b

e d c f b g c d

b f c g b f c g