Title: Integrating HLA with Scilab
1Integrating HLA with Scilab
- Thitima Theppaya, Pichaya Tandayya, Chatchai
Jantaraprim - Department of Computer Engineering,
- Faculty of Engineering,
- Prince of Songkla University,Thailand
2Integrating HLA with Scilab 05F-SIW-010
Outline
- Motivation
- Aims
- HLA Introduction
- HLA Background
- Scilab and its Interface
- The HLA Integration
- Test Simulation Model
- Conclusions and Future Works
3 Motivation
- Most simulation developers are not computer
engineers or - computer scientists, so do not have detailed
programming knowledge. - As a consequence, this group usually prefers to
use mathematical and engineering tools,
ready-made functions, that do not require
programming. - Scilab can help create complex graphical and
mathematical models or objects used in virtual
environments.
Integrating HLA with Scilab 05F-SIW-010
4Integrating HLA with Scilab 05F-SIW-010
Outline
- Motivation
- Aims
- HLA Introduction
- HLA Background
- Scilab and its Interface
- The HLA Integration
- Test Simulation Model
- Conclusions and Future Works
5 Aims
- The integration enables Scilab users to apply
simulation techniques to larger and more complex
interactive models using networked computers. - This work will allow developments of low cost
distributed interactive applications with Scilab.
Integrating HLA with Scilab 05F-SIW-010
6Integrating HLA with Scilab 05F-SIW-010
Outline
- Motivation
- Aims
- HLA Introduction
- HLA Background
- Scilab and its Interface
- The HLA Integration
- Test Simulation Model
- Conclusions and Future Works
7 HLA Introduction
- The Standard HLA has capability to implement
distributed interactive simulations - - enables developer to reuse current
simulation to new simulation - - allows interoperability between different
system or - programming language
Integrating HLA with Scilab 05F-SIW-010
8Integrating HLA with Scilab 05F-SIW-010
Outline
- Motivation
- Aims
- HLA Introduction
- HLA Background
- Scilab and its Interface
- The HLA Integration
- Test Simulation Model
- Conclusions and Future Works
9HLA Background
The HLA consists of simulation rules, Object
Model Template (OMT) and interface specification.
- The local RTI component consists of RTI library
(libRTI). - The central RTI components are RTIExec and
FedExec.
Integrating HLA with Scilab 05F-SIW-010
10Integrating HLA with Scilab 05F-SIW-010
Outline
- Motivation
- Aims
- HLA Introduction
- HLA Background
- Scilab and its Interface
- The HLA Integration
- Test Simulation Model
- Conclusions and Future Works
11Scilab and its Interface
The structure of Scilab. Developers can add
libraries from external programs.
Integrating HLA with Scilab 05F-SIW-010
12Scilab and its Interface (cont)
The interaction between Scilab and an external
program via a gateway file.
- The intersci tool in Scilab was used to
- create a gateway file for transferring input and
output between the Scilab and the external
program. - create a dynamic library for loading functions
from the external program into Scilab.
Integrating HLA with Scilab 05F-SIW-010
13Integrating HLA with Scilab 05F-SIW-010
Outline
- Motivation
- Aims
- HLA Introduction
- HLA Background
- Scilab and its Interface
- The HLA Integration
- Test Simulation Model
- Conclusions and Future Works
14The HLA Integration
- The HLA module composes of
- gateway file for calling the HLA module in
Scilab. - - The gateway function receives and checks
parameters, then creates variables for Scilab. - operation file for calling the RTI via
RTIambassador. - callback file for the RTI to call the Scilab
functions, via FederateAmbassador.
Integrating HLA with Scilab 05F-SIW-010
15The HLA Integration (cont)
- The interface sequence between Scilab and RTI
The Gateway file checks parameters received from
Scilab before passing them to the operation file.
Integrating HLA with Scilab 05F-SIW-010
16The HLA Integration (cont)
- The languages interface used in the system
The C program receives the callback return
value reflected from the RTI via
FederateAmbassador, and wraps it in a call to a C
interface.
Integrating HLA with Scilab 05F-SIW-010
17Integrating HLA with Scilab 05F-SIW-010
Outline
- Motivation
- Aims
- HLA Introduction
- HLA Background
- Scilab and its Interface
- The HLA Integration
- Test Simulation Model
- Conclusions and Future Works
18Test Simulation Model
The HLA module interface in Scilab.
Integrating HLA with Scilab 05F-SIW-010
19Test Simulation Model (cont)
- Scenario of the test federation
- The testing problem is to find routes across
city maps. - The federates represent city tourist offices for
travellers. - Each federate has its own city map, represented
by a graph, and provides a collection of maps for
nearby cities. - Each federate must subscribe to map updates from
the - other cities since maps can be dynamically
updated. - The distributed graphs consist of nodes and
connecting routes. - Each graph represents a city map running on a
Scilab federate.
Integrating HLA with Scilab 05F-SIW-010
20Test Simulation Model (cont)
Each graph is composed of - nodes
representing places in the city - routes
connection nodes, which represent roads.
Integrating HLA with Scilab 05F-SIW-010
21Test Simulation Model (cont)
- The objects are the map, and the attributes are
the nodes and routes. - The interaction is made by sharing the attributes
of objects running in the federation.
Integrating HLA with Scilab 05F-SIW-010
22Test Simulation Model (cont)
- Interaction in the test simulation model
Data exchange amongst federates
Integrating HLA with Scilab 05F-SIW-010
23Test Simulation Model (cont)
- Collaboration of the distributed Scilab models
using - HLA Join and leave
Some functions have been combined, e.g.,
rtiAmb.createFederationExecution(),
rtiAmb.joinFederationExecution() replaced by
gen_and_join()
Integrating HLA with Scilab 05F-SIW-010
24Test Simulation Model (cont)
- Collaboration of the distributed Scilab models
using - HLA Update
Sequence diagram of the update process.
Integrating HLA with Scilab 05F-SIW-010
25Integrating HLA with Scilab 05F-SIW-010
Outline
- Motivation
- Aims
- HLA Introduction
- HLA Background
- Scilab and its Interface
- The HLA Integration
- Test Simulation Model
- Conclusions and Future Works
26Conclusions
- HLA module from integration of the HLA with
Scilab can enable Scilab to carry out distributed
interactive simulation. - Necessary RTI library services have been
implemented - and tested.
- Scilab can participate in distributed
interactive simulations using HLA through the
RTI, and publish object attributes over the
network. - Our Scilab HLA module does not affect the
standard Scilab functions.
Integrating HLA with Scilab 05F-SIW-010
27Future Work
- There are more HLA services to be tested,
including data distribution management, time
management and ownership management.
Integrating HLA with Scilab 05F-SIW-010