Scheduling Optim al & Real Tim e using CORA CORA CORA April - - PDF document

scheduling optim al real tim e
SMART_READER_LITE
LIVE PREVIEW

Scheduling Optim al & Real Tim e using CORA CORA CORA April - - PDF document

Model Checking Technology Scheduling Optim al & Real Tim e using CORA CORA CORA April 2002 June 2005 IST-2001-35304 Informationsteknologi Academ ic partners: I ndustrial Partners Nijmegen Axxom Aalborg Bosch


slide-1
SLIDE 1

Optim al & Real Tim e Scheduling

Model Checking Technology using

CORA CORA CORA

slide-2
SLIDE 2

Informationsteknologi

UC UCb

Academ ic partners:

− Nijmegen − Aalborg − Dortmund − Grenoble − Marseille − Twente − Weizmann

I ndustrial Partners

− Axxom − Bosch − Cybernetix − Terma

April 2002 – June 2005 IST-2001-35304

slide-3
SLIDE 3

Informationsteknologi

UC UCb

SIDMAR Overview

Machine 1 Machine 2 Machine 3 Machine 4 Machine 5 Buffer Continuos Casting Machine Storage Place Crane B Crane A @10 @20 @10 @10 @40 Lane 1 Lane 2 2 2 2

15 16

I NPUT sequence

  • f steel loads

(“pigs”) OUTPUT sequence of higher quality steel

GOAL: Maximize utilization

  • f plant

GOAL: Maximize utilization

  • f plant

SIDMAR Modelling

Machine 1 Machine 2 Machine 3 Machine 4 Machine 5 Buffer Continuos Casting Machine Storage Place Crane B Crane A Lane 1 Lane 2

A Single Load UPPAAL Model

OBJECTIVES

powerful, unifying

mathematical modelling

efficient computerized

problem-solving tools

distributed real-time

systems

time-dependent behaviour

and dynamic resource allocation

TI MED AUTOMATA

LTR Project VHS (Verification of Hybrid systems)

slide-4
SLIDE 4

Informationsteknologi

UC UCb

Smart Card Personalization

Cybenetix, France

Maximize throughput Maximize throughput

Piles of blank cards Personalisation Test and possibly reject

UC UC b

Adder 1

S = A + S' - A'

Adder 2

T = B + T' - B'

Buffer 1

1 Kbytes

Buffer 2

1 Kbytes

Buffer 9

2 Kbytes

Buffer 8

2 Kbytes

Buffer 7

2 Kbytes

Buffer 6

512 bytes

Buffer 4

2 Kbytes

Buffer 3

512 bytes

Input A 8 (100MHz) A' S' 16 (100 MHz) Input B 8 (100 MHz) T' B' T S Output S Output T 256 (100 MHz) 128 (200 MHz) SDRAM Buffer 5

512 bytes

B 8 (100MHz) 8 (100MHz) 8 (100MHz) 16 (100 MHz) 16 (100 MHz) 16 (100 MHz) 256 (100 MHz) 256 (100 MHz) 256 (100 MHz) 256 (100 MHz) 256 (100 MHz) 256 (100 MHz) 256 (100 MHz) 256 (100 MHz)

Arbiter

UC UC b

Mem ory Managem ent

Radar Video Processing Subsystem

Advanced Noise Advanced Noise Reduction Techniques Reduction Techniques

e1,2 e0,5 e0,4 e0,3 e0,2 e2,4 e2,3 e2,2 e1,5 e1,4 e1,3 e3,2 e3,4 e3,3 e3,5 e2,5

Sweep Integration

Airport Surveillance Costal Surveillance

echo 9.170 GHz 9.438 GHz

Combiner (VP3)

Frequency Diversity

combiner

2 Ed Brinksma Car Periphery Supervision System: Case Study 3

CPS obtains and makes available for other systems information about environment of a car. This information may be used for:

Parking assistance Pre-crash detection Blind spot supervision Lane change assistance Stop & go Etc

Based on Short Range Radar (SRR) technology The CPS considered in this case study

One sensor group only (currently 2 sensors) Only the front sensors and corresponding controllers Application: pre-crash detection, parking assistance, stop & go

CPS: Informal description

Cybernetix:

Smart Card Personalization

Terma:

Memory Interface

Bosch:

Car Periphery Sensing

AXXOM:

Lacquer Production

Benchmarks

Case Studies

Überschrift Überschrift

05.06.2005 Axxom Software AG Seite: 3

Product flow of a Product

Laboratory Dispersion Dose Spinner Mixing Vessel Filling Stations Storage

CLASSI C CLASSI C CLASSI C CORA CORA CORA

slide-5
SLIDE 5

Informationsteknologi

UC UCb

slide-6
SLIDE 6

Informationsteknologi

UC UCb

Overview

Timed Automata & Scheduling Priced Timed Automata and Optimal Scheduling Optimal Infinite Scheduling Optimal Controller Synthesis Optimal Scheduling and Off-Line Test Generation

O p t i m a l S c h e d u l i n g U s i n g P r i c e d T i m e d A u t

  • m

a t a . G . B e h r m a n n , K . G . L a r s e n , J . I . R a s m u s s e n , A C M S I G M E T R I C S P e r f

  • r

m a n c e E v a l u a t i

  • n

R e v i e w

slide-7
SLIDE 7

Informationsteknologi

UC UCb

Rush Hour

OBJECTI VE: Get your CAR out OBJECTI VE: Get your CAR out Your CAR EXI T

slide-8
SLIDE 8

Informationsteknologi

UC UCb

Rush Hour

slide-9
SLIDE 9

Informationsteknologi

UC UCb

Rush Hour

slide-10
SLIDE 10

Informationsteknologi

UC UCb

Real Tim e Scheduling

5 10 20 25

UNSAFE SAFE

  • Only 1 “Pass”
  • Cheat is possible

(drive close to car with “Pass”)

  • Only 1 “Pass”
  • Cheat is possible

(drive close to car with “Pass”)

The Car & Bridge Problem CAN THEY MAKE I T TO SAFE WI THI N 70 MI NUTES ???

Crossing Times

Pass

slide-11
SLIDE 11

Informationsteknologi

UC UCb

Real Tim e Scheduling

SAFE

5 10 20 25

UNSAFE

Solve Scheduling Problem using UPPAAL Solve Scheduling Problem using UPPAAL

slide-12
SLIDE 12

Informationsteknologi

UC UCb

Steel Production Plant

Machine 1 Machine 2 Machine 3 Machine 4 Machine 5 Buffer Continuos Casting Machine Storage Place Crane B Crane A

  • A. Fehnker, T. Hune, K. G.

Larsen, P. Pettersson

Case study of Esprit-LTR

project 26270 VHS

Physical plant of SIDMAR

located in Gent, Belgium.

Part between blast furnace and

hot rolling mill. Objective: m odel the plant, obtain schedule and control program for plant.

Lane 1 Lane 2

slide-13
SLIDE 13

Informationsteknologi

UC UCb

Steel Production Plant

Machine 1 Machine 2 Machine 3 Machine 4 Machine 5 Buffer Continuos Casting Machine Storage Place Crane B Crane A

Input: sequence of steel loads (“pigs”).

@10 @20 @10 @10 @40

Load follows Recipe to

  • btain certain quality,

e.g: start; T1@10; T2@20; T3@10; T2@10; end within 120. Output: sequence of higher quality steel.

Lane 1 Lane 2 2 2 2

15 16 ∑=127

slide-14
SLIDE 14

Informationsteknologi

UC UCb

A single load (part of) A single load (part of) Crane B Crane B

UPPAAL UPPAAL UPPAAL

slide-15
SLIDE 15

