HLA COMPLIANT DISTRIBUTED JSIM
by
JUNXIU TAO
B.Eng., Tsinghua University, P.R.China, 1993
A Thesis Submitted to the Graduate Faculty
of The University of Georgia in Partial Fulfillment
of the
Requirements for the Degree
MASTER OF SCIENCE
ATHENS, GEORGIA
2000
ã 2000
Junxiu Tao
All Rights Reserved
HLA COMPLIANT DISTRIBUTED JSIM
by
JUNXIU TAO
Approved:
Major Professor
Date
Approved:
Graduate Dean
Date
In the course of my pursuit of computer science, I have met hardship beyond imagination. Many people have helped me in all kinds of ways.
First of all, I would like to thank my major advisor, Dr. John A. Miller, for his constant support and guidance. He has been a constant source of suggestions and help throughout this project and all the time that I am seeking this degree. I would also like to express my gratitude to Dr. Rodney Canfield, Dr. Daniel Everett, Dr. Suchendra Bhandarkar, Dr. Hamid Arabnia, Dr. Thiab Taha, and Ms. Ellen Lether for their valuable help and support.
Finally, I would like to thank my parents and sister, for all their support through the difficult times.
TABLE OF CONTENTS
ACKNOWLEDGEMENTS *
LIST OF TABLES vii
LIST OF FIGURES viii
CHAPTER
1 INTRODUCTION *
1.1 Web-Based Simulation *
1.2 Background of High Level Architecture (HLA) 2
1.3 Related Work 3
1.4 Overview of JSIM 4
1.5 Motivation and Orientation of the thesis 5
2 HIGH LEVEL ARCHITECTURE 7
2.1 Functional Overview 7
2.2 HLA Rules 9
2.3 HLA Interface Specification 10
2.4 HLA Object Model Template (OMT) 11
3 TECHNOLOGICAL INFRASTRUCTURE 13
3.1 Component Technology 13
3.2 Builder Tools 14
3.3 Reflection 16
3.4 Enterprise JavaBean (EJB) 17
4 OVERVIEW OF JSIM 23
4.1 Model Beans 23
4.2 Jrun Package 25
5 JSIM BUILDER 28
LIST OF TABLES
|
TABLE |
Pages |
|
|
1 |
Federation Rules . |
9 |
|
2 |
Federates Rules ... |
10 |
|
3 |
The Content of JSIM FOM . |
27 |
|
4 |
The Content of SOM for JSIM Simulation Model . |
27 |
|
5 |
Comparison of FDK and JSIM Builder .. |
42 |
|
6 |
Events fired and listened by ModelBean and agents .. |
43 |
LIST OF FIGURES
|
FIGURE |
Pages |
|
|
1 |
Functional View of an HLA Federation . |
8 |
|
2 |
Screen snapshot of BDK .. ... |
15 |
|
3 |
EJB Architecture . |
18 |
|
4 |
JSIM Builder Architecture .. |
29 |
|
5 |
Hookup Federates.. . |
34 |
|
6 |
Builder Adaptor Dialog .. |
35 |
|
7 |
Food Court and ERoom Federation at Runtime . |
38 |
|
8 |
Design Diagram of Food Court and ERoom Federation. |
44 |
|
9 |
Food Court and ERoom Federation.. .. |
45 |
|
10 |
Execution of Food Court and ERoom Federation .. |
46 |
|
11 |
Application Deployment Tool . ... |
63 |
CHAPTER 1
INTRODUCTION
With the rapid development of the web and internet technologies, we shall expect that a future Web will be full of simulation models and large amounts of simulation-generated data. The number of simulation models available and the amount of simulation data are likely to be much greater. In order to improve the efficiency and decrease the waste of time and resources, supporting the reuse and interoperation across the simulation models on the web is becoming a critical problem that needs to be solved. A subset of High Level Architecture (HLA) on top of distributed component technology was implemented for the JSIM Web-based simulation environment for this purpose. In JSIM, a graphical builder tool and its supporting software (JSIM Builder) was implemented to let the user design complex simulations consisting of multiple models forming a federation.
1.1 Web-Based Simulation
What is Web-Based Simulation? As far as we know, there is no universal agreement on the definition of it. We can think that Web-Based Simulation (WBS) as a term used to capture a cross-section of simulation and web research and technology [Miller et al., 2000].
With the emergence of new Web technologies, Web-Based simulation has become very popular recently. In the future, we expect that many independently constructed simulations can be composed together quickly and cheaply to create a larger simulation that is perceived by its user more as a combined unity than the sum of components. Because the diversity of simulation models and the variety of simulation data that are stored on different systems, it is very hard to let two different simulation models talk, not to mention letting a bunch of simulation models that run on different machines cooperate, communicate and exchange data. One way to bridge the
diversity of simulation models and simulation data is to utilize the High Level Architecture(HLA).
HLA is a component-based architecture which makes the reuse of simulation models much easier. The HLA is also a layered architecture; it encapsulates the services such as the management of federates and communication among federates in its Runtime Infrastructure (RTI) layer, so the federates just need to take care of their own functions that relate to simulation [Kuhl et al., 1999]. These advantages make us choose implementing HLA over other choices. The emergence of component technology such as Java Beans, Enterprise Java Beans (EJB) and the web technology such as Remote Method Invocation (RMI) make it easier to achieve our goal.
1.2 Background of High Level Architecture (HLA)
In order to support the reuse and interoperation of all the new and existing simulations within the US Department of Defense (DoD), the Defense Modeling and Simulation Office (DMSO) defined the High Level Architecture. HLA aims to generalize and build upon the results of the Distributed Interactive Simulation (DIS). The HLA not only supports a wide variety of federations like DIS, but also supports interoperability among simulations [Fujimoto et al., 1996c]. The HLA activity began in March 1995. It became a standard that was approved by the Under Secretary of Defense (Acquisition and Technology) as the common technical architecture for modeling and simulation in the U.S. Department of Defense in September 1996, and it has been nominated for standardization in NATO (North Atlantic Treaty Organization 1998) [Dahamann et al., 1998].
HLA is the glue that allows a number of computer simulations to be combined into a larger simulation. HLA contains three parts:
The HLA Rules define the basic principles underlying HLA. The HLA Interface Specification (I/F Spec) defines the interface to the Runtime Infrastructure that provides the means for simulators to coordinate the execution and exchange of information. The OMT provides a standard format for describing information of common interest to more than one simulator (federate).
The chief intent of HLA is to allow simulations to be built by combining other simulations. So HLA is fundamentally an architecture that supports component-based simulation, where the components are individual simulations.
1.3 Related Work
There are several kinds of HLA support software, such as the RTI software and the Object Model Tools. For the Object Model Tools, you can provide an Object Model Development Tool, or an Object Model Library, or an Object Model Data Dictionary [Kuhl et al., 1999].
The RTI software is the most important software among the HLA support software. The first RTI software is known as the 0.X series that is developed with an Interface Definition Language (IDL) using Common Object Request Broker Architecture (CORBA). Then based on the 0.X series, the 1.0 series was developed in C++. The first release is known as F.0 and it came out in 1996. In May 1997, the RTI 1.0 was released. It implements all the HLA services except some federation management functions and Data Distribution Management (DDM). The RTI 1.3 which was released in 1998 implements all the HLA specification 1.3. [Dahmann et al., 1998, Kuhl et al., 1999].
There are some other HLA implementations around, such as the Federated Simulations Development Kit (FDK) developed at Georgia Tech by a research group led by Dr. R. Fujimoto. The FDK is a general purpose distributed (federated) simulation software. It includes the RTI-Kit runtime infrastructure development libraries, the implementation of the HLA RTI and a Graphical User Interface (GUI) called Jane Interactive Simulation System [Perumalla et al., 1999].
Some of the above software is implemented in Java such as one version of the RTI 1.0. Some is implemented partly in Java such as the FDK. Some are not.
1.4 Overview of JSIM
The Java-Based Simulation and Animation Environment (JSIM) which is implemented in Java is the result of many peoples efforts. It combines many new technologies such as Java Bean, EJB, RMI, etc. JSIM is divided into three layers: the environment layer, the engine layer and the foundation layer [Nair, 1997, Zhao, 1997, Ge, 1998, Xiang, 1999].
The foundation layer includes the queue package, the statistic package and the variate package. This layer provides the general-purpose functionality that could be also useful in other applications.
The engine layer includes the event package and the process package. This part provides the core for simulation models. In JSIM, simulation models may be built using either the event package (Event-Scheduling Paradigm) or the process package (Process-Interaction Paradigm).
The environment layer includes the jmodel package, the jquery package, the jrun package, the jqds package and the packages that support JSIM Builder. We implemented the graphical designer in the jmodel package. It allows the simulation models to be built rapidly.
In chapter 4, we are going to talk more details about parts of JSIM that are related to JSIM Builder, such as the ModelBean and model agents. The model agents are implemented in the jrun package.
More details about the packages that support JSIM builder will be discussed in chapter 5. These packages include the jbuild package, the feddeployer package, the fedadaptor package, the util package, and the jbdk package.
1.5 Motivation and Orientation of this Thesis
This thesis is built on the ground of the work that has been done on JSIM, especially the ModelBean and jrun package. We call the project for this thesis JSIM Builder. The design goal of this thesis is to support a subset of HLA by implementing it using state-of-art component and web technology. More specifically, we are going to support the building of federation and federation execution. So implementing a subset of HLA will do this job. Because HLA provides almost all the details that are needed for federations and JSIM does not need some of its services such as the Ownership Management, we think implementing a subset of HLA has the advantages of getting rid of superfluous features.
In JSIM, the simulation models and model agents are called federates. They are in the form of components Java Beans, and they can be stored on one machine or on different machines. The JSIM Builder provides services that support the management of distributed federates and the communication among them.
This thesis consists of seven chapters. Chapter 1 gives a brief introduction of the various concepts related to this thesis. Chapter 2 discusses the HLA. Chapter 3 discusses some infrastructure technologies for this thesis. Chapter 4 gives an overview of JSIM. Chapter 5 to 6 will focus on the work done for this thesis. Chapter 7 summarizes the project and provides some possible directions for future work.
CHAPTER 2
HIGH LEVEL ARCHITECTURE
2.1 Functional Overview
Before going any further on HLA, we need to know some very important terms that are defined in HLA.
As shown in figure 1, an HLA federation could be separated into three major parts. The first major component is a collection of federates. A federate is a member of a federation. It is a simulation-associated object that can and only can communicate through the RTI. A federate could be a computer simulation, or a supporting utility. A federate could represent one small simulator, such as one cockpit simulator, or an aggregate simulation, such as an entire national simulation of air traffic flow. HLA has no constraints on how a federate represents a simulation, but it does require that all the federates follow some rules so that object in one federate could communicate with another object in another federate through the services that have been implemented in
RTI [Dahmann et al. 1998].
Figure 1: Functional View of an HLA Federation [Dahmann et al., 1998]
The second functional component is RTI. In fact, the RTI is a distributed operating system for federations [Dahmann et al. 1998]. In HLA, the simulation model is encapsulated in the federate. The services that the RTI provides are for general purposes. These services include federate-to-federate interaction, federation management and some support functions. The RTI used by a federation may be implemented as many process or as one. It may need many computers to execute, but conceptually it is one RTI. A RTI may support several federations executing at once.
The third component is the interface that federates use to call RTI. It is a common object model for data exchange between federates in a federation, called the Federation Object Model (FOM). It provides the standard that defines how a federate interacts with RTI. Actually the federate interacts with other federates by its interacting with RTI. The RTI can also send or forward other federates request to a federate. Generally, it expresses the agreement about the data between federates.
2.2 HLA Rules
The HLA Rules are one of the three parts of HLA standard. The HLA Rules are the principles and conventions that should be followed to achieve proper interaction between federates during federation execution. They can be divided into two groups: the federation rules and the federate rules. Rules for federations are:
Table 1: Federation Rules [DMSO, 1998a]
|
1 |
Federations shall have an HLA federation object model, documented in accordance with the HLA Object Model Template. |
|
2 |
In a federation, all simulation-associated object instance representations shall be in the federates, not in the runtime infrastructure. |
|
3 |
During a federation execution, all exchange of FOM data among federates shall occur via the RTI. |
|
4 |
During a federation execution, federates shall interact with the RTI in accordance with the HLA interface specification. |
|
5 |
During a federation execution, an instance attribute shall be owned by at most one federate at any given time. |
The rules for federate are:
Table 2: Federate Rules [DMSO, 1998a]
|
6 |
Federates shall have an HLA Simulation Object Model (SOM), documented in accordance with the HLA OMT. |
|
7 |
Federates shall be able to update and/or reflect any attributes and send and/or receive interactions, as specified in their SOMs. |
|
8 |
Federates shall be able to transfer and/or accept ownership of attributes dynamically during a federation execution, as specified in their SOMs. |
|
9 |
Federates shall be able to vary the conditions (e.g., thresholds) under which they provide updates of attributes, as specified in their SOMs. |
|
10 |
Federates shall be able to manage local time in a way that will allow them to coordinate data exchange with other members of a federation. |
The HLA Rules are the design principles for the Interface Specification and OMT. They summarize the HLAs major goals and constraints.
2.3 HLA Interface Specification
The HLA Interface Specification describes the runtime services that the RTI provides to the federates and the federates to the RTI. These services fall into six groups.
The HLA Interface Specification defines the way these services are accessed, both functionally and in an application programmers interface (API). At present, APIs in CORBA IDL, C++, Ada, and Java are incorporated in the HLA Interface Specification.
2.4 HLA Object Model Template (OMT)
The HLA OMT provides a template for documenting HLA-relevant information about classes of simulation or federation objects and their attributes and interactions. This common template facilitates understanding and comparisons of different simulations and federations. It provides the format for a contract between members of a federation on the types of objects and interactions that will be supported across its multiple interoperating simulations. The HLA requires that federation and individual federates be described by an object model.
The HLA specifies two types of object models: the HLA federation object model (FOM) and the HLA simulation object model (SOM). SOM is used to describe an individual federation member (federate). The content of SOM includes objects, attributes, interactions, and parameters. FOM is used to describe a set of interacting federates. The content of FOM includes an enumeration of all object and interaction classes pertinent to the federation, along with a specification of the attributes or parameters that characterize these classes [DMSO, 1998c]. No matter in which object model, the primary objective of the HLA OMT is to facilitate interoperability among simulations and reuse of simulation components.
CHAPTER 3
TECHNOLOGICAL INFRASTRUCTURE
3.1 Component Technology
Today, software that is large in size and provides a substantial functionality is produced every day. On the other hand, users needing only a couple of advanced features are forced to purchase the more expensive product with superfluous features. To solve this crisis, component technology is a good solution. The software components are reusable building blocks for constructing software systems, and have the capability to function both independently and interactively by working with other components [Cassady-Dorion et al., 1997]. Components differ from other types of reusable software such as the object in that they can be modified during design time as binary executables. By following some agreement, the developers can reuse the components that were produced by other developers at different time and in different places in the world.
There are some software component technologies used today such as the Microsofts COM/DCOM and the Suns Java Beans. Since Java Bean is an outstanding example of implementing component technology, we are going to discuss some features that Java Beans support:
3.2 Builder Tools
The Builder tools are important parts of component technology. They provide an environment in which users can assemble components together into an application or a more complex component. Typically such tools are GUI applications, although they need not be [Voss, 2000]. Some Builder tools may operate entirely visually, allowing the plugging and hooking up of components. Some Builder tools may need some hand coding. Typically, Builder tools let users visually hook up components, select events to be fired, and specify handlers for events through mouse drag, or menu selection. Very little code needs to be written by hand to get the initial component interaction working properly.
Currently, the available builder tools are Suns Beans Development Kit (BDK), Symantecs Visual Café, Lotus BeanMachine, Borland Jbuilder, Microsoft J++, and IBMs VisualAge. Since we are going to implement our builder tool in Java, and Suns BDK is a good example of builder tool implementation, we are going to give some details of how it works and how it was designed.
As shown on figure 2, Suns BDK can be visually divided into three parts: the ToolBox, the BeanBox window, and the Properties sheet.

