4 castellano 2015-facas-latencydc.exa.unrc.edu.ar/facas2015/sites/default/files/ezequiel... ·...

24
Discretely Faster Improving Controller Latency in Discrete Controller Synthesis Ezequiel Castellano Universidad de Buenos Aires, Argentina in collaboration with V. Braberman, N. D’Ippolito, S. Uchitel,

Upload: phungthuy

Post on 25-Nov-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Discretely FasterImproving Controller Latency in Discrete Controller

Synthesis

Ezequiel Castellano Universidad de Buenos Aires, Argentina

in collaboration with V. Braberman, N. D’Ippolito, S. Uchitel,

Controller Synthesis Problem

E || xi ⊨ G

x1,x2,x3,x4,…,xn-1,xn

Motivating Example Possible Solutions

Robot 1

Robot 2

Position A

Position B

Flying Area 1

Flying Area 2

Motivating Example Possible Solutions

E || xi ⊨ GR1

R2

Pos. A

Pos. BR1

R2Pos. A

Pos. B

Motivating Example Possible Solutions

E || xi ⊨ GR1

R2

Pos. A

Pos. B Robot 1 at Pos A and

Robot 2 at Pos B

forall f: Flying Area #robots(f) <= 1

Motivating Example Possible Solutions

E || xi ⊨ G

R1

R2Pos. A

Pos. B

R1

R2Pos. A

Pos. B

R1

R2Pos. A

Pos. B

T = R2toB + R1toAR1

R2Pos. A

Pos. B

Motivating Example Possible Solutions

E || xj ⊨ G

R1

R2Pos. A

Pos. B

T = R2toB or R1toA

R1

R2

Pos. A

Pos. B

R1

R2

Pos. A

Pos. B

Hard Goals vs Soft GoalsMove R1 to A and R2 to B

avoiding crashes

forall f: Flying Area#robots(f) <= 1

R1 at Pos Aand

R2 at Pos B

Move R1 to A Move R2 to B

Move R2 (FA2) to B

Air Trafic Control

Robot 1 Move R2 (FA1) to B

Robot 2

Lower Latency

+ -

sR1.a1.pA eR1.a1.pA

Symbolic Interpretation of Time

u<=0

[u=0]sR1.a1.pB

{u,x1}

[x1=T1]eR1.a1.pB

{u}x1<=T1 u<=0{u} u<=0

[u=0]sR1.a1.pB

{u,x1}

[x1=T1]eR1.a1.pB

{u}x1<=T1 u<=0u<=0[u=0]

sF{u, xf}

u<=0[xf=Tf]

eF{u}{u}

Time

Latencyt0 tf

Latencyt0 tf

Non transient Transient

robot 1

flying area 1

position AR1.a1.pA

reseted clocks

condition invariant

Time in LTS Measuring and Comparing

Time

Latencyt0 tf

u<=0

[Xa=Ta]eR1.a1.pA

{u}[u=0]

sR2.a2.pB{u,Xb}

[u=0]sR1.a1.pA{u,Xa}

[Xb=Tb]eR2.a2.pB

{u}

u<=0

Xb<=TbXa<=Ta

u<=0

Xb<=Tb

[Xb=Tb]eR2.a2.pB

{u}

Xb<=Tb

[Xb=Tb]eR2.a2.pB

{u}

[u=0]sR1.a1.pA{u,Xa}

[Xa=Ta]eR1.a1.pA

{u}

u<=0

u<=0

u<=0[u=0]

sF{u, xf}{u}

[xf=Tf]eF{u}

Transient

Non transient

Time in LTS Measuring and Comparing

Time

Latencyt0 tf

u<=0

[Xa=Ta]eR1.a1.pA

{u}[u=0]

sR2.a2.pB{u,Xb}

[u=0]sR1.a1.pA{u,Xa}

[Xb=Tb]eR2.a2.pB

{u}

u<=0

Xb<=TbXa<=Ta

u<=0

Xb<=Tb

[Xb=Tb]eR2.a2.pB

{u}

Xb<=Tb

[Xb=Tb]eR2.a2.pB

{u}

[u=0]sR1.a1.pA{u,Xa}

[Xa=Ta]eR1.a1.pA

{u}

u<=0

u<=0

u<=0[u=0]

sF{u, xf}{u}

[xf=Tf]eF{u}

(Ta<=Tb and

Tf =Tb)

(Ta<=Tb and Tf =Tb)

Time in LTS Measuring and Comparing

Time

Latencyt0 tf

u<=0

[Xa=Ta]eR1.a1.pA

{u}[u=0]

sR2.a2.pB{u,Xb}

[u=0]sR1.a1.pA{u,Xa}

