• Aucun résultat trouvé

Adding time-step time management to a distributed Ptolemy-HLAcerti framework

N/A
N/A
Protected

Academic year: 2021

Partager "Adding time-step time management to a distributed Ptolemy-HLAcerti framework"

Copied!
29
0
0

Texte intégral

(1)

Any correspondence concerning this service should be sent to the repository administrator: staff-oatao@listes-diff.inp-toulouse.fr

Open Archive TOULOUSE Archive Ouverte (OATAO)

OATAO is an open access repository that collects the work of Toulouse researchers and makes it freely available over the web where possible.

This is an author-deposited version published in: http://oatao.univ-toulouse.fr/

Eprints ID: 16668

To cite this version: Li, Yanxuan and Cardoso, Janette and Siron, Pierre Adding time-step

time management to a distributed Ptolemy-HLAcerti framework. (2015) In: 11th Biennial

(2)

Adding Time-Step Management to

Distributed Ptolemy-HLAcerti framework

Yanxuan LI, Janette Cardoso, Pierre Siron

11th Biennial Ptolemy Miniconference

Berkeley, October 16, 2015

(3)

Plan

• Introduction

• High Level Architecture (HLA-CERTI)

• PTII-HLA Framework

• Example Producer/consumer (NER, TAR)

• Conclusion & Perspectives

(4)

3

Distributed Simulation

• System itself is distributed

WHY ?

• System is too complex and/or too much models

– Reduce the simulation time – Enable larger simulations

– Integrate several (different) simulators into a single simulation environment.

Physical System

(5)

4

Cyber-Physical System

HMI Control Propeller Engine Computer Science Control Physics

≠ disciplines

Cyber Flight dynamics Flight Dynamics IMU Ultrason Sensors

WP

• Heterogeneous models

(6)

5

HLA High Level Architecture

High Level Architecture for distributed discrete event simulations

IEEE standard (1516)

Interoperability and reuse

FOM Federation

Object Model

(Object: Class, Attribute)

Federate = Simulator

(7)
(8)

7

HLA Time Management

.

Time Advancing mechanisms: the

federation will be conservative, de

terministic and repeatable.

The federates can be:

Time-Stepped (TAR)

Event-Driven (NER)

Federate RTI timeAdvanceRequest (TAR) or

nextEventRequest (NER) timeAdvanceGrant (TAG)

UAV(object,attribute,timestamp)

RAV(object,attribute,timestamp)

reflectAttributeValues (RAV) updateAttributeValues (UAV) Federate f1 Federate f2 RTI

HLA Object Management

subscribeObjectClassAttribute() publishObjectClass()

(9)

8

HLA Time Management

Federate

RTI

timeAdvanceRequest (TAR)

or

nextEventRequest (NER) timeAdvanceGrant (TAG)

reflectAttributeValues (RAV) updateAttributeValues (UAV)

Federate f1 Federate f2

RTI

(10)

Bridges between PTII and HLA standard

9

PTII HLA standard

Model Instance Federate

Model Time: t Logical Time: Lt

Data (Token) Data (Attribute of an object class instance)

Event e(t, n, val) Event e(obj, val, Lt)

Director advances time RTI advances time

Input & Output ports HlaPublisher + HlaSubscriber (UAV+RAV)

Time Management

Time advancing in Ptolemy > uses the advancing time services of HLA

Interface between DE director and RTI: decorator HlaManager

Object Management -> actors for translating:

A ptII-event from an out-port to a UAV service: new actor HlaPublisher

(11)

PtII-HLA framework

10

e(t, n, val)

Run-Time Infrastructure (RTI) : CERTI