Figure 2: Screen snapshot of BDK (Sun microsystem)
Here are brief descriptions of each window.
3.3 Reflection
If you want to implement a builder tool in Java, there is one important package that you need to know the reflection package. The reflection package provides methods that can reflect the classes, interfaces, and objects in the current Java Virtual Machine. This package is useful in writing development tools such as debuggers, class browsers, and GUI builders. The following information about the functionality of reflection API is provided by Sun.
The reflection package makes it much easier to implement the JSIM Builder.
3.4 Enterprise JavaBean (EJB)
Today, enterprise developers face some fundamental problems in writing distributed applications. Writing large applications is even more difficult. It is difficult because the applications run on heterogeneous platforms and different environments. The enterprise developers would like to write the application once and run it on all other platforms. In order to support this feature, the Enterprise Java Beans (EJB) technology was introduced.
The Enterprise Java Beans (EJB) architecture is a server-side component model for the Java platform. The design goal of EJB component architecture is to enable enterprises to build scalable, secure, multi-platform, business-critical applications as reusable, server-side components [Roth, 2000].
3.4.1 Enterprise Application Models
An enterprise application model, or in other words, an Enterprise Bean is a body of code with fields and methods to implement modules of business logic [Pawlan, 2000]. It is a building block that can be used alone or with other Enterprise Beans to build a complete and robust thin-client multi-tiered application. An Enterprise Bean can be implemented to interact with other Enterprise Beans.
There are two types of Enterprise Beans: Session Beans and Entity Beans. By using a Session Bean, the client begins a session with an object that acts like an application, executing a unit of work on behalf of the client, possibly including multiple database transactions. By using an Entity Bean, the client accesses an object that represents an entity in a database. Generally, a Session Bean represents a communication session with a client, and an Entity Bean represents a data in a database [Roth, 2000, Pawlan, 2000].
3.4.2 Architecture
Figure 3: EJB Architecture ([Roth, 2000])
Figure 3 illustrates the EJB Architecture. The EJB allows for any kind of client, and an EJB server can support multiple protocols such as RMI, IIOP (CORBA), and DCOM. This implies that a client to an EJB server does not have to be written in the Java language [Roth, 2000].
To simplify the programming of enterprise application, The EJB technology wraps a collection of services for supporting an EJB installation in the EJB server. These services include management of distributed transactions, management of distributed objects and distributed invocations on these objects, and some low-level system services. Generally, an EJB server manages the resources needed to support EJB components. An EJB server provider can provide an implementation of a container, (described below) and it can provide an API for third party vendors to plug-in additional EJB containers. The EJB specification allows developers a great deal of freedom in the design and implementation of servers.
Inside the EJB server, an EJB container may be implemented. An EJB container is in fact a home for EJB components. When the Beans are installed into the container, the container provides a scalable, secure, transactional environment in which Beans can operate. The container handles the object life cycle, including creating and destroying an object. It also handles the state management of Beans.
When a Bean is installed in a container, the container provides two implementations: an implementation of the Bean's EJBHome interface and the Bean's remote interface. The container is also responsible for making the Bean's EJBHome interface available in the Java Naming and Directory Interface (JNDI).
To construct a Bean, you must first implement the methods that are declared in the EJBObject interface. For example, if you are writing a checking account Bean, you might implement a "debit" method as part of its interface. You must also implement one of the two types of EJB interfaces, SessionBean or EntityBean. These interfaces include methods related to working set management and are not exposed to a client.
When a Bean is installed on a server, the remote interface, which is usually called a skeleton in CORBA, is automatically generated. The implementation of the remote interface is called the EJBObject. The EJBObject only exposes the remote interface specified by the programmer to the client. The enterprise Bean class does not implement the remote interface, though it does contain methods with the same signatures. The EJBObject acts like a proxy, intercepting the remote object invocations and calling the appropriate methods on the enterprise Bean instance.
An EJB container implements the EJBHome interface of each Enterprise Bean installed in the container. It supports the creation of a Bean, deletion of a Bean and querying information or "metadata" about a Bean. The container makes the EJBHome interfaces available to the client through JNDI. For Entity Beans, the EJBHome interface also contains some methods that allow a client to look up a Bean by a primary key.
3.4.3 Features
As we know, writing distributed transactional applications is a complex task. The EJB was designed to enable server side "write once, run any where". In order to accomplish this goal, the EJB technology provides some features [Roth, 2000].
CHAPTER 4
OVERVIEW OF JSIM
We have briefly introduced the JSIM Web-Based Simulation Environment in chapter 1. Through the efforts of many people, JSIM has evolved into a large system that has plenty of methods and functionality. It provides a graphical designer, so that the user can rapidly build the simulation graphically. The jqds package (Query Driven Simulation) under development controls the storage, retrieval and execution of simulation models as Java Beans and utilizes JDBC to access databases. It also provides a code generator that will generate the code automatically, either as an applet or as a Java Bean.
In this chapter, we are going to talk about some issues of the JSIM that is closely related to this thesis.
4.1 Model Bean
To cope with the needs of HLA, every federate should be represented as a component. In JSIM, every simulation model is a Java Bean. It is derived from one super class called ModelBean. The ModelBean class takes care of the bean aspects of each simulation model, and the derived child class is responsible for all the features, related to the real life situation that the model tries to represent (for example, ERoom model represents an Emergency room simulation) [Xiang, 1999].
The ModelBean can fire the following events:
ModleBean can listen to following events:
ModelBean is an abstract class. It contains some abstract methods that must be implemented by the child class. These methods provide the chances for the model agents to make decision and change properties of model bean. ModelBean also provides most functions that the simulation needs, so that the coding of the simulation model that extends it becomes very simple. This feature makes it easy for the child class to be created by code generation.
4.2 Jrun Package
The model agents are implemented in the jrun package. In order to let the user decide how the model bean works, JSIM provides several model agents. The model agents are also components in the form of Java Beans. A model agent can listen to the events that are fired by other components. The events for which ScenarioAgent can listen are different from the events for which other model agents can listen. Most importantly, the model agent has some decision-making abilities.
The jrun package currently provides three kinds of model agents. They include:
The BatchMeansAgent and the ReplicationAgent extend from the ModelAgent class, but implement different analyzing method. Like the ModelBean, the ModelAgent provides some abstract methods that must be implemented by child class. The ModelAgent also provides most functions that the child class needs. These functions that ModelAgent provides to its child classes include displaying output data, handling events that are fired to the child class, firing SimulateEvent, and some functions needed for analyzing the output data.
As we mentioned in chapter 2, HLA FOM contains an enumeration of all objects and interaction classes, parameters and attributes related to the federation. We summarized the FOM for JSIM in table 3. We also summarize the SOM of simulation models in JSIM in table 4.
Table 3: The Content of JSIM FOM
|
Objects |
A collection of objects. The object can be one of following: a simulation model that extends ModelBean, a ScenarioAgent, a BatchMeansAgent and a Replication Agent |
|
Interaction classes |
A collection of events. The event can be one of the following: an InstructEvent, a SimulateEvent, an InformEvent, a ReportEvnt and an InjectEvent |
|
Attributes |
|
|
Parameters |
Table 4: The Content of SOM for JSIM Simulation Model
|
Objects |
A simulation model that extends ModelBean |
|
Attributes |
|
|
Interactions |
|
|
Parameters |
Type, number of Tokens and Time Distribution of each node belonged to the simulation model |
CHAPTER 5
JSIM BUILDER
In JSIM, every simulation model and model agent can be generated as a Java Bean, so an RTI-like software can be implemented to reuse them for building a complex federation. In order to support the reuse and interoperation of simulation models and model agents, JSIM Builder was implemented. JSIM Builder supports a subset of HLA. It provides services that support federation building, federates management, and communication across federates.
5.1 Functionality Overview
At runtime, the simulation models and model agents work as federates for JSIM Builder, and JSIM Builder provides services to the simulation models and model agents like an RTI (shown in figure 4). In JSIM, every simulation model extends ModelBean. ModelBean provides most functions that a simulation needs and leaves few parameters for the simulation model to determine. This kind of Object Oriented (OO) structure is compatible with the rules described for the federate. This is true with the ModelAgent that is extended by most model agents too.
By functionality, the JSIM Builder consists of three parts: the Graphical Builder, the Federate Deployer and the Federation Adaptor. Among all the three parts of JSIM Builder, the Graphical Builder is the most important part. It is the client of the Federate Deployer and the Federation Adaptor, and controls the behavior of them.