[Xb=Tb]eR2.a2.pB

{u}

u<=0

Xb<=TbXa<=Ta

u<=0

Xb<=Tb

[Xb=Tb]eR2.a2.pB

{u}

Xb<=Tb

[Xb=Tb]eR2.a2.pB

{u}

[u=0]sR1.a1.pA{u,Xa}

[Xa=Ta]eR1.a1.pA

{u}

u<=0

u<=0

u<=0[u=0]

sF{u, xf}{u}

[xf=Tf]eF{u}

(Tb<=Ta and

Tf =Ta)

(Ta<=Tb and Tf =Tb)

(Tb<=Ta and Tf =Ta)

Time in LTS Measuring and Comparing

Time

Latencyt0 tf

u<=0

[Xa=Ta]eR1.a1.pA

{u}[u=0]

sR2.a2.pB{u,Xb}

[u=0]sR1.a1.pA{u,Xa}

[Xb=Tb]eR2.a2.pB

{u}

u<=0

Xb<=TbXa<=Ta

u<=0

Xb<=Tb

[Xb=Tb]eR2.a2.pB

{u}

Xb<=Tb

[Xb=Tb]eR2.a2.pB

{u}

[u=0]sR1.a1.pA{u,Xa}

[Xa=Ta]eR1.a1.pA

{u}

u<=0

u<=0

u<=0[u=0]

sF{u, xf}{u}

[xf=Tf]eF{u}

(Ta<=Tb and Tf =Tb) or

(Tb<=Ta and Tf=Ta) or

(Tb=0 and Tf=Ta)

(Tb=0 and

Tf=Ta)

(Ta<=Tb and Tf =Tb)

(Tb<=Ta and Tf =Ta)

(Tb=0 and Tf=Ta)

Robot 1

Robot 2

Position A

Flying Area 3

Motivating Example Possible Solutions

Flying Area 1

Flying Area 2

Position CGo to

Position C

Position B

Comparing Symbolic Time Expressions

SAT or

UNSATZ3

Symbolic Time Expression C1σi Symbolic Time

Expression C2σi

tf1 > tf2 tf1 < tf2Question

Comparing Symbolic Time Expressions

SAT or

UNSATZ3

Symbolic Time Expression C1σi Symbolic Time

Expression C2σi

tf1 > tf2 tf1 < tf2

Time in LTS Comparing Symbolic Time Expressions

Tf2 =Tb + Ta

Or(And(Ta<=Tb,Tf1 =Tb), And(Tb<=Ta,Tf1=Ta), And(Tb=0,Tf1=Ta))

Tf1 > Tf2 Tf1 < Tf2 Z3 ¿∃ (Ta,Tb,Tf1,Tf2)?

UNSAT SAT

Tb=1,Ta=1,Tf1=1,Tf2=2

σ 1

C1σ1 is better than

C2σ1

Time in LTS Comparing Symbolic Time Expressions

Or(And(Tc <=Ta,Tf2=Ta + Tb + Tc), And(Ta <=Tc,Tf2=Ta + Tb + Tc),

And(Tb=0,Tf2=Ta + Tc), And(Tc=0,Tf2 =Ta + Tb))

Or(And(Tb=Ta,Tf1=Tb+Tc), And(Tb=0,Ta<=Tc,Tf1=Tc),

And(Tb+Tc<=Ta,Tf1=Ta),And(Tb=0,Ta=0,Tf1=Tc), And(Tb=0,Tc<=Ta,Tf1=Ta), And(Tb=0,Tc=0,Tf1=Ta),

And(Ta<=Tb+Tc,Tf1=Tb+Tc))

C1σ2 is better than

C2σ2

Tf1 > Tf2 Tf1 < Tf2 Z3 ¿∃ (Ta,Tb,Tc,Tf1,Tf2)? UNSAT SAT

Tc=1,Tb=1,Ta=1,Tf1=2,Tf2=3

σ 2

C1 is better than

C2

Cost of Comparing• Existential in the Symbolic Expressions

• Generate all,

- the solutions for the problem

- the schedulers

• Comparison between two expressions

Heuristics

• Minimise controller’s waits

- Non-transient states

• Maximise concurrency

- Fluents representing each activities

Where we are?• Parametric timed interpretation of LTS

• Comparison of the symbolic metric

• Heuristics to produce lower-latency controllers

- Minimise controllers wait

- Maximise concurrency

Future Work

Future Work• Support for wider range of

- hard goals (e.g. SGR(1))

- soft goals (e.g. throughput)

• Improve activities time information

- Heuristics

- Comparison

• Explore the space of the solutions

- Controllers

- Schedulers

• Multiple preferences

- Priorities

Muchas gracias