Edb 0
Edb 0
Edb 0
Paolo Bocciarelli
Andrea DAmbrogio
Andrea Giglio
ABSTRACT
The development of complex systems requires the use of quantitative analysis techniques to allow a designtime evaluation of the system behavior. In this context, distributed simulation (DS) techniques can be
effectively introduced to assess whether or not the system satisfies the user requirements. Unfortunately,
the development of a DS requires the availability of an IT infrastructure that could not comply with
time-to-market requirements and budget constraints. In this respect, this work introduces HLAcloud, a
model-driven and cloud-based framework to support both the implementation of a DS system from a SysML
specification of the system under study and its execution over a public cloud infrastructure. The proposed
approach, which exploits the HLA (High Level Architecture) DS standard, is founded on the use of model
transformation techniques to generate both the Java/HLA source code of the DS system and the scripts
required to deploy and execute the HLA federation onto the PlanetLab cloud-based infrastructure.
1
INTRODUCTION
Modeling and simulation represents a valuable time- and cost-effective alternative to carrying out experiments
and measurements on existing systems and/or real-world phenomenons. In the systems engineering domain,
the design and the implementation of complex, large-scale and heterogeneous systems claim for advanced
quantitative analysis techniques to allow an early evaluation of the system behavior, in order to assess, before
implementation, whether or not the system accomplishes the stakeholder requirements and constraints.
Due to the intrinsic distributed nature of such complex systems, which are often composed of several
subsystems, distributed simulation (DS) may be effectively introduced to enact a design-time evaluation of
the system behavior. Thus, the adoption of DS-based analysis techniques can be seen as a valuable strategy
both to cut the cost of developing experimental prototypes and to mitigate the risk of time/cost overrun
due to re-designing and re-engineering a system that does not provide the required quality.
In addition, the use of a DS-based approach may enact the reuse of already existing simulation
components by taking advantage of the interoperability properties provided by the widely used HLA (High
Level Architecture) DS standard, which makes possible federating newly developed components with reused
ones.
Finally, the ever growing complexity of modern systems often requires computational capabilities that
make impracticable the use of sequential simulation approaches.
Unfortunately, the use of DS in a system development lifecycle can be a challenging issue due to the
fact that: i) the use of DS frameworks and standards requires significant and specific technical skills system
engineers are usually not familiar with; ii) the development of a DS requires the availability of an appropriate
IT infrastructure that could not comply with time-to-market requirements and budget constraints.
1371
1372
RELATED WORK
To the best of our knowledge, no contribution can be found that specifically deals with both the provisioning
of simulation services by use of a cloud computing infrastructure and the model-driven automated implementation and deployment of DS code from system specifications, even though model-based approaches to
the generation of simulation models from SysML models can be found in, e.g., (Schonherr and Rose 2009).
In this respect, as stated in Section 1, this work extends and improves our previous contribution (Bocciarelli,
DAmbrogio, and Fabiani 2012), which introduced a model-driven method for the generation of executable
HLA code from a SysML specification. The HLAcloud framework adopts a workflow that redesigns the
one proposed in our past work according to the IEEE Recommended Practice for Distributed Simulation
Engineering and Execution Process (DSEEP) (IEEE 2010d). Moreover, the existing model-to-model and
model-to-text transformations have been extended both to allow the integration with the PlanetLab cloud
infrastructure and to exploit the enhancements promoted by the novel HLA-Evolved standard (IEEE 2010a).
The provision of simulation systems according to a SaaS paradigm has been addressed by various
contributions, such as in (Marr, Storey, Biles, and Kleijnen 2000) and (Xie, Teo, Cai, and Turner 2005).
In (Marr, Storey, Biles, and Kleijnen 2000) a java-based architecture for carrying out web-based
simulations with the execution of replicated experiments on networks of processors is proposed. In
(Xie, Teo, Cai, and Turner 2005) an extension of the HLA standard is introduced, in order to support
the provisioning of HLA-based distributed simulation services on the grid. More specifically, such a
contribution introduces an architectural framework in which the RTI-federate interactions are mediated by
a proxy and the RTI services are exposed as Grid services. Differently from such contribution, this work is
based on the HLA-Evolved standard without requiring extensions to enact the cooperation of HLA-based
federates available either in a cloud infrastructure or in the Web.
The specific adoption of a cloud infrastracture to provide distributed simulation services is a novel
issue that has just recently started to be addressed, such as in (Fujimoto, Malik, and Park 2010) and
(Tsai et al. 2011). In (Fujimoto, Malik, and Park 2010) the authors argue that cloud computing eases
the use of distributed simulation techniques as it eliminates the need to purchase, operate and maintain
the needed computational infrastructure at the local site. Moreover, the cloud computing paradigm allows
to provide distributed simulation software as-a-service without dealing with the several complications of
executing distributed simulation code, offering the potential to exploit this technology in an effective and
effortless way. In (Tsai et al. 2011) a multi-tenancy architecture is introduced for providing simulation
services according to a SaaS delivery paradigm. Specifically, such contribution focuses on the definition
of an ontology and a set of tenant policies to support the creation of flexible simulation models able to
satisfy the requirements of different tenants. Similarly to such contributions, this work aims to propose a
framework to provide innovative simulation services built on top of a cloud infrastructure. Nevertheless,
in this work model-driven techniques are used to generate federates from SysML specifications and to
execute the related federation onto PlanetLab. Indeed, the so-obtained simulation services are specifically
tailored to support system developers in studying the behavior of relevant systems at design time.
Finally, it should be underlined that, unlike all such aforementioned contributions, even though HLAcloud
specifically leverages SysML and PlanetLab, other standards and technologies can be introduced by extending
or modifying the proposed set of model transformations.
3
The HLAcloud framework is inspired by the IEEE DSEEP, a standardized and recommended process for
developing interoperable distributed simulation federations (IEEE 2010d). The framework is founded on
model-driven principles and standards and exploits two UML profiles, namely SysML4HLA and HLAProfile,
to support the generation of both the model and the implementation of the HLA-based distributed simulation.
The rationale of the framework is depicted in Figure 1. The system developer uses the HLAcloud
framework to carry out two different actions. First, the framework automates both the development of
1373
System
Implementation
and Execution
SysML
(PIM)
SysML-to-HLA
Model to model
transformation
SysML
+SysML4HLA
(marked PIM)
Retrieve
existing
Federates
UML
+HLAProfile
(PSM)
HLA-to-Code
Model-to-model
transformation
HLA-to-PLab
Model-to-text
transformation
HLA
code
Deploy
Federates
PlanetLab
script
Flow of documents
Execute
Simulation
Environment
Evaluate
results
Control flow
1374
The workflow described in the previous section makes use of several SysML and UML models which
are used both to represent the system under a system and software perspective and also to embody the
details required to support the model transformations upon which the proposed framework has been built.
To this purpose, such models have been extended by use of stereotypes provided by the SysML4HLA and
HLAProfile UML profiles, introduced in (Bocciarelli, DAmbrogio, and Fabiani 2012). The SysML4HLA
profile is used to annotate a SysML-based system specification to support the automated generation of
the HLA-based distributed simulation models. Differently, the HLAProfile is used to annotate an UML
diagram in order to represent HLA-based implementation details. For the reader convenience such profiles
are briefly recalled in the following subsections. A detailed description of SysML4HLA and HLAProfile
can be found in (Bocciarelli, DAmbrogio, and Fabiani 2012).
4.1 SysML4HLA
The SysML4HLA profile has been introduced in (Bocciarelli, DAmbrogio, and Fabiani 2012), and has been
here revised, to annotate SysML models with HLA-specific data, so as to drive the automated generation
of the HLA code that implements the distributed simulation of the specified system. SysML4HLA provides
a set of stereotypes (or metaclass extensions) that extend the block element of SysML, which in turn is
an extension of UML class metaclass. The introduced stereotypes model the basic elements of an HLA
simulation: federation, federates, object classes and interaction classes.
4.2 HLAProfile
The role of the HLAProfile is to allow the representation of concepts, domain elements and relationships
required to represent a HLA-based simulation under an implementation-oriented perspective. The HLAProfile
is inspired by the HLA metamodel proposed in (Topcu, Adak, and Oguztuzun 2008) and includes several
stereotypes grouped into a number of packages.
1375
Stereotype
Extends
<<initialization>>
UML::Message
<<action>>
UML::Message
<<message>>
UML::Message
Description
Identifies messages exchanged to setup the distributed
simulation infrastructure
Identifies a local action executed by a federate that does
not require any interaction with other federates
Identifies a communication between two federates
MODEL TRANSFORMATIONS
This section outlines the rationale of the model transformations at the basis of the workflow depicted in
Figure 2, namely the SysML-to-HLA model-to-model transformation, the HLA-to-Code model-to-text
transformation and the HLA-to-PLab model-to-text transformation.
5.1 SysML-to-HLA model-to-model transformation
The SysML-to-HLA model transformation takes as input a SysML model representing the system that is
going to be simulated and yields as output an UML model that represents the corresponding HLA-based
distributed simulation. The input model is annotated with stereotypes provided by the SysML4HLA profile,
1376
1377
generateFederate: generates a Java class for each UML class stereotyped as <<federate>> ;
generateObjIntClass: generates the XML tags that serialize object classes and interaction classes,
for each UML class stereotyped as <<objectClass>> or <<interactionClass>>. The
resulting XML file represents the FOM (Federation Object Model), i.e., the description of objects,
attributes and interactions shared by federates. Moreover, this template creates, within each class
generated by the generateFederate template, the method for publishing and subscribing resources,
according to the Publish/Subscribe relationships of the HLA-based structural model;
generateAmbassador: generates a set of Java classes constituting the implementation of the required
federate ambassadors;
completeFOM: generates the FOM sections related to switches, synchronization points and dimensions, while the corresponding elements are specified by the HLA-based structural model.
There are several ways to carry out such sequence of steps, the main one based on the use of the
PlanetLab Central API, a set of common abstractions provided by PlanetLab to ease the access to its
resources. On the top of this API many tools or command shells have been developed, most of all based
on the Python scripting language. Specifically, the pShell tool, a Linux shell like interface providing a few
basic commands to interact with a Planetlab slice (Maniymaran 2007), has been used to implement the
scripts required to execute the aforementioned steps. Listing 1 gives the pShell commands for retrieving
active nodes, adding nodes, deploying files and executing a command, respectively.
1 ...
2 p l i s t a o a c t i v e n o d e s . t x t
3 ...
4 a d d n o d e s f n o d e s t o a d d . t x t
5 ...
6 p u t f i l e n a m e nodeID
7 ...
8 cmd launchcommand nodeID
9 ...
1378
EXAMPLE APPLICATION
This Section presents an example application of the proposed model-driven method to the development of
an aircraft.
6.1 System Specification
The first step of the method includes the definition of the system model by use of the SysML notation. For
the sake of brevity, this example only takes into account the diagrams needed to derive the HLA simulation
model and, consequently, the distributed simulation code. Specifically, the SysML aircraft model includes
the following diagrams:
A BDD that models the aircraft components (e.g., the structural parts such as ailerons and the
elevator, the autopilot and the powerplant) and their relationships;
A set of SDs that describe the interactions between system components.
cL : ControlLogic
gPS : GPS
g : Gyroscope
pS : PositionSensor
a : Aileron
e : Elevator
loop
getCurrentPosition
latitude, longitude
updatePosition
updatePosition
getOrientation
xVal, yVal, zVal
notifyPosition
notifyPosition
computeControlsAdj
send AileronPos
send ElevatorPos
Figure 6: Source model: sequence diagram (interaction between Autopilot and Structure).
use of a CD (i.e., the HLA-based structural model) and a set of UML SDs (i.e., the HLA-based behavioral
model). As an example, Figure 7 and Figure 8 depict the CD and the SD corresponding to the BDD and
the SD shown in Figure 5 and Figure 6, respectively. Once the federation structure has been specified,
the federation design step also includes the optional execution of a discovery that aims to retrieve already
available federates to be integrated in the federation. The present example assumes the federation is fully
implemented from scratch.
1380
ap: Autopilot
rti : RTI
str: Structure
<<Initialization>>
createRTIAmbassador()
<<Initialization>> createRTIAmbassador()
<<Initialization>> joinFederation()
<<Initialization>> joinFederation()
<<Initialization>> publishInteractions()
<<Initialization>> publishInteractions()
<<Initialization>> subscribeObjects()
<<Initialization>> subscribeObjects()
loop
<<Action>> updatetPosition()
<<Action>> getCurrentPosition()
<<Action>> getCurrentOrientation()
<<Action>> notify()
<<Message>> updateAttributeValues()
<<Message>> reflectAttributeValues()
<<Action>> computeControlsAdj()
<<Message>> sendInteraction()
<<Message>> receiveInteraction()
Figure 8: Target model: behavioral view (interaction among Autopilot, Structure and RTI).
7
CONCLUSIONS
DS-based solutions provide an effective approach for the design-time analysis of complex systems, but can
be time- and effort-consuming.
In this respect, this paper has introduced the HLAcloud framework, which provides a model-driven
approach for the automated generation of Java/HLA code from SysML models, thus reducing the DS
development effort.
The proposed framework makes use of a set of model transformations that support the entire HLA-based
federation development and execution process, from the specification of the SysML model of the system
under study down to the generation, cloud-based deployment and execution of the corresponding HLA-based
DS implementation. The HLACloud framework has been illustrated by use of an example application to
the SysML-based development of an aircraft. The example has been kept simple to show the effectiveness
of the HLACloud framework without dealing with unnecessary and lengthy details. Applications to real
world systems to validate the proposed framework in different domains are currently in progress.
REFERENCES
Bocciarelli, P., A. DAmbrogio, and G. Fabiani. 2012. A Model-driven Approach to Build HLA-based
Distributed Simulations from SysML Models. In Proceedings of the 2nd International Conference on
Simulation and Modeling Methodologies, Technologies and Applications, SIMULTECH 12, 4960.
Eclipse Foundation. Acceleo. Website: http://www.acceleo.org/pages/home/en.
Eclipse Foundation. QVT Transformation Engine. Website: http://www.eclipse.org/m2m.
Fujimoto, R. M., A. W. Malik, and A. Park. 2010. Parallel and distributed simulation in the cloud. SCS
M&S Magazine 3:110.
IEEE 2010a. IEEE 1516 - Standard for Modeling and Simulation High Level Architecture - Framework
and Rules.
IEEE 2010b. IEEE 1516.1 - Standard for Modeling and Simulation High Level Architecture - Federate
Interface Specification.
IEEE 2010c. IEEE 1516.2- Standard for Modeling and Simulation High Level Architecture - Object Model
Template (OMT) Specification.
IEEE 2010d. IEEE 1730 - Recommended Practice for Distributed Simulation Engineering and Execution
Process (DSEEP).
Maniymaran, B. 2007. Available at http://cgi.cs.mcgill.ca/anrl/projects/pShell/docs/pShell-1.7.pdf.
1381
1382