Informationsteknologi

UC UCb

Controller Synthesis for LEGO Model

LEGO RCX

Mindstorms.

Local

controllers with control programs.

IR protocol for

remote invocation of programs.

Central

controller.

m1 m2 m3 m4 m5 crane a crane b casting storage buffer central controller

Synthesis

1971 lines of RCX code (n=5), 24860 - “ - (n=60).

slide-16
SLIDE 16

Informationsteknologi

UC UCb

Tim ed Autom ata

Synchronization Guard Invariant Reset

[ Alur & Dill’89]

Resource Sem antics: ( Idle , x= 0 ) ( Idle , x= 2.5) d(2.5) ( InUse , x= 0 ) use? ( InUse , x= 5) d(5) ( Idle , x= 5) done! ( Idle , x= 8) d(3) ( InUse , x= 0 ) use?

slide-17
SLIDE 17

Informationsteknologi

UC UCb

Com position

Resource Task Shared variable Synchronization Sem antics: ( Idle , Init , B= 0, x= 0) ( Idle , Init , B= 0 , x= 3.1415 ) d(3) ( InUse , Using , B= 6, x= 0 ) use ( InUse , Using , B= 6, x= 6 ) d(6) ( Idle , Done , B= 6 , x= 6 ) done

slide-18
SLIDE 18

Informationsteknologi

UC UCb

Jobshop Scheduling

Sport Economy Local News Comic Stip

Kim

  • 2. 5 min
  • 4. 1 min
  • 3. 3 min
  • 1. 10 min

Maria

  • 1. 10 min
  • 2. 20 min
  • 3. 1 min
  • 4. 1 min

Nicola

  • 4. 1 min
  • 1. 13 min
  • 3. 11 min
  • 2. 11 min

Problem: compute the minimal MAKESPAN

J O B s R E S O U R C E S

slide-19
SLIDE 19

Informationsteknologi

UC UCb

Jobshop Scheduling in UPPAAL

Sport Economy Local News Comic Stip

Kim

  • 2. 5 min
  • 4. 1 min
  • 3. 3 min
  • 1. 10 min

Maria

  • 1. 10 min
  • 2. 20 min
  • 3. 1 min
  • 4. 1 min

Nicola

  • 4. 1 min
  • 1. 13 min
  • 3. 11 min
  • 2. 11 min
slide-20
SLIDE 20

Informationsteknologi

UC UCb

Experim ents

B-&-B algorithm running for 60 sec. Lawrence Job Shop Problems Lawrence Job Shop Problems m= 5 j= 10 j= 15 j= 20 m= 10 j= 10 j= 15 [TACAS’2001]

slide-21
SLIDE 21

Informationsteknologi

UC UCb

Task Graph Scheduling

Optim al Static Task Scheduling

Task P= { P1,.., Pm} Machines M= { M1,..,Mn} Duration Δ : ( P×M) → N ∞ < : p.o. on P (pred.) A task can be executed

  • nly if all predecessors

have completed

Each machine can process

at most one task at a time

Task cannot be preempted.

P2 P1 P6 P3 P4 P7 P5

1 6 ,1 0 2 ,3 2 ,3 6 ,6 1 0 ,1 6 2 ,2 8 ,2

M = { M1,M2}

slide-22
SLIDE 22

Informationsteknologi

UC UCb

Task Graph Scheduling

Optim al Static Task Scheduling

Task P= { P1,.., Pm} Machines M= { M1,..,Mn} Duration Δ : ( P×M) → N ∞ < : p.o. on P (pred.) A task can be executed

  • nly if all predecessors

have completed

Each machine can process

at most one task at a time

Task cannot be preempted.

P2 P1 P6 P3 P4 P7 P5

1 6 ,1 0 2 ,3 2 ,3 6 ,6 1 0 ,1 6 2 ,2 8 ,2

M = { M1,M2}

slide-23
SLIDE 23

