Building Software for Simulation: Theory and Algorithms, with Applications in C++
Format: PDF / Kindle (mobi) / ePub
A unique guide to the design and implementation of simulation software
This book offers a concise introduction to the art of building simulation software, collecting the most important concepts and algorithms in one place. Written for both individuals new to the field of modeling and simulation as well as experienced practitioners, this guide explains the design and implementation of simulation software used in the engineering of large systems while presenting the relevant mathematical elements, concept discussions, and code development.
The book approaches the topic from the perspective of Zeigler's theory of modeling and simulation, introducing the theory's fundamental concepts and showing how to apply them to engineering problems. Readers will learn five necessary skills for building simulations of complicated systems:* Working with fundamental abstractions for simulating dynamic systems* Developing basic simulation algorithms for continuous and discrete event models* Combining continuous and discrete event simulations into a coherent whole* Applying strategies for testing a simulation* Understanding the theoretical foundations of the modeling constructs and simulation algorithms
The central chapters of the book introduce, explain, and demonstrate the elements of the theory that are most important for building simulation tools. They are bracketed by applications to robotics, control and communications, and electric power systems; these comprehensive examples clearly illustrate how the concepts and algorithms are put to use. Readers will explore the design of object-oriented simulation programs, simulation using multi-core processors, and the integration of simulators into larger software systems.
The focus on software makes this book particularly useful for computer science and computer engineering courses in simulation that focus on building simulators. It is indispensable reading for undergraduate and graduate students studying modeling and simulation, as well as for practicing scientists and engineers involved in the development of simulation tools.
set of measurements and assumptions, the angular mass is 2 Jg = m gb r gb The compliance of the tracks is an order-of-magnitude approximation. The tracks can be stretched by only a few millimeters before they slip off the wheels. The maximum propulsive force of the track is about a newton. The order of magnitude of the track compliance is, therefore, estimated to be 10−3 meters/100 newtons, or about 10−3 m/N. 2.2.3 Complete Model of the Tank’s Continuous Dynamics Equations 2.1–2.9 and 2.11–2.16
of input; an output trajectory is a function from N to Y ; and a state trajectory is a function from N to S. 3.1.1 Trajectories The value of a trajectory z (it can be an input, output, or state trajectory) at a specific time t is written z(t). A trajectory defined on an interval from t0 to tn is denoted generically by z < t0 , tn >. When specific endpoints are desired, the < and > are replaced with [ and ] for inclusion or ( and ) for exclusion, specifically t ∈ [t0 , tn ] ⇐⇒ t0 ≤ t ≤ tn t ∈ (t0
P1: OSO c04 JWBS040-Nutaro 112 August 30, 2010 14:17 Printer Name: Yet to Come DISCRETE-EVENT SYSTEMS interrupt ← true Left/right motor direction Left/right motor on−time te s Start interrupt 432 µs interrupt Output End interrupt el , er if el = el ∨ er = er c ← (c+32) mod 255 el/r ← el/r interrupt ← false el/r ← 7.2 (c < left/right motor on-time) el/r ← −el/r if rl/r = true FIGURE 4.2 Corrected event graph for the tank’s interrupt handler. is used to indicate the state of the
85 86 87 88 void InterruptHandler::output_func(Bag
quantified, advantage to the modeler and software engineer. The small set of very expressive modeling constructs, the natural and uniform handling of simultaneity, and the resulting simplicity with which large models are built can greatly reduce the cost of simulating a complex system. 3 Implementations in other programming languages can be found with a search for discrete-event (system) simulation (DEVS) and simulation on the World Wide Web. P1: OSO c01 JWBS040-Nutaro 6 August 26, 2010