Figure 4: JSIM Builder Architecture
Because the functionality of JSIM Builder can be divided into the services that support building the federation and the services that support federation execution, the life cycle of JSIM Builder can be divided into build-time and runtime. Each part of the JSIM Builder provides some services either for build-time or runtime, or for both.
The build-time services are supported by the combined efforts of Graphical Builder and Federate Deployer. The Graphical Builder provides a graphical environment in which user can build complex federations. It can manage and display the available federates that are both from the local machine and from the remote server. The Federate Deployer is on the server side. It provides some methods that help the management of the remote federates. This part is implemented by using EJB.
The build-time services are supported by combined efforts of Graphical Builder and Federation Adaptor. The Graphical Builder provides services that support federation execution, event management, object and method invoking, etc. The Federation Adaptor is on the server side. It is implemented by using RMI. The Federation Adaptor can store one remote simulation model and control the behavior of this simulation model. Together with the Federation Adaptor, the Graphical Builder provides the communication service for linked federates. So other federates in the same federation can interact with the remote simulation model.
Comparing to HLA, the simulation model and model agent can be taken as the federate, and JSIM Builder functions as the RTI to the federates. The federates interact with the JSIM Builder through events. The JSIM Builder is responsible for delivering the event to the interested party. So for the federate itself, no matter it is from a local or remote machine, it works as if it is from a local machine. It just needs to declare whether it is going to fire or receive a message, it does not need to know whom it is going to interact with. The JSIM Builder is responsible for delivering the event to interested party.
5.2 Graphical Builder
One of the main purposes of the Graphical Builder is to support the building of federations. To cope with this goal, a frame is used as the base container to contain all the components of the main window. There are two major components in the Graphical Builder. They are the federate manager and the builder box. The federate manager has a list of the labels of available federates. The builder box is the place where the federation will be built. With the cooperation of the federate manager and the builder box, a federation can be built visually. The menu bar of the frame has some menu items that can control the interaction of the federate manager and builder box.
5.2.1 Build-time Functions
At the build-time, the federate manager, as one of the two major parts of Graphical Builder, provides functions mainly for the management of the federates. The following describes its functionality.
The builder box is another major part of the Graphical Builder. The functions that it contributes to build-time services support the building of the federation. The following describes its functionality.
As two major parts of Graphical Builder, the federate manager and the builder box provide most functions needed for building a federation. The following describes some other functionality that are provided by the Graphical Builder for building federation:
As we can see, all the above functions are related to building federations. So we have implemented the creation of federation in Federation Management services.
5.2.2 Runtime Functions
The runtime functions of Graphical Builder are provided by its builder box. They include:
As we can see, because the builder box supports event management, JSIM Builder supports DeclarationManagement Services. Data Distribution Management is partly supported by keeping track of loaded federate objects by the builder box. Besides the functions for building federation, the Graphical Builder, along with Federate Deployer and Federation Adaptor, provides the communication service. The communication service supports data exchange that is included in Object Management services. The function of Federate Deployer and Federation Adaptor will be discussed later.
5.2.3 Builder Environment
The initialization of the Graphical Builder includes getting a connection with Federate Deployers EJB server, checking if Java Bean is supported or not, and initialization of its GUI.
The JSIM Builder encapsulates all the methods that are related to the Federate Deployer in the BuilderFrame class. The base frame is implemented in the BuilderFrame class. This class also contains the main function of the application. The functionality of the federate manager and the builder box is provided by many classes. The major class of the federate manager is the FederateMgr class. This class can be used to represent the federate manager, because all functions of the federate manager can be reached in it. Similarly, the BuilderBox class can be used to represent the builder box.
When the federate manager is initialized, it first calls the BuilderFrame class to get all the JAR file names that are available both from the local machine and the remote machine. Then it calls the JarLoader to load all federates in those JAR files and put them into its list. When the initialization has been finished, it displays all available federates by their unique federate labels and host addresses and then waits for the user to choose.
The initialization of the builder box does nothing except set the layout and display itself.

