logo资料库

HLA/RTI 分布式仿真初学者指南.pdf

第1页 / 共101页
第2页 / 共101页
第3页 / 共101页
第4页 / 共101页
第5页 / 共101页
第6页 / 共101页
第7页 / 共101页
第8页 / 共101页
资料共101页,剩余部分请下载后查看
1. Introduction
1.1. How to use this tutorial
1.2. HLA is about Interoperability and Reuse
1.3. Who uses HLA
1.4. HLA is a standard
2. The Architecture and Topology of HLA
2.1. Topologies for Integrating Systems
2.2. HLA Terminology
2.3. The Federation Agreement and the Federation Object Model
2.4. Content of a FOM
3. HLA Services
3.1. HLA Services
3.2. Information Services
3.3. Synchronization Services
3.4. Coordination Services
3.5. Service grouping in the HLA standard
3.6. About the Standards documents
4. Connecting to a Federation
4.1. Getting Connected
4.2. An Overview of the Example Application
4.3. Practical Exercise
4.4. An HLA Module for Your Simulation
4.5. The Central and Local RTI components
4.6. Connecting and Joining
4.7. A look at the RTI
4.8. Resigning and Disconnecting
4.9. Calls and Callbacks
4.10. HLA Service: Connect
4.11. HLA Service: Create Federation Execution
4.12. HLA Service: Join Federation Execution
4.13. HLA Service: Resign Federation Execution
4.14. HLA Service: Destroy Federation Execution
4.15. HLA Service: Disconnect
4.16. Additional comments
4.17. Practical Exercise
5. Interactions – Creating the FOM
5.1. Overview
5.2. A First Look at the FOM
5.3. The Identification table
5.4. Interactions with parameters
5.5. A simple data type
5.6. More about FOMs
5.7. Practical Exercise
6. Interactions – Calls for Sending and Receiving
6.1. Initial preparations for Interactions
6.2. Encoding and Decoding Helpers
6.3. HLA Service: Get Interaction Class Handle
6.4. HLA Service: Get Parameter Handle
6.5. HLA Service: Publish Interaction Class
6.6. HLA Service: Subscribe Interaction Class
6.7. A look at the RTI
6.8. Code for Sending Interactions
6.9. HLA Service: Send Interaction
6.10. Receiving Interactions
6.11. HLA Service: Receive Interaction (callback)
6.12. Additional Comments
6.13. Practical Exercise
7. Objects – Creating the FOM
7.1. The Car Object Class
7.2. A closer look at the Name attribute
7.3. A closer look at the FuelType attribute
7.4. A closer look at the Position attribute
7.5. Practical Exercise
8. Objects – Calls for Registering and Discovering
8.1. Object Registration Overview
8.2. Initial preparations for Registering and Discovering Objects
8.3. HLA Service: Get Object Class Handle
8.4. HLA Service: Get Attribute Handle
8.5. HLA Service: Publish Object Class Attributes
8.6. HLA Service: Subscribe Object Class Attributes
8.7. A look at the RTI
8.8. Code for Registration of an Object Instance
8.9. HLA Service: Register Object Instance
8.10. A look at the RTI
8.11. How to discover object instances
8.12. HLA Service: Discover Object Instance (callback)
8.13. More about object registration
8.14. Practical Exercise
9. Objects - Calls for Updating and Reflecting Attribute Values
9.1. When to Update
9.2. Initial preparations
9.3. Sending Attribute Updates
9.4. HLA Service: Update Attribute Values
9.5. Responding to Provide
9.6. HLA Service: Provide Attribute Value Update (callback)
9.7. Reflecting Attribute Values (callback)
9.8. HLA Service: Reflect Attribute Values (callback)
9.9. Practical Exercise
10. Testing and Debugging Federates and Federations
10.1. What should you test?
10.2. Look at the RTI
10.3. Inspecting Data with a Data Logger
10.4. Tracing RTI Calls
10.5. Test with proven federates
10.6. Test with proven data
10.7. Get your federate certified
10.8. Test and understand the federate performance
11. Object Oriented HLA
11.1. What is Object Oriented HLA
11.2. Types of OO-HLA implementations
11.3. Using OO-HLA in the Fuel Economy Federation
11.4. Sample OO-HLA program code
12. Summary and Road Ahead
12.1. About the Fuel Economy Federation – interoperability and reuse
12.2. DSEEP - a process for developing federations
12.3. More HLA Features: Ownership, Time Management and DDM
12.4. Have Fun!
Purpose, audience
Revision history
Abbreviations, definitions
References
Related documents
Conceptual domain model
Federation and participating federates
FOM
Overview of information flow, DDM usage (optionally)
Relation to other systems
Standards, hardware, software and networks
Principles for sending interactions
Principles for updating attributes and ownership
Technical representation of data
Time management and time
Information about Car objects
Management interactions
Start-up and shutdown
The scenario management is required to take place before the execution management. The Master federate sends a LoadScenario interaction. Each federate responds, indicating whether the scenario was successfully loaded or not. The operator of the Master...
Scenario management
Execution management (starting and stopping)
Save/restore
Error handling
Logging
Analysis
12.5. Publish Subscribe Matrix
THE HLA TUTORIAL A PRACTICAL GUIDE FOR DEVELOPING DISTRIBUTED SIMULATIONS GET AN OVERVIEW OF HLA LEARN HOW TO DESIGN HLA FEDERATIONS UNDERSTAND HOW TO DEVELOP FEDERATION OBJECT MODELS MASTER THE SERVICES OF THE RUN-TIME INFRASTRUCTURE PART 1
The HLA Tutorial v1.0 Copyright Pitch Technologies. See page 2. STAY UP TO DATE! THE MOST RECENT VERSION OF THIS DOCUMENT, CODE SAMPLES AND SOFTWARE ARE AVAILABLE AT WWW.PITCH.SE/HLATUTORIAL Copyright Pitch Technologies AB, Sweden, 2012. All rights reserved with the following exceptions: This document may be copied and redistributed for commercial and non-commercial purposes with the following restrictions:  The document must be provided in its entirety. No part of the document may be removed or modified or reused in other documents. No content may be added.  The copyright notice on the document cover and on each page must be included and clearly visible. It may not be translated without our prior consent.   No charge may apply for the document, except for direct media costs.  Copies may only be provided as PDF files or in print. The document is provided “as is”. Pitch assumes no responsibility or liability for the content. 2
The HLA Tutorial v1.0 Copyright Pitch Technologies. See page 2. ABOUT THIS TUTORIAL “The High-Level Architecture is a powerful technology for developing distributed simulations. It is amazing to see how people use it to make simulations work together in many different domains, to create simulations that have never been created before. I have been involved in the HLA community since the mid 90’s both in the standards development and the user community. I have also given at least one hundred HLA courses and seminars on four continents. With this document I want to offer everyone a practical introduction to HLA, based on these experiences. This tutorial is mainly targeted at developers. I have written the tutorial as a small story where you can follow how an HLA federation is developed, step-by- step. It is intended to complement the HLA standard, which provides the final and complete specification of HLA. I would also like to encourage the reader to become part of the HLA community through SISO, colleagues, numerous simulation conferences, papers, and of course the Internet. Enjoy the reading!” Björn Möller The team who developed “The HLA Tutorial” and the “HLA Evolved Starter Kit”: Björn Möller Åsa Wihlborg Filip Klasson Björn Löfstrand Martin Johansson Pär Aktanius Mikael Karlsson Steve Eriksson Patrik Svensson 3
The HLA Tutorial v1.0 Copyright Pitch Technologies. See page 2. Table of Contents 1. Introduction ............................................................................................................................. 5 2. The Architecture and Topology of HLA .......................................................................... 8 3. HLA Services ........................................................................................................................... 13 4. Connecting to a Federation ............................................................................................... 17 5. 6. Interactions – Creating the FOM ...................................................................................... 24 Interactions – Calls for Sending and Receiving .......................................................... 30 7. Objects – Creating the FOM ............................................................................................... 35 8. Objects – Calls for Registering and Discovering ........................................................ 42 9. Objects - Calls for Updating and Reflecting Attribute Values ............................... 48 10. Testing and Debugging Federates and Federations ............................................ 53 11. Object Oriented HLA ....................................................................................................... 59 Summary and Road Ahead ............................................................................................ 64 12. Appendix A: The Fuel Economy Federation Agreement .................................................. 67 Appendix B: The Fuel Economy FOM ...................................................................................... 74 Appendix C: Description of Federates and File Formats ................................................. 78 Appendix D: Lab Instructions ................................................................................................... 83 Lab D-1: A first test run of the federation ............................................................................. 84 Lab D-2: Connect, Create and Join. .......................................................................................... 86 Lab D-3: Developing a FOM for Interactions ........................................................................ 88 Lab D-4: Sending and receiving interactions ....................................................................... 90 Lab D-5: Developing a FOM for object classes ..................................................................... 92 Lab D-6: Registering and discovering object instances ................................................... 93 Lab D-7: Updating objects .......................................................................................................... 95 Lab D-8: Running a Distributed Federation ......................................................................... 97 Appendix E: The Sushi Restaurant federation .................................................................... 99 Appendix F: A summary of the HLA Rules ......................................................................... 101 4
The HLA Tutorial v1.0 Copyright Pitch Technologies. See page 2. 1. Introduction  This tutorial provides both overview and technical details  The purpose of HLA is interoperability and reuse  HLA enables simulations to interoperate in a federation of systems  HLA originated in the defense sector but is today increasingly used in civilian applications  The HLA standard is part of policies, for example in NATO  HLA enables a marketplace for simulations 1.1. How to use this tutorial Welcome to the HLA Tutorial. This tutorial covers everything from an overview of what HLA is used for, to the practical design and development of HLA based systems. Here is a short guide for the reader:    If you want a quick overview of what HLA is all about, you can start with reading this first chapter. If you want to understand the technical architecture of HLA, also read chapter two and three about the architecture and services of HLA. If you intend to understand how to develop HLA based systems then continue with the rest of the tutorial. This tutorial is available as a stand-alone document or as part of the HLA Evolved Starter Kit. This kit contains software and samples with source code that you can run on your own computer, study, experiment with, extend or even use as a starting point for your own HLA development. This document contains instructions about practical labs that you can perform for many of the chapters. This document is based on the latest version of HLA, commonly called HLA Evolved with the formal name IEEE 1516-2010. HLA Evolved builds upon earlier HLA versions such as HLA 1516-2000 and HLA 1.3. 1.2. HLA is about Interoperability and Reuse The High-Level Architecture, HLA, is an architecture that enables several simulation systems to work together. This is called interoperability, a term that covers more than just sending and receiving data. The systems need to work together in such a way that they can achieve an overarching goal by exchanging services. 5
The HLA Tutorial v1.0 Copyright Pitch Technologies. See page 2. Why do we need to connect several simulation systems? One reason is that an organization may already have a number of simulation systems that need to be used together with newly acquired simulations or simulations from other organizations. Another reason is that there may be a requirement to simulate a “bigger picture”, where models from different organizations interact. Experts from different fields need to contribute different models. In many cases it would also be a monumental task to build one big system that covers everything compared to connecting several different simulations. One important principle of HLA is to create a federation of systems. Most simulation systems are highly useful on their own. With HLA, we can combine them to simulate more complex scenarios and chains of events. HLA enables us to reuse different systems in new combinations. The two main merits of HLA are thus interoperability and reuse. 1.3. Who uses HLA Two of the most common use cases for HLA are:  Training, where humans are trained to perform tasks.  Analysis, where we can try different scenarios in a simulated world. Other use cases include test, engineering, and concept development. HLA was originally developed for defense applications. This is still an important use case for HLA. Examples include training several pilots in flight simulators in motor skills, decision skills, and communications. Another area is command-level training where officers are trained to manage complex situations and command thousands of simulated participants. HLA enables this training to be joint (between Army, Navy, and Air Force) and combined (for example between Navies from different nations). Training for peace support operations is a related area where defense units can train operations together with police, fire fighters, and non-government organizations such as the Red Cross. Like many other technologies, originally developed in the defense area, there is a growing civilian user base of HLA. One example is space applications where complex missions, possibly taking months and years, can be simulated in a shorter time and emergency situations can be trained without any real risk. HLA has also been used for space mission control training, such as the docking of automated transfer vehicles with the International Space Station. Another area is Air Traffic Management where new procedures can be developed, evaluated and trained using a number of interoperable simulations. Yet other areas include manufacturing, offshore oil production, national railroad 6
The HLA Tutorial v1.0 Copyright Pitch Technologies. See page 2. systems, medical simulations, environment, and hydrology. 1.4. HLA is a standard HLA is an open international standard, developed by the Simulation Interoperability Standards Organization (SISO) and published by IEEE. The development process is open and transparent. Everyone can participate in the development, suggest improvements, take part in the discussions and vote. HLA is a standards document that describes the components of HLA and what interfaces and properties they must have. Anyone can develop any software component of HLA. Implementations of the different components are today available from commercial companies, governments, academia, and open source developers. HLA is today a prescribed or recommended standard, for example in NATO as well as by national departments of defense. By establishing such policies, it is possible to facilitate the interoperability of different systems that are acquired over time by an organization. Another effect of standards is that they enable a marketplace. When systems from different suppliers become interoperable, an end user can select and combine systems that meet his requirements. This reduces the cost, time, and risk for the end user while providing more opportunities for system vendors. 7
The HLA Tutorial v1.0 Copyright Pitch Technologies. See page 2. 2. The Architecture and Topology of HLA  The HLA topology is a Service Bus  Important terms in HLA are: RTI, Federate, Federation, Federation Object Model, and Federation Execution  The Federation Agreement is a document that specifies the design of a particular federation for a particular purpose  The Federation Object Model (FOM) is the language of the Federation 2.1. Topologies for Integrating Systems The previous chapter introduced the concept of a Federation of systems. So how do we connect systems so that they can exchange services in order to meet a common goal? Figure 2-1 shows two common topologies: Figure 2-1: Two topologies When using pair-wise integration you connect systems that need to exchange services in pairs. For each pair of systems, you establish an agreement of what services to exchange. This works well for a few systems, but as the number of systems grows the number of connections will grow exponentially. Another issue is that each system needs explicit knowledge about all other systems that it needs to exchange data with. When you add one new system, you may need to modify a large number of existing systems. The other type of integration is called Service Bus. Each system has just one connection to the service bus. A common set of services has been agreed upon. Each system provides or consumes the particular services that it is interested in. 8
分享到:
收藏