27
Planning and Planning and Scheduling Scheduling Two Worlds in One System Two Worlds in One System Roman Barták Roman Barták Charles University in Charles University in Prague Prague (Visopt B.V.) (Visopt B.V.) [email protected] [email protected] http://ktiml.mff.cuni.cz/~bartak http://ktiml.mff.cuni.cz/~bartak

Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) [email protected] bartak

Embed Size (px)

Citation preview

Page 1: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

Planning and Planning and SchedulingScheduling

Two Worlds in One SystemTwo Worlds in One System

Roman BartákRoman BartákCharles University in PragueCharles University in Prague(Visopt B.V.)(Visopt B.V.)

[email protected]@ktiml.mff.cuni.czhttp://ktiml.mff.cuni.cz/~bartakhttp://ktiml.mff.cuni.cz/~bartak

Page 2: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

22 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Talk OutlineTalk Outline

Bridging the terminology gapBridging the terminology gap Planning vs. schedulingPlanning vs. scheduling

Bridging the technology gapBridging the technology gap Example problemsExample problems

Visopt ShopFloor SystemVisopt ShopFloor System From modeling to solvingFrom modeling to solving Integrating planning into schedulingIntegrating planning into scheduling

Page 3: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

33 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Terminology gapTerminology gapDo we understand each other?Do we understand each other?

Page 4: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

44 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Planning and scheduling in practicePlanning and scheduling in practice

marketing planningmarketing planning what is the company strategy?what is the company strategy?

long-horizon planninglong-horizon planning what and when should be produced?what and when should be produced?

production planningproduction planning how to produce given items?how to produce given items?

operation schedulingoperation scheduling what is the exact sequencing of operations?what is the exact sequencing of operations?

Page 5: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

55 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Planning taskPlanning task

““The planning task is to find out The planning task is to find out a sequence of actions that will a sequence of actions that will transfer the initial state of the transfer the initial state of the world into a state where the world into a state where the desired goal is satisfied“desired goal is satisfied“

Page 6: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

66 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Planning task at examplePlanning task at example

A

B

C

D

AD

PlanPlanPick(C)Release(C,table)Pick(B)Release(B,D)Pick(C)Release(C,B)

B

C

Initial world

AD

B

CFinal world

Page 7: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

77 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Planning Planning task task at glanceat glance

Input:Input: an initial state of the worldan initial state of the world a description of actions changing the worlda description of actions changing the world a desired state of the worlda desired state of the world

Output:Output: a structure of actionsa structure of actions

Features:Features: Activities are not know in advanceActivities are not know in advance No time and resourcesNo time and resources

Page 8: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

88 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Scheduling taskScheduling task

““The scheduling task is to The scheduling task is to allocate known activities to allocate known activities to available resourceavailable resourcess and time and time respecting capacityrespecting capacity,, precedence precedence (and other) constraints“(and other) constraints“

Page 9: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

99 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Scheduling task at exampleScheduling task at example

Page 10: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

1010 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Scheduling taskScheduling task at glance at glance

Input:Input: a set of activities with precedencesa set of activities with precedences a set of available resourcesa set of available resources

Output:Output: allocation of activities to resourcesallocation of activities to resources

Features:Features: Activities are known in advanceActivities are known in advance Time and resources are restrictedTime and resources are restricted

Page 11: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

1111 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Technology gapTechnology gapCan we integrate?Can we integrate?

Page 12: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

1212 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Traditional „integration“Traditional „integration“

1.1. Do planning firstDo planning firsti.e. decide about necessary i.e. decide about necessary activitiesactivities

2.2. DDo scheduling nexto scheduling nexti.e. allocate activities to time i.e. allocate activities to time and resourcesand resources

acti

vit

ies

acti

vit

ies

failu

refa

ilure

Actually, planning and scheduling is done separately there.

Page 13: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

1313 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Do we need to integrate more?Do we need to integrate more?

Sometimes more tighten integration of Sometimes more tighten integration of planning and scheduling is necessary.planning and scheduling is necessary.

When?When? If there are too frequent backtracks from If there are too frequent backtracks from

scheduling to planning.scheduling to planning.Improving the planner may help.Improving the planner may help.

If existence of the activity depends on If existence of the activity depends on allocation of other activities.allocation of other activities.Foregoing planning of activities cannot be done there.Foregoing planning of activities cannot be done there.

Page 14: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

1414 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Process-dependent activitiesProcess-dependent activities

re-heatingre-heating

re-cyclingre-cycling

AA BBsetup

by-product

transitionfinal product

heatheat

processprocess

heatheat

processprocessprocessprocess

long duration

re-heatre-heat

Page 15: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

1515 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Visopt ShopFloorVisopt ShopFloorIntegration in practiceIntegration in practice

www.visopt.com

Page 16: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

1616 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

factory descriptionfactory description

Visopt ShopFloor at glanceVisopt ShopFloor at glance