Figure 5: Hookup Federate
When the initialization has been finished, the Graphical Builder waits for the user to build a federation. The building of federation is very simple in the JSIM Builder. The user just needs to follow the steps below.
First, the user needs to load all the desired federates model beans and model agents into the builder box.

Figure 6: Builder Adaptor Dialog
When all the federates have been loaded, the user can hook them up according to certain scenario. Of the two federates that will be hooked up, the one that will fire an event is called the source federate, and the one that will listen to this event is called the target federate. To hook up the federates, the user needs to choose the event that the source federate will fire (shown as figure 5). Then, the user needs to choose the listener method of the target federate in the Adaptor Dialog (shown as figure 6). After all these, the hooking up can be done.
After the hooking up, an adaptor class will be generated. Below is an example of an adaptor if the target federate is from local machine.
// Automatically generated event hookup file.
package gini.tmp;
import BankBean;
import jsim.process.SimulateListener;
import jsim.process.SimulateEvent;
public class Local_Adaptor implements jsim.process.SimulateListener, java.io.Serializable {
public void setTarget(BankBean t) {
target = t;
}// setTarget
public void handleSimulate(jsim.process.SimulateEvent arg0) {
target.handleSimulate(arg0);
}// handleSimulate
private BankBean target;
}//class
If the target federate is from remote machine, another kind of adaptor class will be generated. Below is an example.
// Automatically generated event hookup file.
package gini.tmp;
import jsim.process.SimulateListener;
import jsim.process.SimulateEvent;
import jsim.jbuild.RMIclient;
public class Remote_Adaptor implements jsim.process.SimulateListener, java.io.Serializable {
public void setTarget(String jarName, String fdtName) {
this.jarName = jarName;
this.fdtName = fdtName;
}// setTarget
public void handleSimulate(jsim.process.SimulateEvent arg0) {
try {
RMIclient.lookupAdaptor(" orion.cs.uga.edu");
RMIclient.adaptor.initFederate( jarName, fdtName );
RMIclient.adaptor.startFederate( );
} catch ( Exception e ) {
System.err.println("RMI exception: " + e.getMessage());
e.printStackTrace();
}
}// handleSimulate
private String jarName;
private String fdtName;
}//class
Third, after the adaptor class has been generated and compiled, the Graphical Builder will invoke this adaptor class and its setTarget method. In JSIM Builder, the loaded federate is stored in a wrapper. The wrapper of the source target stores a list that contains all the events it will fire and the target federate plus the listener method which will listen to this event. This is the way that the Graphical Builder manages the events. In this way, the Graphical Builder can find the target federate of a certain event and the federate does not need to know if the target is from local or remote. The user may start the federation such as clicking the "start" button of the model agent.
As we can see from the above, building a federation is so simple in JSIM Builder that the user does not need to do any coding. The Graphical Builder encapsulates part of the communication service in itself. This feature facilitates the building of federations.
5.2.4 Runtime Environment
Figure 7: Food Court and ERoom Federation at Runtime
Consider a simple Food Court and ERoom Federation. It contains a ScenarioAgent, two BatchMeansAgent, a FoodCourtBean and an ERoomBean. The ScenarioAgent needs to fire an InstructEvent to the BatchMeansAgents. One BatchMeansAgent needs to fire a SimulateEvent to FoodCourtBean and the other one needs to fire SimulateEvent to ERoomBean. The FoodCourtBean needs to fire an InjectEvent to ERoomBean when a customer feels sick at the food court.
As we can see in figure 7, all the interaction between federates are actually completed by interacting with JSIM Builder. JSIM Builder is the RTI for the federate. According to the definition of federate, all the object representation is in federates in HLA. The ScenarioAgent, BatchMeansAgent, FoodCourtBean and ERoomBean are all federates. They communicate with JSIM Builder through the events. The events are the interface that allows the communication to happen. The JSIM Builder has a wrapper instance for each federate. When this wrapper catches an event, it will invoke the listener method for this event in its adaptor class. The listener method will fire this event to the target federates. When the target federate is from a remote machine, the adaptor class will forward this event to the targets wrapper on the remote machine and the remote wrapper will fire this event to the target federate.
5.3 Federate Deployer
The functions that the Federate Deployer provides are for build-time. These functions are called by Graphical Builder. They include:
Sun provides the deploy tool to deploy the Federate Deployer bean. When the server bean is deployed, it waits for the client to call.
5.4 Federation Adaptor
The Federation Adaptor of the JSIM builder provides part of the communication service. With the services provides by Federation Adaptor, a remote simulation model can be run on its remote host, and other federates can still interact with it. The complete communication service for federates is encapsulated in the Graphical Builder and the Federation Adaptor. With this communication service, a remote simulation model can be used to build the distributed federations as easily as the local ones. The communication service is responsible for delivering event to interested parties.
The functions provided by the Federation Adaptor are for runtime. These functions include:
When the Federation Adaptor is initialized, it first binds an instance of the AdaptorImpl class with the RMI server and waits for the client to call. If the user builds a federation with a remote simulation model, the Graphical Builder will generate an adaptor class like the one below. After the adaptor class is generated, it will also be compiled and initialized, so it can catch the event for it. By invoking the adaptor class and its methods, the user could run a remote simulation model with the designed federation without any coding.
5.5 Services Summary
The JSIM Builder provides a subset of HLA services. These services include:
There are some other RTI software around such as the Georgia Techs FDK. The FDK provides some RTI-Kit libraries and a GUI called Jane. Jane provides graphical controls and displays for the simulation [Perumalla et al., 1999]. We compare the functions of FDK and JSIM Builder in table 5.
As we can see, the advantage of JSIM Builder is that federation can be built entirely visually. This is because the JSIM Builder is implemented by using Java Beans and EJB. Although it provides limited functions compared to FDK, as more supporting utility beans are built, these deficiencies could be made up. For example, to monitor the simulation process, we can provide a monitor bean. So JSIM Builder is more flexible.
Table 5: Comparison of FDK and JSIM Builder
|
FDK |
JSIM Builder |
|
Hand coding needed to create a federation |
Supports visual building of federation, no hand coding needed |
|
Supports graphical view of simulation |
Supports graphical view of simulation |
|
Supports controlling federation. Provides more functions than JSIM Builder |
Supports controlling federation |
|
Pre- and post- simulation analysis |
Post-simulation analysis |
|
Simulation process can be monitored |
Simulation process can not be monitored |
|
Encapsulates communication in its RTI library |
Encapsulates communication in JSIM Builder |
|
Supports Time Management services |
Does not support Time Management services |
CHAPTER 6
AN EXAMPLE OF USING JSIM BUILDER
In JSIM, a federation can be built up by linking a certain number of simulation models and model agents together. The simulation model can represent a real world situation such as a BankBean. The simulation model can be assembled and generated by the graphical designer. There are three kinds of model agents in JSIM now. They are the ScenarioAgent, the BatchMeansAgent, and the ReplicationAgent. After the federation is created, it is ready to be executed. In this chapter, we are going to give examples on how to build a federation by using the JSIM builder. Before further discussion, we summarize the events fired and listened for by simulation models and agents in the following table.
Table 6: Events fired and listened by ModelBean and agents
|
ModelBean and agents |
Firing Events |
Listening Events |
|
ModelBean |
InformEvent ReportEvent InjectEvent |
SimulateEvent InjectEvent |
|
ScenarioAgent |
InstructEvent |
ReportEvent |
|
BatchMeansAgent |
SimulateEvent ReportEvent |
InformEvent |
|
ReplicationAgent |
SimulateEvent ReportEvent |
InformEvent |
Consider this situation. There is a food court somewhere a McDonald and a Wendy. When a customer comes to a food court (FoodCourtBean), if they feel sick, they may choose to go to a nearby hospital (ERoomBean). We call this federation the Food Court and ERoom federation.
According to the scenario above, we will need the following components to build up this federation. An ERoomBean simulation model represents the ERoom. A FoodCourtBean simulation model represents the food court. Two BatchMeansAgents are used to analyze the transaction of the ERoom and the food court. One ScenarioAgent will instruct the federation. In this case, we let the FoodCourtBean run on the local machine and the ERoomBean run on the remote machine. When the customer leaves the food court for the eroom, The FoodCourtBean can interact with the ERoomBean by firing an InjectEvent. The design diagram of this federation is shown in figure 8.
Figure 8: Design Diagram of Food Court and ERoom Federation