Informationsteknologi

UC UCb

Task Graph Scheduling

Optim al Static Task Scheduling

Task P= { P1,.., Pm} Machines M= { M1,..,Mn} Duration Δ : ( P×M) → N ∞ < : p.o. on P (pred.)

P2 P1 P6 P3 P4 P7 P5

1 6 ,1 0 2 ,3 2 ,3 6 ,6 1 0 ,1 6 2 ,2 8 ,2

M = { M1,M2}

slide-24
SLIDE 24

Informationsteknologi

UC UCb

Experim ental Results

Abdeddaïm, Kerbaa, Maler

slide-25
SLIDE 25

Informationsteknologi

UC UCb

Optim al Task Graph Scheduling

Pow er-Optim ality

Energy-rates:

C : M → NxN

P2 P1 P6 P3 P4 P7 P5

1 6 ,1 0 2 ,3 2 ,3 6 ,6 1 0 ,1 6 2 ,2 8 ,2

1 W 4 W 2 W 3 W

cost’= = 1 cost’= = 4

slide-26
SLIDE 26

Priced Tim ed Autom ata

Optim al Scheduling

slide-27
SLIDE 27

Informationsteknologi

UC UCb

Priced Tim ed Autom ata

Alur, Torre, Pappas (HSCC’01) Behrmann, Fehnker, et all (HSCC’01)

l1 l2 l3 x: = 0 c+ = 1 x · 2 3 · y c+ = 4 c’= 4 c’= 2

0 · y · 4 y · 4 x: = 0

Timed Automata + COST variable

cost rate cost update

slide-28
SLIDE 28

Informationsteknologi

UC UCb

Priced Tim ed Autom ata

Alur, Torre, Pappas (HSCC’01) Behrmann, Fehnker, et all (HSCC’01)

l1 l2 l3 x: = 0 c+ = 1 x · 2 3 · y c+ = 4 c’= 4 c’= 2

0 · y · 4 y · 4 x: = 0

Timed Automata + COST variable

cost rate cost update

(l1,x= y= 0) (l1,x= y= 3) (l2,x= 0,y= 3) (l3,_,_)

ε(3) 12 1 4

∑ c= 1 7

TRACES

slide-29
SLIDE 29

Informationsteknologi

UC UCb

TRACES

Priced Tim ed Autom ata

Alur, Torre, Pappas (HSCC’01) Behrmann, Fehnker, et all (HSCC’01)

l1 l2 l3 x: = 0 c+ = 1 x · 2 3 · y c+ = 4 c’= 4 c’= 2

0 · y · 4 y · 4 x: = 0

Timed Automata + COST variable

cost rate cost update

(l1,x= y= 0) (l1,x= y= 3) (l2,x= 0,y= 3) (l3,_,_) (l1,x= y= 0) (l1,x= y= 2.5) (l2,x= 0,y= 2.5) (l2,x= 0.5,y= 3) (l3,_,_) (l1,x= y= 0) (l2,x= 0,y= 0) (l2,x= 3,y= 3) (l2,x= 0,y= 3) (l3,_,_)

ε(3) ε(2.5) ε(.5) ε(3) 12 1 4 10 1 1 4 1 6 4

∑ c= 1 7 ∑ c= 1 6 ∑ c= 1 1

P r

  • b

l e m :

F i n d t h e m i n i m u m c

  • s

t

  • f

r e a c h i n g l

  • c

a t i

  • n

l

3

P r

  • b

l e m :

F i n d t h e m i n i m u m c

  • s

t

  • f

r e a c h i n g l

  • c

a t i

  • n

l

3

Efficient Implementation: CAV’0 1 and TACAS’0 4 Efficient Implementation: CAV’0 1 and TACAS’0 4

slide-30
SLIDE 30

Informationsteknologi

UC UCb

Aircraft Landing Problem

cost t E L T E earliest landing time T target time L latest time e cost rate for being early l