customer demandscustomer demands(orders)(orders)

plan/scheduleplan/schedule

a generic scheduling engine beyond traditiona generic scheduling engine beyond traditionalal scheduling scheduling

Page 17: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

1717 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

Transition schemeTransition schemescheduling resources with scheduling resources with complex behaviourcomplex behaviour

a state transition scheme with min/max batchesa state transition scheme with min/max batches

batch countersbatch counters force given state (cleaning)force given state (cleaning)

after a given number of batchesafter a given number of batches

A A A B C C

C C A A A

C C B A A A

loadload

heatheat unloadunload

cleanclean

coolcool

clean

produce A (3-4)produce A (3-4)

produce B (1-2)produce B (1-2)

produce C (2-4)produce C (2-4)

load heat unload load heat unload cool clean

Page 18: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

1818 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

DependenciesDependenciesbatches consume and produce itemsbatches consume and produce items

dependency delay

moved quantity

items are moved between resourcesitems are moved between resources

supplier

consumer

supplier-consumer dependenciessupplier-consumer dependencies describe relations between batches (resources)describe relations between batches (resources)

N-to-N relationsN-to-N relationsAlternative recipesAlternative recipes RecyclingRecycling

Page 19: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

1919 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

DemandsDemandsProduction in the factory must be evoked somehow!Production in the factory must be evoked somehow!

This is realised via external This is realised via external demandsdemands..

In Visopt ShopFloor the demands are described as orders of In Visopt ShopFloor the demands are described as orders of items:items:

item (product)item (product)

quantityquantity

delivery timedelivery time

• alternative product?• variable quantity?• delivery delay?

Page 20: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

2020 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

OptimisationOptimisationWhat do the users need to optimise?What do the users need to optimise?

minimise makespan

minimise number of set-ups

minimise lateness

minimise earliness

maximise resource utilisation

...

minimise makespan

minimise number of set-ups

minimise lateness

minimise earliness

maximise resource utilisation

...

So what is the common objective?

more satisfied demands

expensive set-ups

penalty for delays

storing cost

fix expenses

AAlways always ask why dosk why doeses the userthe user need a given objective! need a given objective!

In Visopt ShopFloor we minimise costminimise cost (= maximise profitmaximise profit):• income for delivered items (negative cost)• penalty for late deliveries• costs of production / moving / storing

M O N E YM O N E Y

Page 21: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

2121 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

The taskThe task

InputInputfactory descriptionfactory description resourcesresources ddependenciesependencies

initial situationinitial situation

demandsdemands

OutputOutputplanplanhow to satisfy the demandshow to satisfy the demands??

scheduleschedulehow to realise the planhow to realise the plan??

Page 22: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

2222 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

endend startstart

K-1K-1 KK K+1K+1

Slot representationSlot representationResource-centric modelResource-centric model

a resource schedule = a sequence of batchesa resource schedule = a sequence of batches realised via a sequence of slots (slot = space for batch)realised via a sequence of slots (slot = space for batch)

time shift

Slot variablesSlot variables describe parameters of batch to be filled in the slotdescribe parameters of batch to be filled in the slot

slots can slide in timeslots can slide in time

slots cannot swap the positionslots cannot swap the position

statestate

statestate = a batch type that can be filled into the slot

startstart endend

durationduration

serialserial = a position in the state sequence

timestimes = start, end, duration

connected via constraints

+serial+serial

Page 23: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

2323 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

DependenciesDependenciesWhen the batch is known (located to a slot),When the batch is known (located to a slot),

ask for missing suppliers/consumers!ask for missing suppliers/consumers!

Dependency generatorDependency generator (realisation of a simple planner)(realisation of a simple planner)

SchedulingScheduling = deciding about batches in slots = deciding about batches in slots

Using information about dependencies in the batchUsing information about dependencies in the batch

K-1K-1 K-1K-1 KK

Page 24: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

2424 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

(Pseudo) Demo(Pseudo) Demo

Page 25: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

2525 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

ConclusionsConclusions

Page 26: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

2626 PLANET Information Day, May 26, 2003PLANET Information Day, May 26, 2003 Roman BartákRoman Barták

A message of the talkA message of the talk

Planning and scheduling are Planning and scheduling are different areas with different different areas with different solving technologies.solving technologies.

But they can be integrated into a But they can be integrated into a single solver!single solver!

Page 27: Planning and Scheduling Two Worlds in One System Roman Barták Charles University in Prague (Visopt B.V.) bartak@ktiml.mff.cuni.cz bartak

Planning and Planning and SchedulingScheduling

Two Worlds in One SystemTwo Worlds in One System

Roman BartákRoman BartákCharles University in PragueCharles University in Prague(Visopt B.V.)(Visopt B.V.)

[email protected]@ktiml.mff.cuni.czhttp://ktiml.mff.cuni.cz/~bartakhttp://ktiml.mff.cuni.cz/~bartak