Figure 9: Food Court and ERoom Federation
By using the JSIM builder, the user could easily build a federation. For example, to build the federation described above, the user just need to carry out the following steps:

Figure 10: Execution of the Food Court and ERoom Federation
After all the hooking up has been done, you may see a screen shot as figure 9. To start the federation, the user just needs to click the "start" button of ScenarioAgent. When the federation is executed, the models of the FoodCourtBean and the ERoomBeans run on different machine. Figure 10 is a scaled screen shot of Food Court and ERoom Federation Execution.
CHAPTER 7
IMPLEMNETATION OF JSIM BUILDER
7.1 Technologies Involved
The aim of JSIM Builder is to support the reuse and interoperation of the JSIM simulation models. In order to achieve this goal, the JSIM Builder adopts some features and implements some technologies such as Java Bean, EJB, and RMI.
In JSIM builder, a federate can be a simulation model such as the BankBean, or it can be a model agent that could provide some decision-making ability. No matter what it is, each federate is in the form of a Java Bean and is stored in a JAR file. Because the Java Beans are the reusable components on the client side and they support some properties like introspection and event, the Graphical Builder can analyze their properties and methods, and invoke them at runtime. Each federate is stored in a JAR file in JSIM. Each JAR file may contain several federates. The JAR file format is provided by Sun. It can be serialized. The JAR file format brings several advantages in implementing JSIM Builder. First, the developer does not need to worry about missing any part of a federate. Second, since it can be serialized, it can be easily transferred through the web.
The federation in JSIM builder is a collection of federates simulation models and model agents. These federates are hooked up together according to a certain scenario. In JSIM, the graphical designer can create the federate and JSIM Builder can create the federation by using the federate generated by the graphical designer. A federation can represent some real world events, such as daily transaction of a Bank and its nearby supermarket. The federation works by interacting with the JSIM Builder and the JSIM Builder provides a work environment and communication service to it.
The Graphical Builder in JSIM Builder provides a graphical environment for building the federation and managing the federates. In order to introspect the properties and methods of federate, it utilizes the Reflection package that Java provides. The GUI that it provides facilitates the building of federations.
The EJB has the feature of server side "write once, run any where". We implement the Federate Deployer by using the EJB technology, so the server can be moved to another machine without any coding. For the Federation Adaptor, since we specify the server host from the command line, we can still move the server easily, although Federation Adaptor is implemented by using RMI.
In order to let a local federate interacts with a remote federate, the Federation Adaptor provides some methods that can control the behavior of the remote federate. The local federate may invoke these methods through RMI. The implementation of these methods is encapsulated in the Federation Adaptor. The interface of these methods is available to the Graphical Builder. So we can use the JSIM Builder to build a federation with a remote federate. This federate can be run on its remote host, but still cooperate with the whole federation. We implement the Federation Adaptor by using RMI instead of EJB, because the version of EJB that we use has some limitation, such as it restricts the use of GUI and we need a GUI to display the simulation in the server side.
7.2 Implementation
The current release of the JSIM Builder is written and compiled in JDK1.2.2. Details on the implementation of the Graphical Builder, the Federates Deployer, and the Federation Adaptor will be given below.
The JSIM Builder consists of five packages. These packages are the jbuild package, the feddeployer package, the fedadaptor package, the util package and the jbdk package. The jbuild package describes the Graphical Builder. The feddeployer package describes the Federates Deployer. The fedadaptor package describes the Federation Adaptor. The util package contains the interfaces that are needed for RMI, it also contains some utility classes needed by other package such as the Trace class. The jbdk package contains some classes needed that are useful in loading a JAR file.
7.2.1 Graphical Builder
The Graphical Builder is implemented in the jbuild package. This is a large package containing so many classes that we can not get the details of every class. Among all the classes in this package, we would like to introduce some important ones.
There are still some other classes that help to support the functionality of Graphical Builder. Since they are not important, we are not going to give the details of them.
7.2.2 Federates Deployer
The purpose of the Federate Deployer is to provide some methods to support the management of remote federates. To cope with this goal, the Federate Deployer provides some functions. These functions are described in the feddeployer package.
In the feddeployer package, the SimFederate class contains the server Beans remote interface. This interface is available to the client. The client may invoke the methods that are declared in this interface. The SimFederateEJB class implements the all the methods that declared in the SimFederate interface. This class is the major part of this whole package and most functions are implemented here. The methods that provides to the client include:
/***************************************************************
* get all the jar file's names on server side
*/
public Vector getJarNames() throws RemoteException;
/***************************************************************
* get the size of a jar file
*/
public int getComponentLength(String jarName) throws RemoteException;
/***************************************************************
* load a jar
*/
public byte [] getComponent(String jarName) throws RemoteException;
These methods help the Graphical Builder to manage the federates on server side. For example, the method getJarNames allows the client to get all the JAR files that stores the federates on the server side. When the Graphical Builder is initialized, it will call this method to get all the JAR file names available on the server side. The method getComponentLength allows the client get the length of a JAR file. The method getComponent allows the client get the contents of a JAR file. This method puts the content of a JAR file into a byte stream and returns it to the Graphical Builder. When the Graphical Builder gets the byte stream, it may call the JarLoader class to get the federates in it.
The Federate Deployer is implemented by using EJB, so it has the property of server side "run once, run any where".
7.2.3 Federation Adaptor
The Federation Adaptor is described in the fedadaptor package. The fedadaptor package includes the following classes: the FedAdaptor class, the HolderPane class, the FederateMaster class, the FederateThread class, the AdptorImpl class, the WrapperBox class and some support classes. The FedAdaptor class contains the main function, and it binds the AdptorImpl class with the RMI server. The AdaptorImpl class implements all the methods that are available in the Adaptor interface. The HolderPane class implements a panel. The FederateMaster class is in charge of all the services of the federate. The WrapperBox class supports with initializing the simulation model, storing the simulation model, running the simulation model, and handling the InjectEvent fired by another simulation model.
For the Federation Adaptor, the remote client is the Graphical Builder. The client invokes the Federation Adaptors methods through its RMI interface. The Federation Adaptor provides the below methods for the client to call.
/**
* Is RMI server waiting to initialize a federate
*/
public boolean isWaitingForInit() throws RemoteException;
/**
* Is RMI server wait to start current federate
*/
public boolean isWaitingForStart() throws RemoteException;
/**
* Return the string of current status
*/
public String whatStatus() throws RemoteException;
/**
* Initialize the federate
*/
public void initFederate(String fdtName, String jarName) throws RemoteException;
/**
* Start the simulation model by default
*/
public void startFederate() throws RemoteException;
/**
* Start the simulation model by event
*/
public void startFederate(jsim.process.SimulateEvent event) throws RemoteException;
/**
* Fire a Inject event to the remote simulation model
*/
public void injectFederate(jsim.process.InjectEvent event) throws RemoteException;
These methods are provided to the client in the Adaptor interface in the util package and are implemented in the AdptorImpl class.
CHAPTER 8
Based on the work that has been done for JSIM, especially its implementation of component technology and agent technology, we have implemented the builder for JSIM that provides the following capabilities:
Compared to RTI1.3 that implemented all the services of HLA, the JSIM builder supports only a subset of HLA services. We implement the Federation Management services by supporting the creation of federation. The Declaration Management services are provided by supporting the management of the events, and its source and target federates. The Object Management services are supported by providing communication service. We also provide part of the Data Distribution Management by managing the federate instance, but we have not implemented the data routing. We have not implemented the Ownership Management and Time Management services.
Below is some possible work that can be done in the future.
In the future, more work needs to be done on services that support the execution of federation, such as the Time Management services, simulation process monitoring.
We implemented Federation Adaptor by using RMI as the communication method. In the future, this part should be converted to using EJB, so that a complete "write once, run anywhere" server may come true.
More functionality needs to be implemented for the Federation Adaptor. For example, the Federation Adaptor should have some local decision making-ability, so that the user can modify the parameters of simulation.
[Cassady-Dorion et al., 1997] Cassady-Dorion, L., Brumbaugh, M., Maheshwari, S., Wright. J., Brookshier, D., Last, B., Mathis, J.. Industrial Strength Java. Published by New Riders.
[Dahmann et al., 1998] Dahmann, J., Fujimoto, R., Weatherly, R. (1998). The DoD High Level Architecture: An Update. In Proceedings of the 1998 Winter Simulation Conference, pages 797-804, Washington, DC.
[Dahmann et al., 1997] Dahmann, J., Fujimoto, R., Weatherly, R. (1997). The Department of Defense High Level Architecture. Winter Simulation Conference, December 1997.
[DMSO, 1998a] Defense Modeling And Simulation Office. High Level Architecture Rules, Version 1.3.
http://hla.dmso.mil/tech/rules.html
[DMSO, 1998b] Defense Modeling And Simulation Office. High Level Architecture Interface Specification, Version 1.3.
http://hla.dmso.mil/tech/ifspec.html
[DMSO, 1998c] Defense Modeling And Simulation Office. High Level Architecture Object Model Template Specification, Version 1.3.
http://hla.dmso.mil/tech/omtspec.html
[Fishman and Yarberry, 1997] Fishman, G., Yarberry, S.. An Implementation of Batch Means Methos, INFORMS Journal on Computing, 9(3):296-310
[Fishwick, 1996] Fishwick, P. (1996). Web-Based Simulation: Some Personal Observations. In Proceedings of the 1996 Winter Simulation Conference,
Coronado, California
[Fishwick, 1998a] Fishwick, P. (1998a). An Architectural Design for Digital Objects. In Proceedings of the 1998 Winter Simulation Conference, pages 359-365, Washington, DC.
[Fishwick, 1998b] Fishwick, P., editor (1998b). Proceedings of the 1998 International Conference on Web-Based Simulation and Modeling. Society for Computer Simulation, San Diego, CA. http://www.cise.ufl.edu/fishwick/webconf/full
[Fujimoto, 1998] Fujimoto, R.(1998). Time Management in the High Level Architecture
Simulation, Vol. 71, No. 6, pp. 388-400, December 1998.
[Fujimoto et al., 1996a] Fujimoto, R., Weatherly, R.(1996). Time Management in the DoD High Level Architecture.1996 Workshop on Parallel and Distributed Simulation, May 1996.
[Fujimoto et al., 1996b] Fujimoto, R., Weatherly, R. (1996). HLA Time Management and DIS.14th Workshop on Standards for the Interoperability of Distributed Simulation, March 1996.
[Fujimoto et al., 1996c] Fujimoto, R., Weatherly, R.. HLA Time Management and DIS. 14th Workshop on Standards for the Interoperability of Distributed Simulation, March 1996.
[Ge, 1998] Ge, Y.. Development of a Web-Based Simulation Environment Using Java Bean. Master Thesis, 1998, The University of Georgia.
[Hamilton, 1997] Hamilton, C.. (Editor). JavaBeans Sun Microsystems
http://java.sun.com/beans
[Javasoft, 1997] Java beans specification 1.0a
http://splash.javasoft.com/beans/beans/100A.pdf
[Kuhl et al., 1999] Kuhl, F., Weatherly, R,. Dahmann, J.. Creating Computer Simulation System: An Introduction to the High Level Architecture. Published by Prentice Hall PTR.
[Miller et al., 2000] Miller, J., Fishwick, P., Benjamin, P., Szymanski, B., Taylor, B.. (2000). Research and Commercial Opportunities in Web-Based Simulation. Panel on WEBSIM 2000.
[Miller et al., 1999] Miller, J., Seila, A., Xiang, X. (1999). The JSIM Web-based Simulation Environment. Future Generation Computing System Journal: Special Issue on Web-Based Modeling and Simulation (1999)
[Miller et al., 1998] Miller, J., Ge, Y., and Tao, J. (1998). Component-Based Simulation Environments: JSIM as a Case Study Using Java Beans. In Proceedings of the 1998 Winter Simulation Conference, pages 373-381, Washington, DC.
[Miller et al., 1997] Miller, J., Nair, R., Zhang, Z., and Zhao, H. (1997). JSIM: A Java-Based Simulation and Animation Environment. In Proceedings of the 30th Annual Simulation Symposium, pages 31-42, Atlanta, Georgia.
[Nair, 1997] Nair, R.. JSIM: A Java-Based Query Driven Simulation and Animation Environment. Master Thesis, 1997, The University of Georgia.
[Nair et al., 1996] Nair, R., Miller, J., and Zhang, Z. (1996). A Java-Based Query Driven Simulation Environment. In Proceedings of the 1996 Winter Simulation
Conference, pages 786-793, Coronado, California.
[Pawlan, 2000] Pawlan, M.. Enterprise Java Beans Working with Entity and Session Beans.
http://developer.java.sun.com/developer/technicalArticles/Beans/EJBEntity/index.html
[Perumalla et al., 1999] Perumalla, K., Fujimoto, R.. Jane: An Architecture for Interactive Parallel Simulation. WEBSIM '99. January 1999.
[Roth, 2000] Roth, B.. An Introduction to Enterprise Java Beans Technology.
http://developer.java.sun.com/developer/technicalArticles/Beans/IntroEJB/index.html
[Thomas et al., 1998] Thomas, A., Seybold, P.. Enterprise JavaBeans Technology
http://www.javasoft.com/products/ejb/
[Voss, 2000] Voss, G.. Java Beans, Part 1: Definition: Application Builder Tools
http://developer.java.sun.com/developer/onlineTraining/Beans/Beans1/builder-tools.html
[Xiang, 1999] Xiang, X.. Use of Agents to control the execution of Simulation Components. Master Thesis, 1999, The University of Georgia.
[Zhao, 1997] Zhao, H.. A Graphical Designer For JSIM. Master Thesis, 1997, The University of Georgia.
APPENDIX A
JSIM Builder Users Guide
When user uses the JSIM builder to build a federation, s/he could used it totally as a local builder tool, like the Suns BDK, or s/he could build distributed federation with it. In order to support building the distributed federation, we must first run the servers on the server side.
A.1 Deploying the EJB server
First of all, under the directory GINI, start the J2EE server at the command line prompt:
j2ee -verbose &
Then run the Application Deployment Tool:
deploytool &
When the Application Deployment Tool is shown (as figure 11), we need to create a new J2EE application.

