Recent Changes - Search:

PmWiki

pmwiki.org

edit SideBar

hlacerti in Ptolemy

hlacerti Components

When using the hlacerti framework, a federate is a Ptolemy model extended with the addition of three components: the decorator HlaManager and actors HlaPublisher and HlaSubscriber.

Decorates time updating in Ptolemy using HLA time management
Send TSO messages (UAV) through the RTI
Receive TSO messages (RAV) from the RTI

A Ptolemy federate also needs a .fed file containing the name of the federation and all attributes that will be published and/or subscribed by the federates.

Creating a Ptolemy federate

A federation can be created by splitting a centralized Ptolemy model in several federates. A federate Aircraft is created from a (opaque) composite actor AircraftAAct (Continuous director) by following these steps:

  1. Create a new model with a DE director and copy AircraftSAct inside.
  2. Add a HlaManager decorator,
  3. Add a HlaSubscriber (or HlaAttributeReflector) actor to each input port of AircraftSAct,
  4. Add a HlaPublisher (or HlaAttributeUpdater) actor to each output port of AircraftSAct,

See the documentation of HlaAttributeReflector, HlaAttributeUpdater and HlaManager actors for more information. See also the manual.


Figure 1: Inside a Ptolemly federate.

A Ptolemy federate in a Distributed Simulation

A Ptolemy federate can automaticaly launches the rtig process (if no one is running) with the .fed file name as a parameter.

Figure 2 shows a federation with 3 federates -- a Ptolemy federate, a C++ federate and a Java federate -- running in one computer called host. The rtig also run in the same computer; it can be launched by the user in a terminal or automatically by the first Ptolemy federate (by setting the parameter launchRTIG in the HlaManager). The environment variable $CERTI_HOST must be set to $localhost.


Figure 2: A federation running in one computer.

Figure 3 shows the same federation running over 4 computers: the rtig is launched by the user on host1 and each federate run in a different computer. In the other three computers, $CERTI_HOST must be set to host1. The rtig is not launched automatically in host2 since $CERTI_HOST=host1.


Figure 3: A federation running over 4 computers.

You can check here how run Ptolemy demos in one or more computers and here for creating a hlacerti federation.

Edit - History - Print - Recent Changes - Search
Page last modified on June 05, 2019, at 03:32 pm