Introduction to Simulation Internet Computing Laboratory @ KUT Youn-Hee Han What is Simulation? General Procedure of “Paper Work” Related Works Reading Papers and Books New Idea Develop a new proposal Performance analysis Experiments with real system Implementation are time-consuming works Experiments with a physical model of the real system Emulation Experiments with a mathematical model of the real system 2 Simulation Less assumption Mathematical Analysis Much assumption Data Structure What is Simulation? Performance Analysis Measure/estimate performance Improve operation System Experiment with the actual system Real System 3 Experiment with a physical model of the system Test-bed Emulation Experiment with a mathematical model of the system Simulation Mathematical Analysis Data Structure What is Mathematical Analysis? Mathematical Analysis An abstract and simplified representation of a system Specifies Important components Assumptions/approximations about how the system works Not an exact re-creation of the original system! If model is simple enough, study it with… 4 Queueing Theory Linear Programming Differential Equations... But, the simple model is really enough? If model is complex, simulation is the only way!!! Data Structure What is Simulation? Simulation The Oxford English Dictionary describes “simulation” as Simulation is the technique of imitating the behavior of some situation or system (economic, mechanical, etc.) by means of an analogous model, situation, or apparatus, either to gain information more conveniently or to train personnel. In Wikipedia… 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. Another way… simulation is the technique of a building a model of a real or proposed system so that the behavior of the system under specific conditions may be studied. 5 One of the key powers of simulation is the ability to model the behavior of a system as time progresses. Data Structure Then… what is system? System In Wikipedia System is a set of entities, real or abstract, comprising a whole where each component interacts with or is related to at least one other component. In the American Heritage Dictionary of the English Language… System is a group of interacting, interrelated, or interdependent elements forming a complex whole. Another way… System is a set of interacting components or entities operating together to achieve a common goal or objective. 6 Any object which has no relation with any other element of the system is not part of that system but rather of the system environment. Data Structure And… what is model? Model In the American Heritage Dictionary of the English Language… Model is a schematic description of a system, theory, or phenomenon that accounts for its known or inferred properties and may be used for further study of its characteristics. Another way… Model is a set of assumptions/approximations about how the system works We can study the model instead of the real system Can try wide-ranging ideas with the model Make your mistakes on the computer where they don’t count, rather than for real where they do count 7 Data Structure And… what is model? Model Conceptualization Real World System Select correct level of details (assumptions) Assumed system Abstract essential features - Events, activities, entities, attributes, resources, and their relationships Conceptual model Logical model Simulation model 8 - Performance measures - Data requirements Shows the logical relationships among the elements of the model Flowchart model Data Structure And… what is model? Getting Answers From Models ACTUAL SYSTEM Operating Policies • Single queue, parallel servers • FIFO (X) (Y) • Waiting Times Input Parameters • # of servers Output Parameters MODEL • Inter-arrival Time Distribution • System Size •… • Service Time Distributions Y = f (X) 9 Data Structure Level of Details Too little detail result in lost of information and goals cannot be accomplished Too much detail requires: more time and effort longer simulation runs more likely to contain errors Accuracy of the model Scope & level of details 10 Cost of model Scope & level of details Data Structure How to Simulate? By hand Spreadsheets Programming in General Purpose Languages Java Simulation Languages SIMAN Simulation Packages 11 NS2, OPNet, OMNet++, J-Sim, Arena… Data Structure Data Collection and Analysis Collect data for input analysis and validation Analysis of the data Determine the random variables Fit distribution functions Draw graphs representing the analysis results 12 Data Structure Documentation & Refactoring Program Documentation Future modifications Creates confidence Progress Reports Frequent reports (e.g. monthly) are suggested Alternative scenarios Performance measures or criteria used Results of experiments Recommendations Produce “Papers” 13 Data Structure Pros. and Cons. of Simulation Advantages 14 When mathematical analysis methods are not available, simulation may be the only investigation tool When mathematical analysis methods are available, but are so complex that simulation may provide a simpler solution Allows comparisons of alternative designs or alternative operating policies Allows time compression or expansion Data Structure Pros. and Cons. of Simulation Disadvantages 15 For a (stochastic) model, simulation just estimates the output while an analytical solution, if available, produces the exact output Often expensive and time consuming to develop An invalid model may result with confidence in wrong results. Data Structure What is Discrete Event Simulation? Discrete Event Simulation the operation of a system is represented as a chronological sequence of events. Each event occurs at an instant in time and marks a change of state in the system model world as events maintain queue of events, ordered by time maintain [virtual time] repeat: extract event at head process it if processing generates another event, add it to queue each event takes predefined amount of virtual time, arbitrary amount of real time having a slow CPU makes simulation run slower (in real time), but doesn’t change result 16 Data Structure What is Discrete Event Simulation? Discrete Event Example S D Event queue TIME EVENT A. 1s S decides to send pkt to D S starts sending pkt B. 1.005s S finishes transmitting pkt to D C. 1.01s D begins to recv pkt D. 1.015s D recvs entire pkt and delivers to application A. B. C. D. delay value transmission 0.005s propagation 0.01s 17 S D Data Structure
© Copyright 2026 Paperzz