cost rate for being late

d fixed cost for being late e*(T-t) d+l*(t-T)

Planes have to keep separation distance to avoid turbulences caused by preceding planes

Runway

slide-31
SLIDE 31

Informationsteknologi

UC UCb

Planes have to keep separation distance to avoid turbulences caused by preceding planes

Runway 129: Earliest landing time 153: Target landing time 559: Latest landing time 10: Cost rate for early 20: Cost rate for late Runway handles 2 types of planes

Modeling ALP with PTA

slide-32
SLIDE 32

Sym bolic ”A* ”

slide-33
SLIDE 33

Informationsteknologi

UC UCb

Zones

Operations

x y Z

slide-34
SLIDE 34

Informationsteknologi

UC UCb

Priced Zone

x y

Δ4

2

  • 1

Z

2 2 + − = x y y x Cost ) , (

CAV’01

slide-35
SLIDE 35

Informationsteknologi

UC UCb

Branch & Bound Algorithm

slide-36
SLIDE 36

Experim ental Results

slide-37
SLIDE 37

Informationsteknologi

UC UCb

Experim ents

MC Order

COST-rates

G5 C1 B2 D2

5

SCHEDULE

COST TI ME

# Expl # Pop’d

1 1 1 1

CG> G< BG> G< GD>

55 65 252 378 1 20 30 40

BD> B< CB> C< CG>

975

1085

85

time< 85

  • 406

447 Min Tim e

CG> G< BD> C< CG>

60 1762

1538

2638 9 2 3 10

GD> G< CG> G< BG>

195 65 149 233 1 2 3 4

CG> G< BD> C< CG>

140 60 232 350 1 2 3 10

CD> C< CB> C< CG>

170 65 263 408

slide-38
SLIDE 38

Informationsteknologi

UC UCb

Example: Aircraft Landing

cost t E L T E earliest landing time T target time L latest time e cost rate for being early l

cost rate for being late

d fixed cost for being late e*(T-t) d+l*(t-T)

Planes have to keep separation distance to avoid turbulences caused by preceding planes

Runway

slide-39
SLIDE 39

Informationsteknologi

UC UCb

Example: Aircraft Landing

Planes have to keep separation distance to avoid turbulences caused by preceding planes

land! x >= 4 x=5 x <= 5 x=5 x <= 5 land! x <= 9 cost+=2 cost’=3 cost’=1 4 earliest landing time 5 target time 9 latest time 3 cost rate for being early 1 cost rate for being late 2 fixed cost for being late

Runway

slide-40
SLIDE 40

Informationsteknologi

UC UCb

Aircraft Landing

Source of examples: Baesley et al’2000

CAV’01

slide-41
SLIDE 41

Informationsteknologi

UC UCb

Branch & Bound Algorithm

Zone based Linear Program m ing Problem s

slide-42
SLIDE 42

Informationsteknologi

UC UCb

Zone LP Min Cost Flow

Exploiting duality

minimize 3 x 1-2 x 2+ 7 when x1-x2· 1 1· x2 · 3 x2≥ 1 minimize 3 y2 ,0-y0 ,2+ y1 ,2 – y0 ,1 when y2,0-y0,1-y0,2= 1 y0,2+ y1,2= 2 y0,1-y1,2= -3

slide-43
SLIDE 43

Informationsteknologi

UC UCb

Zone LP Min Cost Flow

Exploiting duality

minimize 3 x 1-2 x 2+ 7 when x1-x2· 1 1· x2 · 3 x2≥ 1 minimize 3 y2 ,0-y0 ,2+ y1 ,2 – y0 ,1 when y2,0-y0,1-y0,2= 1 y0,2+ y1,2= 2 y0,1-y1,2= -3

slide-44
SLIDE 44

Informationsteknologi

UC UCb

Aircraft Landing

Using MCF/ Netsim plex

Rasm ussen, Larsen, Subram ani TACAS0 4

slide-45
SLIDE 45

BRI CS@Aalborg FMT@Tw ente

Optimal Infinite Scheduling

w ith Ed Brinksm a Patricia Bouyer Arne Skou

slide-46
SLIDE 46

Informationsteknologi

UC UCb

EXAMPLE: Optimal WORK plan for cars with different subscription rates for city driving !

Golf Citroen BMW Datsun

9 2 3 10

5 10 20 25

maximal 100 min. at each location

slide-47
SLIDE 47

Informationsteknologi

UC UCb

W orkplan I

Golf

U

Citroen

U

BMW

U

Datsun

U

Golf

U

Citroen

U

BMW

S

Datsun

S

Golf

U

Citroen

U

BMW

U

Datsun

U

Golf

S

Citroen

U

BMW

S

Datsun

U

Golf

U

Citroen

U

BMW

U

Datsun

U

Golf

U

Citroen

S

BMW

U

Datsun

S

Golf

U

Citroen

U

BMW

U

Datsun

U

Golf

U

Citroen

S

BMW

U

Datsun

S ε(25) ε(25) ε(25) ε(25) ε(20) ε(20) ε(25) ε(25)

275 275 300 300 300 300 300 300 Value of workplan: (4 x 3 0 0 ) / 90 = 1 3 .3 3

slide-48
SLIDE 48

Informationsteknologi

UC UCb

W orkplan I I

Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun Golf Citroen BMW Datsun

25/ 125 5/ 25 20/ 180 10/ 90 5/ 10 25/ 125 10/ 130 5/ 65 25/ 225 10/ 90 10/ 0 10/ 0 5/ 10 25/ 50

Value of workplan: 5 6 0 / 100 = 5 .6

slide-49
SLIDE 49

Informationsteknologi

UC UCb

I nfinite Scheduling

E[ ] ( Kim.x · 100 and Jacob.x · 90 and Gerd.x · 100 )

slide-50
SLIDE 50

Informationsteknologi

UC UCb

I nfinite Optim al Scheduling

E[ ] ( Kim.x · 100 and Jacob.x · 90 and Gerd.x · 100 ) + m ost m inim al lim it

  • f cost/ tim e
slide-51
SLIDE 51

Informationsteknologi

UC UCb

Cost Optim al Scheduling = Optim al I nfinite Path

c1 c2 c3 cn t1 t2 t3 tn

σ

Value of path σ: val(σ) = limn→∞ cn/tn Optimal Schedule σ* : val(σ* ) = infσ val(σ)

Accumulated cost Accumulated time

¬(Car0.Err or Car1.Err or …)

slide-52
SLIDE 52

Informationsteknologi

UC UCb

Cost Optim al Scheduling = Optim al I nfinite Path

c1 c2 c3 cn t1 t2 t3 tn

σ

Value of path σ: val(σ) = limn→∞ cn/tn Optimal Schedule σ* : val(σ* ) = infσ val(σ)

Accumulated cost Accumulated time

¬(Car0.Err or Car1.Err or …)

THEOREM: σ* is computable THEOREM: σ* is computable

Bouyer, Brinksma, Larsen HSCC’04

slide-53
SLIDE 53

Informationsteknologi

UC UCb

Application

Dynam ic Voltage Scaling

slide-54
SLIDE 54

Informationsteknologi

UC UCb

Dynam ic Scheduling

E< > ( Kim.Done and Jacob.Done and Gerd.Done ) + w inning / optim al strategy

Uncontrollable tim ing uncertainty

Time-Optimal Reachability Strategies for Timed Games [ Cassez, David, Fleury, Larsen, Lime, CONCUR’05] Cost-Optimal Reachability Strategies for Priced Timed Game Automata [ Alur et all, ICALP’04] [ Bouyer, Cassez. Fleury, Larsen, FSTTCS’04]