Figure 11: Application Deployment Tool
After the SimFederateApp has been created, we need to create an EJB.jar file, and put it with this application by using the New Enterprise Bean Wizard. To start the New Enterprise Bean Wizard, from the File menu choose New Enterprise Bean. The wizard displays the following dialog boxes.
Now that the J2EE application contains an enterprise bean, it is ready for deployment.
A.2 Start the Federation Adaptor
To start the Federation Adaptor, you need first run rmiregistry. Under the prompt, type:
unsetenv CLASSPATH
rmiregistry &
After the rmiregistry is running, we can start the Federation Adaptor. Under the GINI directory, You may run the script runServer.sh.
RunServer.sh
The content of the RunServer.sh is:
#!/bin/sh
echo java -Djava.security.policy=fedadaptor.policy jsim.fedadaptor.FedAdaptor
java -Djava.security.policy=fedadaptor.policy jsim.fedadaptor.FedAdaptor
A.3 Start the JSIM Builder
Under the GINI directory, there is a script file called runClient.sh. It contains the initialize information of JSIM builder, such as the host address, the classpath, etc. Before you start it, you need to modify it. Below is an example of the runClient.sh.
#!/bin/sh
REMOVE = /bin/rm
#J2EE_HOME=<installation-location>
CPATH=$J2EE_HOME/lib/j2ee.jar:./SimFederateAppClient.jar:$HOME/JSIM/.:$HOME/GINI/.:.
echo java -Djava.compiler=NONE -Dorg.omg.CORBA.ORBInitialHost=orion.cs.uga.edu -classpath "$CPATH" jsim.jbuild.BuilderFrame
java -Djava.compiler=NONE -Dorg.omg.CORBA.ORBInitialHost=orion.cs.uga.edu -classpath "$CPATH" jsim.jbuild.BuilderFrame
After you specify the correct server host and classpath, you may run the script.
RunClient.sh
A.4 Building Federation
First, the user need to load all the desired federates model beans and model agents into the builder box. To do this, user just needs to choose desired federate in the list of federate manager, pulls done the "Design" menu and selects the "Load Federate", and then click the desired position in the builder box.
Second, when all the federates have been loaded, the user can hook them up according to certain scenario. Of the two federates that will be hooked up, the one that will fire an event is called source federate, and the one that will listen to this event is called target federate. To hookup the federates, the user may first set the source federate as the current active federate, then pulls down the "Design" menu and select the "Hookup" menu item. There will be popup menu with a list of events shown. User could choose the desired one. Then there will be a rubber band shown with the current active federate as the pivot point. The user may drag rubber band and click the target federate. After that, a dialog with a list of event listener methods will come up. The user may choose the listener method that could listen to the event. Then there will be a dialog pop up that indicates the adaptor class is generating and compiling. After it is done, the dialog will disappear.
Third, after the adaptor class has been generated and compiled, the user may start the federation such as clicking the "start" button of the ScenarioAgent. At the last step, usually some data have been collected during the simulation will be shown, and user may analyze them.
APPENDIX B
JSIM Builder Packages
|
Packages |
|
|
jsim.jbuild |
The jbuild package provides classes for building and executing federation graphically. |
|
jsim.feddeployer |
The feddeployer package provides classes for managing remote simulation models. |
|
jsim.fedadaptor |
The fedadaptor package provides class for local federate to interact with remote federate. |
|
jsim.util |
The util package provides miscellaneous convenience classes. |
|
jsim.jbdk |
The jbdk package provides class for loading and processing the content of JAR file. |
APPENDIX C
Relevant Part of HLA Java Classes
|
AsynchronousDeliveryAlreadyDisabled |
AsynchronousDeliveryAlreadyEnabled |
|
AttributeAcquisitionWasNotCanceled |
AttributeAcquisitionWasNotRequested |
|
AttributeAlreadyBeingAcquired |
AttributeAlreadyBeingDivested |
|
AttributeAlreadyOwned |
AttributeDivestitureWasNotRequested |
|
AttributeHandleSet |
AttributeHandleSetFactory. |
|
AttributeNotDefined |
AttributeNotKnown |
|
AttributeNotOwned |
AttributeNotPublished |
|
CaseInsensitiveName |
ConcurrentAccessAttempted |
|
CouldNotDiscover |
CouldNotOpenFED |
|
CouldNotRestore |
DeletePrivilegeNotHeld |
|
DimensionNotDefined |
EnableTimeConstrainedPending |
|
EnableTimeConstrainedWasNotPending |
EnableTimeRegulationPending |
|
EnableTimeRegulationWasNotPending |
ErrorReadingFED |
|
EventNotKnown |
FederateAlreadyExecutionMember |
|
FederateAmbassador |
FederateHandle |
|
FederateHandleSet |
FederateHandleSetFactory |
|
FederateInternalError |
FederateLoggingServiceCalls |
|
FederateNotExecutionMember |
FederateNotInSynchronizationSet |
|
FederateOwnsAttributes |
FederateWasNotAskedToReleaseAttribute |
|
FederatesCurrentlyJoined |
FederationExecutionAlreadyExists |
|
FederationExecutionDoesNotExist |
FederationTime |
|
FederationTimeAlreadyPassed |
FederationTimeFactory |
|
HandleValuePair |
InteractionClassNotDefined |
|
InteractionClassNotKnown |
InteractionClassNotPublished |
|
InteractionClassNotSubscribed |
InteractionParameterNotDefined |
|
InteractionParameterNotKnown |
InvalidExtents |
|
InvalidFederationTime |
InvalidLookahead |
|
InvalidOrderingHandle |
InvalidRegionContext |
|
InvalidResignAction |
InvalidRetractionHandle |
|
InvalidTransportationHandle |
NameNotFound |
|
ObjectAlreadyRegistered |
ObjectClassNotDefined |
|
ObjectClassNotKnown |
ObjectClassNotPublished |
|
ObjectClassNotSubscribed |
ObjectNotKnown |
|
OrderType |
RTI |
|
RTIambassador |
RTIexception |
|
RTIimpl |
RTIimpl_Skel |
|
RTIimpl_Stub |
RTIinternalError |
|
ReceivedInteraction |
ReflectedAttribute |
|
RegionNotKnown |
ResignAction |
|
RestoreInProgress |
RestoreNotRequested |
|
SaveInProgress |
SaveNotInitiated |
|
SpaceNotDefined |
SpecifiedSaveLabelDoesNotExist |
|
SynchronizationLabelNotAnnounced |
SynchronizationLabelOutstanding |
|
SynchronizationPointLabelWasNotAnnounced |
TimeAdvanceAlreadyInProgress |
|
TimeAdvanceWasNotInProgress |
TimeConstrainedAlreadyEnabled |
|
TimeConstrainedWasNotEnabled |
TimeRegulationAlreadyEnabled |
|
TimeRegulationWasNotEnabled |
TooManyFederates |
|
UnableToPerformSave |
UnimplementedService. |
|
TransportType |