Encyclopedia
A
simulation is an imitation of some real thing, state of affairs, or process. The act of simulating something generally entails representing certain key characteristics or behaviors of a selected physical or abstract system.
Historically, the word had negative connotations:
- …for Distinction Sake, a Deceiving by Words, is commonly called a Lye, and a Deceiving by Actions, Gestures, or Behavior, is called Simulation… Robert South
However, the connection between simulation and dissembling later faded out and is now only of linguistic interest.
Simulation is used in many contexts, including the modeling of natural systems or human systems in order to gain insight into their functioning. Other contexts include simulation of
technology for performance optimization,
safety engineering,
testing,
training and
education. Simulation can be used to show the eventual real effects of alternative conditions and courses of action.
Key issues in simulation include acquisition of valid source information about the referent, selection of key characteristics and behaviours, the use of simplifying approximations and assumptions within the simulation, and fidelity and validity of the simulation outcomes.
=Types of simulation=
Historically, simulations used in different fields developed largely independently, but
20th century studies of Systems theory and
Cybernetics combined with spreading use of computers across all those fields have led to some unification and a more systematic view of the concept.
Physical and interactive simulation
Physical simulation refers to simulation in which physical objects are substituted for the real thing. These physical objects are often chosen because they are smaller or cheaper than the actual object or system.
Interactive simulation is a special kind of physical simulation, often referred to as a
human in the loop simulation, in which physical simulations include human operators, such as in a flight simulator.
Computer simulation
Main article: Computer simulation
Related article: Model
A computer simulation is an attempt to model a real-life situation on a computer so that it can be studied to see how the system works. By changing variables, predictions may be made about the behaviour of the system.
Computer simulation has become a useful part of modeling many natural systems in
physics,
chemistry and
biology, and human systems in
economics and
social science as well as in engineering to gain insight into the operation of those systems. A good example of the usefulness of using computers to simulate can be found in the field of network traffic simulation. In such simulations the model behaviour will change each simulation according to the set of initial parameters assumed for the environment.
Computer simulations are often considered to be
human out of the loop simulations.
Traditionally, the formal modeling of systems has been via a mathematical model, which attempts to find analytical solutions to problems which enables the prediction of the behaviour of the system from a set of parameters and initial conditions. Computer simulation is often used as an adjunct to, or substitution for, modeling systems for which simple closed form analytic solutions are not possible. There are many different types of computer simulation, the common feature they all share is the attempt to generate a sample of representative scenarios for a model in which a complete enumeration of all possible states of the model would be prohibitive or impossible. Several software packages exist for running computer-based simulation modeling that makes the modeling almost effortless and simple .
It is increasingly common to hear simulations of many kinds referred to as "synthetic environments". This label has been adopted to broaden the definition of "simulation" to encompass virtually any computer-based representation.
Instruction simulation
Instruction simulation is a methodology employed for one of several possible reasons:-
- To simulate the machine code of another hardware device or entire computer for upward compatibility.
- To monitor and execute the machine code instructions on the same hardware for test & debugging purposes.
- To monitor and execute the machine code instructions on the same hardware primarily for memory protection purposes. For example to protect against accidental or deliberate Buffer overflow.
The basic technique is the same regardless of purpose - first execute the monitoring program passing the name of the target program as an additional input parameter.
The target program is then loaded into memory - but control is never passed to the code. Instead, the entry point within the loaded program is calculated and a pseudo Program status word is set to this location. A set of pseudo registers are set to what they would have contained - if the program had been given control directly.
.
Thereafter, execution proceeds as follows:-
1. Determine length of instruction at pseudo PSW location
- If this instruction offset within program matches a set of previously given "pause" points, set "Pause" reason, go to 7.
2. "Fetch" the instruction from its original location into the monitor programs memory.
- If "trace" is available & "on", store program name, instruction offset and any other values
3. depending upon instruction type, perform pre-execution checks & execute
- If the instruction cannot proceed for any reason go to 7.
- If the instruction is about to alter memory, check memory destination exists and is sufficiently large.
If OK, load appropriate pseudo registers into temporary real registers,
perform equivalent move with the real registers), if trace "on" save address & length of altered storage, go to 4.
- If the instruction is a "register-to-register" operation, load pseudo registers into monitors real registers,
perform operation, store back to respective pseudo registers, go to 4.
- If the instruction is a conditional branch, determine if condition satified
If NOT go to 4.
If condition IS satsfied, calculate branch to address, determine if valid - if not, set error = "Wild branch", go to 7.
If OK, go to 5.
- If instruction is an Operating system call, do real call from monitorng program by
"faking" addresses to return control to monitor program
and then reset pseudo registers to reflect call go to 4.
4. Add instruction length to current Pseudo PSW value
5. Store next address in Pseudo PSW
6. Go to 1.
7. Halt execution
For test/debugging purposes, the monitoring program can provide facilities to view and alter registers, memory, and re-start location or obtain a mini core dump or print symbolic program names with current data values. It could permit new conditional "pause" locations, remove unwanted pauses and suchlike.
Instruction simulation provides the opportunity to detect errors BEFORE execution which means that the conditions are still exactly as they were and not destroyed by the error. A very good example from the
IBM S/360 world is the following instruction sequence that can cause difficulties debugging without an instruction simulation monitor.
LM R1,R15,12 where r13 incorrectly points to string of X"00"s
BR R14 causes PSW to contain X"0000002" with program check "Operation Exception"
* all registers on error contain nulls.
Overhead: The number of instructions to perform the above basic "loop" depends on hardware but it could be accomplished on
IBM S/360/370/390/ES9000 range of machines in around 12 or 13 instructions for many instruction types. Checking for valid memory locations or for conditional "pause"s add considerably to the overhead but optimization techniques can reduce this to acceptable levels. For Testing purposes this is normaly quite acceptable as powerful debugging capabilities are provided including instruction step, trace and deliberate jump to test error routine . In addition, a full instruction trace can be used to test actual code coverage.
Added benefits: Occasionally, monitoring the execution of a target program can help to highlight random errors that either appear while monitoring but not in real execution. This can happen when the target program is loaded at a different location than normal because of the physical prescence of the monitoring program in the same address space.
If the target program picks up the value from a "random" location in memory , it may for example be nulls in almost every normal situation and the program works OK . If the monitoring program shifts the load point, it may pick up say X"FF" and the logic would cause different results during a comparison operation. Alternatively, if the monitoring program is now occupying the space where the value is being "picked up" from, similar results might occur.
Both these scenarios have occured to the authors knowledge on many occasions, where the actual monitoring of a target program apparently "fixes" a bug or alternatively "causes" one!
Re-entrancy bugs: accidental use of static variables instead of "dynamic" thread memory can cause re-entrancy problems in many situations. Use of a monitoring program can detect these even without a storage protect key.
Illegal operations: some operating systems require the application program to be in the correct "mode" for certain calls to the Operating system. Instruction simulation can detect these conditions before execution.
Typical trace output from simulation by monitoring program used for test & debugging Programoffset instruction Dis-assembled register/ storage TEST001000000 X'05C0'BALR R12,0 R12=002CE00A
000002 X'47F0C00E' BC 15,X'00E'
00000E X'98ECD00C' STM R14,R12,X'00C' X'002E0008'
> X'00004CE,002CE008,..etc....'
000012 X'45E0C122' BAL R14,X'122' R14=002C0016
SUB1 000124 X'50E0C28A' ST R14,X'28A' X'002CE294'
> X'002C0016'
etc...
Simulation in computer science
In computer science, simulation has an even more specialized meaning:
Alan Turing uses the term "simulation" to refer to what happens when a digital computer runs a state transition table that describes the state transitions, inputs and outputs of a subject discrete-state machine. The computer simulates the subject machine.
In computer programming, a simulator is often used to execute a program that has to run on some inconvenient type of computer. For example, simulators are usually used to debug a microprogram or sometimes commercial application programs. Since the operation of the computer is simulated, all of the information about the computer's operation is directly available to the programmer, and the speed and execution of the simulation can be varied at will. See above section on Instruction simulation for use in memory protection & test/debugging.
Simulators may also be used to interpret
fault trees, or test VLSI logic designs before they are constructed.
In theoretical computer science the term
simulation represents a relation between state transition systems. This is useful in the study of operational semantics.
Simulation in training
Simulation is often used in the
training of civilian and military personnel. This usually occurs when it is prohibitively expensive or simply too dangerous to allow trainees to use the real equipment in the real world. In such situations they will spend time learning valuable lessons in a "safe" virtual environment. Often the convenience is to permit mistakes during training for a safety-critical system.
Training simulations typically come in one of three categories:
- "live" simulation ;
- "virtual" simulation , or
- "constructive" simulation . Constructive simulation is often referred to as "wargaming" since it bears some resemblance to table-top war games in which players command armies of soldiers and equipment which move around a board.
Simulation in education
Simulations in education are somewhat like training simulations. They focus on specific tasks. In the past, video has been used for teachers and education students to observe, problem solve and role play; however, a more recent use of simulations in education include animated narrative vignettes . ANVs are cartoon-like video narratives of hypothetical and reality-based stories involving classroom teaching and learning. ANVs have been used to assess knowledge, problem solving skills and dispositions of children, and pre-service and in-service teachers.
Another form of simulation has been finding favour in business education in recent years. Business simulations that incorporate a dynamic model enables experimentation with business strategies in a risk free environment and provide a useful extension to case study discussions.
Medical Simulators
Medical simulators are increasingly being developed and deployed to teach therapeutic and diagnostic procedures as well as medical concepts and decision making to personnel in the health professions. Simulators have been developed for training procedures ranging from the basics such as blood draw, to
laparoscopic surgery and trauma care.
Many medical simulators involve a computer connected to a plastic simulation of the relevant
anatomy. Sophisticated simulators of this type employ a life size mannequin which responds to injected drugs and can be programmed to create simulations of life-threatening emergencies.
In others simulations, visual components of the procedure are reproduced by computer graphics techniques, while touch-based components are reproduced by
haptic feedback devices combined with physical simulation routines computed in response to the user's actions. Medical simulations of this sort will often use 3D
CT or
MRI scans of patient data to enhance realism. Some medical simulations are developed to be widely distributed and can be interacted with using standard computer interfaces, such as the
keyboard and
mouse.
Another important medical application of a simulator -- although, perhaps, denoting a slightly different meaning of
simulator -- is the use of a
placebo drug, a formulation which simulates the active drug in trials of drug efficacy .
History of Medical Simulation
The first medical simulators were simple models of human patients.
Since antiquity, these representations in clay and stone were used to demonstrate clinical features of disease states and their effects on humans. Models have been found from many cultures and continents. These models have been used in some cultures as a "diagnostic" instrument, allowing women to consult male physicians while maintaining social laws of modesty. Models are used today to help students learn the
anatomy of the musculoskeletal system and organ systems.
Active models
Active models which attempt to reproduce living anatomy or physiology are recent developments.
The famous “Harvey” mannikin was developed at the
University of Miami and is able to recreate many of the physical findings of the
cardiology examination, including palpation, auscultation, and
electrocardiography.
Interactive models
More recently, interactive models have been developed which respond to actions taken by a student or physician. Until recently, these simulations were two dimensional computer programs which acted more like a textbook than a patient. Computer simulations have the advantage of allowing a student to make judgements, and also to make errors. The process of iterative learning through assessment, evaluation, decision making, and error correction creates a much stronger learning environment than passive instruction.
Computer simulators
Simulators have been proposed as an ideal tool for assessment of students for clinical skills.
Programmed patients and simulated clinical situations, including mock disaster drills, have been used extensively for education and evaluation. These “lifelike” simulations are expensive, and lack reproducibility. A fully functional "3Pi" simulator would be the most specific tool available for teaching and measurement of clinical skills.
Such a simulator meets the goals of an objective and standardized examination for clinical competence. This system is superior to examinations which use "standard patients" because it permits the quantitative measurement of competence, as well as reproducing the same objective findings.
The "classroom of the future"
The "classroom of the future" will probably contain several kinds of simulators, in addition to textual and visual learning tools. This will allow students to enter the clinical years better prepared, and with a higher skill level. The advanced student or postgraduate will have a more concise and comprehensive method of retraining -- or of incorporating new clinical procedures into their skill set -- and regulatory bodies and medical institutions will find it easier to assess the proficiency and competency of individuals.
The classroom of the future will also form the basis of a clinical skills unit for continuing education of medical personnel; and in the same way that the use of periodic flight training assists airline pilots, this technology will assist practitioners throughout their career.
The simulator will be more than a "living" textbook, it will become an integral a part of the practice of medicine. The simulator environment will also provide a standard platform for curriculum development in institutions of medical education.
City Simulators / Urban Simulation
A
City Simulator can be a game but can also be a tool used by urban planners to understand how cities are likely to evolve in response to various policy decisions. UrbanSim and ILUTE are examples of modern, large-scale urban simulators designed for use by urban planners. City simulators are generally agent-based simulations with explicit representations for land use and transportation.
Flight simulators
Main article: Flight simulatorA flight simulator is used to train
pilots on the ground. It permits a pilot to crash his simulated "aircraft" without being hurt. Flight simulators are often used to train pilots to operate aircraft in extremely hazardous situations, such as landings with no engines, or complete electrical or hydraulic failures. The most advanced simulators have high-fidelity visual systems and hydraulic motion systems. The simulator is normally cheaper to operate than a real trainer aircraft.
Home-built Flight Simulators
Main article: Flight simulator Simulation GameSome people who use simulator games, especially flight simulator
software, build their own simulator at home. Some people in order to further the realism of their homemade simulator, buy used cards and racks that still run the exact same software they did before they were disassembled from the actual machine its self. Though this brings along the problem of matching hardware and software, and the fact that hundreds of cards plug into many different racks, still, many find that is it well worth it. Some are very serious in building their simulator by buying real aircraft parts like complete nose sectionals of written off
aircraft at aircraft
boneyards. This permits people who are unable to perform their hobby in real life to simulate it.
Marine simulators
Bearing resemblance to flight simulators, marine simulators train a ships' personell. Simulators like these are mostly used to simulate large or complex vessels, such as cruiseships and
dredging ships. They often consist of a replication of a ships' bridge, with operating desk, and a number of screens on which the virtual surroundings are projected.
Engineering simulation or Process simulation
Simulation is an important feature in engineering systems or any system that involves many processes. For example in
electrical engineering, delay lines may be used to simulate propagation delay and
phase shift caused by an actual
transmission line. Similarly,
dummy loads may be used to simulate impedance without simulating propagation, and is used in situations where propagation is unwanted. A simulator may imitate only a few of the operations and functions of the unit it simulates.
Contrast with:
emulate.
Most engineering simulations entail mathematical modeling and computer assisted investigation. There are many cases, however, where mathematical modeling is not reliable. Simulation of fluid dynamics problems often require both mathematical and physical simulations. In these cases the physical models require dynamic similitude. Physical and chemical simulations have also direct realistic uses, rather than research uses; in chemical engineering, for example, process simulations are used to give the process parameters immediately used for operating chemical plants, such as oil refineries.
For example, Discrete Event Simulation is often used in industrial engineering, operations management and operational research to model many systems for example, the value-adding transformation processes in businesses, and optimize business performance. Imagine a business, where each person could do 30 tasks, where thousands of products or services involved dozens of tasks in a sequence, where customer demand varied seasonally and forecasting was inaccurate- this is the domain where such simulation helps with business decisions across all functions. Related topics include Theory of Constraints,
bottlenecks, and management consulting.
Simulation and games
Main article: Simulation gameMany video games are also simulators, implemented inexpensively. These are sometimes called "
sim games". Such games can simulate various aspects of reality, from
economics to piloting
vehicles, such as flight simulators .
Notes
See also
...
...
References
- R. Frigg and S. Hartmann, . Entry in the Stanford Encyclopedia of Philosophy.
- S. Hartmann, , in: R. Hegselmann et al. , Modelling and Simulation in the Social Sciences from the Philosophy of Science Point of View, Theory and Decision Library. Dordrecht: Kluwer 1996, 77-100.
- P. Humphreys, Extending Ourselves: Computational Science, Empiricism, and Scientific Method. Oxford: Oxford University Press, 2004.
- Roger D. Smith: , Encyclopedia of Computer Science, Nature Publishing Group, ISBN 0-333-77879-0.
- Roger D. Smith: , eMatter, December, 1999.
- Aldrich, C. . Learning by Doing : A Comprehensive Guide to Simulations, Computer Games, and Pedagogy in e-Learning and Other Educational Experiences. San Francisco: Pfeifer - John Wiley & Sons.
- Aldrich, C. . Simulations and the future of learning: an innovative approach to e-learning. San Francisco: Pfeifer - John Wiley & Sons.
- Percival, F., Lodge, S., Saunders, D. . The Simulation and Gaming Yearbook: Developing Transferable Skills in Education and Training. London: Kogan Page.
- South, R., "A Sermon Delivered at Christ-Church, Oxon., Before the University, Octob. 14. 1688: Prov.XII.22 Lying Lips are abomination to the Lord", pp.519-657 in South, R., Twelve Sermons Preached Upon Several Occasions , Volume I, Printed by S.D. for Thomas Bennet, , 1697.
- An essay by Francis Bacon.
External links
Organizations
-
-
-
-
- [https://www.dmso.mil/ United States Defense Modeling and Simulation Office]
-
Education
- for open source simulation lectures and packages.
-
-
-
Tools
Examples
- A portfolio of free public simulations from the University of Florida
-
-
-
- at Center for Automation in Nanobiotech
-
-
-