e(t''=frav (guav(Lt')) n, val)

RAV(o1,val,Lt') UAV(o1,val,Lt'= guav (fuav(t))

(12)

PtII-HLA framework

11

Run-Time Infrastructure (RTI) : CERTI

RAV(o1,val,Lt') UAV(o1,val,Lt'= guav (fuav(t)))

Ptolemy

HLA in PtII

HLA

t

ptII

t

hla

Lt

t

nextPointInTime_hla

= t

current_hla

+ T

s_hla

Time lines

(13)

PtII-HLA framework

12

Receiving

Sending

(14)

13

Events processing

Run-Time Infrastructure (RTI) : CERTI

CalendarQueue

e3(t3, n3, val3, Actor3) preUAV1(t1,n1,val1,HlaPub)

UAV(o1,val1,Lt1= guav (fuav(t1)))

(15)

14

Events processing

HLA in PtII

pUAV1(fuav(t1)), val1)

Run-Time Infrastructure (RTI) : CERTI UAV(o1,val1,Lt1= guav (fuav(t1)))

CalendarQueue

e3(t3, n3, val3, Actor3) preUAV1(t1,n1,val1,HlaPub)

t1 t2’ t3

preUAV1

pUAV1 pRAV2’

folRAV2’ e3

f

uav

: t

preUAV

-> t

uav

NER : f

uav

(t) = t + lah

• TAR :

f

uav

(t) =

t t, otherwisecurrent_hla+lah, if t < tcurrent_hla + lah

(16)

15

Events processing

Run-Time Infrastructure (RTI) : CERTI

RAV(o1,val1,Lt1) UAV(o1,val1,Lt1= guav (fuav(t1)))

CalendarQueue HLA in PtII

pRAV1(fuav(t1), val1)

(17)

16

Events processing

HLA in PtII

Run-Time Infrastructure (RTI) : CERTI

folRAV1(t1’’ =f rav(fuav(t 1)),n1, val1)

RAV(o1,val1,Lt1) UAV(o1,val1,Lt1= guav (fuav(t1)))

pRAV1(t1’=fuav(t1), val1)

frav(fuav(t1)) pRAV1 folRAV1

CalendarQueue

folRAV1(frav(t1’),n1,val1,HlaSub)

f

rav

: t

rav

-> t

folRAV

NER : f

rav

(t) = t

TAR : f

rav

(t) = t

nextPinTime_hla

, if t ]t

current_hla

t

nextPInTime_hla

]

t if t> t

nextPointInTime_hla

preUAV1(t1, n1, val1)

(18)

17

Data Management with timestamps

• Time "synchronization"

– A local PtII event is safely computed if no (external) HLA events can arr

ive with a smaller timestamp

– A PtII federate declares its time advancement proposal to the federati

on through

proposeTime

()

(19)

Distributed Producer/Consumer

18

e1(9, 1, 1.0), e2(15, 1, 2.0) e3(19, 1, 3.0), e4(39, 1, 4.0)

TAR

f

uav

(t) = t

f

rav

(t) = t

nextPinTime_hla

NER

(20)

19

Conclusion

• An easy way to produce a HLA federate from a Ptolemy model

• A way to distribute the execution of a Ptolemy model + hardware-in-the-loop

• Time management extend for time-stepped federates (TAR mechanism)

• On-going work, started with

G. Lasnier, J. Cardoso, P. Siron, C. Pagetti and P.Derler. Dis tributed simulation of heterogeneous and real-time systems. In DS-RT13.

Perspectives

• Compare TAR and NER performance and define related applications

• Implement TARA and NERA mechanisms: TAR and NER with lookahead = 0.

• Make a more complex application: multi-periodic flight controller ROSACE (Res

(21)

20

(22)

Distributed Simulation

21

e1(9, 1, 1.0), e2(15, 1, 2.0), e3(19, 1, 3.0), e4(39, 1, 4.0) preUAV1 pUAV1 pRAV1 folRAV1 Events List e1(10, 1, 0.5) Events List Ts = 10, lah= 0.1, TAR

(23)

e1(10, 1, 0.5), e2(20, 1, 1.0), e3(20, 2, 1.5) e1(10, 1, 0.5)

Distributed Simulation

22

e1(9, 1, 1.0), e2(15, 1, 2.0), e3(19, 1, 3.0), e4(39, 1, 4.0) preUAV1 pUAV1 pRAV1 folRAV1 preUAV2 pUAV2 preUAV3 pUAV3 pRAV2 pRAV3 folRAV2folRAV3 Events List Events List Ts = 10, lah= 0.1, TAR

(24)

Distributed Simulation

23

e1(9, 1, 1.0), e2(15, 1, 2.0), e3(19, 1, 3.0), e4(39, 1, 4.0) preUAV1 pUAV1 pRAV1 folRAV1 preUAV2 pUAV2 preUAV3 pUAV3 pRAV2 pRAV3 preUAV4 folRAV2folRAV3 pUAV4 pRAV4 folRAV3 Events List e1(10, 1, 0.5), e2(20, 1, 1.0), e3(20, 2, 1.5), e4(40, 1, 2.0) Events List Ts = 10, lah= 0.1, TAR e1(10, 1, 0.5), e2(20, 1, 1.0), e3(20, 2, 1.5)

(25)

Conclusion

24

Algorithms of time management

Algorithms HLA HLA/C

ERTI PTII/HLA

Optimistic Jefferson 85 X Non Non

Conservative

1st generation Chandy, Misra & Bryan 79(lookahead > 0) X X X

Conservative

2nd generation State global computation, Mattern X Non Other RTI?

(26)

HLA-CERTI

25

Superdense time?

– In accordance with the HLA standard, time represe

ntation could be PtII superdense time

• A requirement ?

• Requires very high C++ skills

– Sometimes, events with the same HLA timestamp

are transformed in events with different PtII timest

amps

– Actor's ranking

• Lost in the distribution

• Problems for an automatic distribution of PtII (work in p

rogress)

(27)

26

Reference

1. R. M. Fujimoto. Time Management in the high level architecture

2. G. Lasnier, J. Cardoso, P. Siron, C. Pagetti and P.Derler. Distributed simulation of heterogeneou s and real-time systems. In DS-RT13

3. U. of Berkeley. The ptolemy project. http://ptolemy.eecs.berkeley.edu/ptolemyII/index.htm

4. ONERA. Certi. http://www.nongnu.org/certi/certi_doc/Install/html/intro.html

5. D. Come. Improving hla-ptolemy co-simulation framework.

(28)

27

HLA Time Management

Distributed Events Ordering <->

Time Management <->

.

Time Advancing mechanisms

The federation will be conservative, deter

ministic and repeatable.

The federates can be:

Time-Stepped (TAR)

Event-Driven (NER)

Federate RTI timeAdvanceRequest (TAR) or

nextEventRequest (NER) timeAdvanceGrant (TAG)

reflectAttributeValues (RAV) updateAttributeValues (UAV)

Federate f1 Federate f2

RTI

HLA Object Management

UAV(object,attribute,timestamp)

RAV(object,attribute,timestamp)

(29)

28

Data & Time Management

• Time "synchronization"

– A local PtII event is safely computed if no (external) HLA events can arr

ive with a smaller timestamp

– A PtII federate declares its time advancement proposal to the federati

on through

proposeTime

()

Références

Documents relatifs

We have to deploy our custom image on the nodes (with the extra option --multi-server passed to kadeploy3), disable the extra cores, connect to a deployed node, run the benchmark,

Fistule fessière droite + diarrhées Douleur abdominale diffuse + Syndrome occlusif Douleur abdominale diffuse + Syndrome occlusif + Vomissements alimentaires Masse et

In this paper we present DiCEPE, a platform that focuses on the integration of CEP engines in distributed systems, and which is capable of using various communication protocols in

Taking into account the above, distributed applications and satisfying real-time, the ANIMO framework has been developed based on open standard of the Data Distribu- tion Service

Based on the w  c prov standard, we propose a loosely coupled architecture that offers a Memento interface to any Linked Data service publishing provenance..

A real-time database is by definition a database system. It then has queries, schemas, transactions, commit protocols, concurrency control support, and storage

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des

In most Navier-Stokes explicit and parallel solvers, a domain decomposition method is used to split the overall computational domain into several blocks (noted B j ).. Each block