You are on page 1of 20

MODELING AND SIMULATION

Ajai Jain
Professor, Department of Mechanical Engineering
National Institute of Technology, Kurukshetra, India
Email: ajayjainfme@nitkkr.ac.in

1. INTRODUCTION

A system is collection of entities (people, parts, messages, machines, servers, …) that
act and interact together toward some end (Schmidt and Taylor, 1970). It can be facility
or process, actual or planned such as manufacturing facility, bank/ insurance office,
transportation /logistics /distribution operation, hospital facilities (emergency room,
operating room, and admissions), computer network, criminal justice system, chemical
plant, fast-food restaurant. It is essential to work with system in order to study and
understand it so as to measure its performance, improve it, design /redesign as well as
control it. It is the best option if one can play with the actual system as one looks at the
right thing in actual. However, in general it is impossible to do so in reality with the
actual system as the system doesn’t exist (one is planning the new one) or it would be
disruptive, expensive or dangerous due top management restrictions. As one can’t play
with the actual system, one is not left with no choice other than to use scientific methods
to analyze the system for understanding, improvement, optimization and decision
making. For this, a model of the system is built.

Modeling is the process of producing a model. A model is a representation of the
construction and working of some system of interest. There are two types of models: (i)
Physical: Scale models, prototype plants (ii) Mathematical: Analytical queuing models,
linear programs, simulation. One purpose of a model is to enable the analyst to predict
the effect of changes to the system and to optimize the system. Thus, studying the
model instead of the real system is, usually, much easier, faster, cheaper, and safer.
Further, analyst can try wide-ranging ideas with the model and one can make one’s
mistakes on the computer where they don’t count, rather than for real where they do
count. Thus modeling assists us in decision making process about the system. Figure 1
shows the various ways to study the system.

A model should be a close approximation to the real system and incorporate most of its
salient features. Further, it should not be so complex that it is impossible to understand
and experiment with it. Generally, a model has set of assumptions/approximations
about how the system works. Thus, it becomes essential to validate the model i.e. it
should be able to mimic the real world system faithfully so that one get the same
conclusions from the model as one would from the system and contains the desired
level of details that are required to analyze it. An important issue in modeling is model
validity. Model validation techniques include simulating the model under known input
conditions and comparing model output with system output.

Fig. 1: Ways to study a system (Law, A.M.)

simulation is done using computer. But most complex systems require models that are also complex. simulation is a tool to evaluate the performance of a system. Then simulate current and expanded operations and one could investigate many other issues along the way. Simulation is used before an existing system is altered or a new system built: (i) To reduce the chances of failure to meet specifications. from this. and making decisions to alter the system under study. experiment design. They must be studied via simulation to evaluate model numerically and collect data to estimate model characteristics. . conclusion formulation.2. output analysis. properties concerning the behavior of the actual system or its sub systems can be inferred. In a simulation study. existing or proposed. (iii) To prevent under or over-utilization of resources. the company’s model is built and validated. Although simulation can be used to analyze any model (simple or complex) but the real power of simulation is in studying complex model. The only stage where human intervention is not required is the running of the simulations. namely. and (iv) To optimize system performance. Thus. too expensive. and. quickly and cheaply. Generally. (ii) To eliminate unforeseen bottlenecks. model development. A simulation of a system is the operation of a model. which most simulation software packages perform efficiently. human decision making is required at all stages. SIMULATION If model structure is simple enough. which is a representation of that system or methods and applications to imitate or mimic real systems. The model is amenable to manipulation which would be impossible. The operation of the model can be studied. For example a manufacturing company considering extending its plant and wish to see how it works. one could use mathematical methods to get exact information on questions of interest and is called analytical solution. or too impractical to perform on the system which it portrays. under different configurations of interest and over long periods of real time. In its broadest sense.

• Time stretching/contraction capability. The various advantages of simulation are as follows: • Decision aid. • Cost effective investment. • Specification of requirements. In contrast to optimization models. . simulation models are “run” rather than solved. • Identification of constraints. • Preparing for change. • Cause-effect relations • Exploration of possibilities.Advantages of Simulation Simulation is intuitively appealing to a client because it mimics what happens in a real system. • Building consensus. • Training aid capability. Given a particular set of input and model characteristics. • Interpretation of results required. the model is run and the simulated behavior is observed. • Visualization of plans. • Diagnosing of problems. The output data from a simulation should directly correspond to the outputs that could be recorded from the real system. • Time consuming/expensive. Disadvantages of Simulation • Training required.

ports. fast-food restaurants. and it can be determined which variables are most important and how they interact. organizational.  Informational.Application Areas  Designing and analyzing manufacturing systems/ Materials Handling system/ inventory system (ordering policies)  Evaluating military weapons systems or their logistics requirements ( military)  Evaluating designs for service organizations such as call centers.  Observations based on simulations give great insight into the system behavior. hospitals. and the effect of these changes on the model’s behavior can be observed.  Simulation allows to experiment with new designs or policies prior to implementation. freeways. and subways (transportation)  Analyzing financial / economic systems/ ecological system ( Financial/ Natural resource)  Reengineering of business processes When is simulation appropriate?  Allows access to system internals that may otherwise not be observable.  Analytic solutions can be verified.  Can be used for training without the cost and disruption of on-the-job learning. . and post offices (Public and Health Systems )  Determining hardware and software requirements for a computer system (Computer Systems Performance)  Determining hardware requirements or protocols for communications networks (Communications)  Designing and operating transportation systems such as airports. and environmental changes can be simulated.

(ii) Deterministic simulation model A simulation containing no random or probabilistic variables. All variables are known with certainty. (i) Stochastic simulation model A simulation that contains random variables (variables containing probability distributions) e. output is deterministic for a given set of inputs. Simulation of a chemical reaction based on differential equations. Inter-arrival time or service time of customers at a restaurant or store.  The simulated system is so complex. amount of time required to service a customer. that its interactions can be treated only through simulation When simulation is not appropriate?  Would common sense suffice?  Is there an analytical solution?  Is it easier to perform direct measurements on a physical system?  Is there a shortage of resources for implementing the simulation?  Is there a shortage of time for getting the desired results?  Is data lacking for modeling the system and beginning a simulation study?  Is there enough time and personnel to verify and validate the model?  Are the managers’ expectations unrealistic?  Is the system too complex to be modeled? 3. . Thus.g. no probability is associated with them e. output is a random quantity and multiple runs are required to analyze output.g. CLASSIFICATION OF SIMULATION MODELS There are various types of simulation model and they are described below. Simulation of a digital circuit. or in other words. Here.

These points in time are the ones at which an event occurs. system can change at only a countable number of points in time. number of customers in the bank (vi) Continuous Simulation Model A simulation model in which the state variables change continuously over time. (iv) Dynamic Simulation Model A simulation model focusing on the evolution of the system under investigation over time.g. stochastic.e. determine the probability of a winning solitaire hand. and discrete and in general they are called discrete-event simulation models. position and velocity 4.e. (v) Discrete Simulation Model A simulation model one in which the state variables change only at discrete or countable points in time e. It is important to mention that combination of static and stochastic is known as Monte Carlo Simulation in which statistical sampling is used to develop approximate solutions to numerical problems.g. . an airplane moving through the air. the system is s described by a set of differential equations e.g.g. Discrete event simulation concerns the modeling of a system as it evolves over time by a representation in which the state variables instantaneously changes at separate point s in time i. a simulation model where time is not a significant variable e. e. DISCRETE EVENT SIMULATION Most operational models are dynamic. (iii) Static simulation model It is a representation of a system at a particular point in time or one that may be used to represent a system in which time simply plays no role i. Thus.

g. First out (FIFO) manner. I. balances in the accounts of customers. beginning of a new execution. One can restart simulation from given state variables (ii) Entity: It is an object of interest in the system i. (iii) Attribute: It is a property of an entity e. (v) Event: An instantaneous occurrence that may change the state of the system e. Upon completing service for a customer.. manual simulation can be carried out. idle or breakdown). status of machine (busy.e. A customer who arrives and finds the server idle enters service immediately and the service times S1. customers in the study of a bank. are independent and identically distributed (IID) random variables. SIMULATION OF A SINGLE SERVER QUEUING SYSTEM The purpose of this example is to show how computer simulation is carried out. welding. Although if system is not complex and duration of simulation is small. machine in job shop etc. breakdown of machine etc. speed.e. capacity. (vii) Exogenous activities events: These are activities/events in the environment that affect the system i.g.e. . making deposits by customers in a bank.g. stamping. completion of an operation in a machine shop.Simulation Terminology (i) State of the system: It is the collection of variables necessary to describe the status of the system at any given time e.e. Consider a single server queuing system for which the interarrival times A 1. length of the job queue. breakdown of the machine (vi) Endogenous activities/Events: Activities/events occurring within a system. (Identically distributed means that the interarrival times have the same probability distribution). arrival of a customer in a bank.. of the successive customers are IID random variables that are independent of the interarrival times. 5. operation on jobs in machine shop. number of customers waiting in a queue. (iv) Activity: It represents a time period of specified length i. the server chooses a customer from the queue (if any) in a First-in. departure of a job from the machine. S2…. A2…. arrival of a job on the machine.

i. we will begin waiting for the arrival of the first customer. i.e. we will look at estimates of three quantities. rather than at time 0. q (n) and u (n) will give information to the management. expected average delay in queue of the n customers completing their delays during the simulation (d (n)). which will occur after the first interarrival time. To measure the performance. expected average number of customers in the queue (q (n)). depending on the observed values for the interarrival and service-time random variables. At time 0. A1. the simulation will stop when the nth customer enters service.e. It is important to mention that the time the simulation ends is thus a random variable. The estimates of various parameters can be computed as follows: The expected average delay in queue n D i dˆ (n)  i 1 n Di = delay in queue of ith customer The expected average number of customers in queue  q(n)   ipi i 0  qˆ (n)   ipˆ i i 0   iT  i T(n) Q(t)dt qˆ (n)  i 0  0 T ( n) T ( n) Where pi = the expected proportion of the time that Q (t) is equal to i .e. We wish to simulate this system until a fixed number (n) of customers have completed their delays in queue i. no customers are present and the server is idle. and how busy the server is (u (n)? d (n) will give information about system performance from customers viewpoint.The simulation will begin in the empty and idle state.

S4 = 1. S2 = 0. If the model or simulation is unable to provide valid representations of the actual system. where experimentation with that system could be disruptive.90 6. At this point of time.7/8. A4 = 1. SIMULATION VALIDATION Use of a model or simulation is a surrogate for experimentation with an actual system (existing or proposed). S5 = 3.2. any conclusions derived from the model or simulation are likely to be erroneous and may result in poor decisions being made.2. A3 = 0.6 Let us assume that we want to carry out simulation when sixth customer enters the service.7.4. The simulation is shown on slides.7. A7 = 0.2.4. S3 = 0. regardless of whether the . A2 = 1.95 Estimate of q (6) = 9.9/8.7/6 = 0. A8 = 1.Q (t) = number of customers in queue at time t The expected utilization of the server T (n) uˆ (n)   0 B(t )dt T ( n) 1 if the server is busy at time t B(t )   0 if the server is idle at time t Let the interarrival and service-time of customers are A1 = 0.9. not cost effective.7. or infeasible.6 = 0. S6 = 0. Validation can be performed for all models and simulations. A6 = 1.1. A9 = 1. A5 = 0.5. Thus simulation will end when the sixth customer leaves the queue and enters service.6. the values of parameters of interest are as follows: Estimate of d (6) = 5.2.0.15 Estimate of u (6) = 7. … S1= 2.6 = 1.

measures of performance [MOPs]) used to validate a simulation should include those that the decision-maker will actually use for evaluating system configurations.corresponding real-world system exists in some form or will be built in the future. since extensive data collection may be required. Validation is the process of determining the degree to which a model or simulation is an accurate representation of the real world from the perspective of the intended uses of the model or simulation . and its results have credibility if the decision- maker and other key project personnel accept them as “correct”. Indeed. There is no such thing as absolute simulation validity. However. a model or simulation is supposed to be an abstraction and simplification of reality. A model or simulation. (iv) A simulation should always be developed for a particular set of objectives. (v) The measures and acceptability criteria (e. no matter how much time and money are spent on simulation construction. Note that a credible . It is not something to be attempted after the simulation has already been developed (or modified) and then only if there is time and money remaining. then it can be used to make decisions about the system similar to those that would be made if it were feasible and cost effective to experiment with the system itself. (vi) Validation of a stand-alone simulation is a process that should be conducted in coordination with the development or modification effort. but might not lead to significantly better insight or decisions. the most valid simulation is not necessarily the most cost effective. a simulation that is valid for one set of objectives may not be for another set of objectives. nor is it even desired. its data. increasing the validity of a simulation beyond a certain level might be quite expensive. For example. Validation should always be focused on the intended use.g. if a simulation is “valid”. Indeed. (vii) A federation of models still has to be validated even if the models (federates) that compose it are believed to be valid.The following are some general perspectives on validation: (i) Conceptually. (ii) The ease or difficulty of the validation process depends on the complexity of the system being modeled and on whether a version of the system currently exists (iii) A simulation of a complex system can only approximate the actual system..

Analysis using simulation have found it valuable for evaluating the impact of capital investments in equipment and physical facility and proposed changes to material handling and layout. Level of detail is constrained by the availability of input data and the knowledge of how system components work. warehouses and distribution centers. A model or simulation that is both valid and credible is more likely to be formally accredited for use in a particular application. Reputation of the simulation developers. data availability may be limited and system knowledge may be based on assumptions. Simulation has been used successful as an aid in the design of new production facilities. For new non-existent system. The following factors help establish credibility for a model or simulation: Decision-maker’s Understanding and Agreement with the Simulation’s Assumptions Demonstration that the simulation has been validated and verified. Managers have found simulation useful in providing a “test drive” before making capital investments.simulation is not necessarily valid. and vice-versa. time to repair. MODELING AND SIMULATION IN MANUFACTURING SYSTEM Manufacturing and material handling system provide one of the most important applications of simulation. Decision-maker’s ownership of and involvement with the project. It has also been used to evaluate suggested improvement to existing system. Manufacturing and material handling simulation need to contain the proper level detail. Models of manufacturing system may have to take into account a number of characteristics of the system such as  Physical layout  Equipments (i) Capacities (ii) Breakdowns (time to failure. Resources needed for repair) . 7. The major guidelines for capturing the correct level of detail are the objectives of the study and the questions being asked.

rail-guided) (iii) Bridge cranes and other overhead lifts  Storage System (i) pallet storage (ii) Small part storage (totes) (iii) Automated storage and retrieval system (AS/RS) . Maintenance (i) Preventive maintenance schedule (ii) Time and resources required (iii) Tooling and fixtures  Storage (i) Supplies (ii) Spare parts (iii) Work-in-process (WIP) (iv) Final goods Models of material handling system may have to contain some of the following type of subsystems.  Conveyors (i) Accumulating /Non-accumulating (ii) Indexing and other special purpose (iii) Fixed windows or random spacing (iv) Power and free.e.  Transporters (i) Unconstrained vehicles (i. manually guided fork trucks) (ii) Guided vehicles (automated or operator-controlled. wire-guided chemical paths.

what are the staffing requirements?. is of almost importance for the simulation analyst to draw correct conclusion from simulation output. There are a number of modeling issues especially important for the advisement of accurate and valid simulation models of manufacturing and material handling systems. the major assistance in the communication of models assumptions. what happens to response time at peak periods?. . material handling is an important part of a manufacturing system and its performance. Some common measures of system performance include:  Throughput under average peak load  Utilization of resources. system operations and model results is of course a rigorous analysis.Performance Measures Those who purchase and use simulation software want to gain insight and understanding into how a new or modified system will work and ask several questions such as will it meet throughput expectations?. labor and machines  Bottlenecks and choke points  Queuing at work locations  Queuing and delays caused by material handling devices and systems  WIP storage needs  Staffing requirements  Effectiveness of scheduling system  Effectiveness of control system Often. For stochastic simulation models a proper statistical analysis. such as throughput under a given set of conditions. distribution centers etc. what is the system capacity?. Non-manufacturing material handling system includes warehouses. what conditions and loads cause a system to reach its capacity? While simulations are expected to provide numeric measures of performance. Two of these issues are the proper modeling of downtimes and whether to use actual system data for some inputs versus a statistical model of those inputs.

C/C++ can be used to simulate the system. (ii) General purpose programming languages In some special cases of simulations where the simulation software could not serve the purpose due to complexity nature of the problem. SLAMSYSTEM etc. SLAM11. SIMSCRIPT11. Pro Model.8. LANGUAGES/SOFTWARES USED IN SIMULATION Computer simulation languages generally facilitate the development and execution of simulations of complex real-world systems. and Arena are useful for the simulation of manufacturing and material handling systems. These languages provide the simulation analyst with a choice of orientation (process interaction or event scheduling) or a model using a mixture of the two orientations. these languages provide management of the future event list and other sets. GPSS/H. (i) Special-purpose simulation software (ii) General-purpose programming languages (iii) General-purpose simulation languages (i) Special-purpose simulation software Depending upon the application particular software can be selected which is highly user-friendly.5. (iii) General-purpose simulation languages SIMAN V. some general-purpose programming languages such as JAVA. Quest. Unlike general purpose programming languages. It can be classified into three broad categories. WITNESS. For example. built-in random variate . are high- level simulation programming languages which have constructs specially designed to facilitate model building. Object oriented programming (OOP) was developed specially for writing discrete-event simulation models. The object-oriented extensions to C which become C++ were motivated by the need to model a telephone system. simulation packages such as Enterprise Dynamics.

recovery.5. without destroying precious resources or the environment. It includes the integration of processes. tools. manufacture of component parts. and digester gases  Develop reusable packaging products Presently. 9. and maximize recycling  Develop technologies to reduce energy consumption. landfill. reduced emission of greenhouse gases. and built-in statistics gathering routines. and operations to Minimize environmental impacts  Adopt cleaner production technologies to reduce waste. product use. and disposal. and SLAM11. assembly methods. recycling. recover waste heat. The research . wind. reduced generation of waste. Complex computations can be accomplished in both implementations of GPSS and in SIMAN V. such as solar. decision-making and the environmental concerns of an active industrial system to achieve economic growth. It involves selection of materials. and use of non-renewable or toxic materials. better manage industrial waste. Some examples include:  Develop products that last longer or have extended service lives  Re-design or reformulate products to use easily recyclable materials  Substitute toxic with non-toxic materials in manufacturing processes  Improve manufacturing technology. SUSTAINABLE MANUFACTURING Sustainable manufacturing refers to developing and practicing technologies to transform materials with reduced energy consumption. Sustainability applies to the entire life cycle of a product. SIMSCRIPT11.generators. bio-mass. There is very little published research where manufacturing simulation includes environmental concerns or parameters in the modeling process. equipment. extraction of the materials. materials. These languages provide the capability to conduct continuous simulations. modeling and simulation is used to help a company to meet design and production objectives and it seldom addresses sustainable manufacturing aspects. retailing. and use renewable energy sources.

waste/hazardous materials disposal. A metric is a simulation output measure of a process. operation. or their disposal. Occupational safety and health considerations may not be accounted for in process models. and/or reducing costs. worker health/safety. In the past.. additional metrics will be required to evaluate “what-if” propositions for sustainability.addresses a narrow aspect of manufacturing sustainability and is mainly conducted using existing simulation tools or a minor enhancement of the modeling. manufacturing waste and by-products. types and quantities of material used. and other effects on the environment and the community. In the future. recycling. Effects of good housekeeping on the reduction of waste and pollutants are not supported. These issues are not modeled today because of the way the manufacturing simulation systems were developed and evolved. and life cycle costs (LCC) of materials are often not addressed in design and manufacturing simulations. e. regional differences in environmental safety requirements are not represented in simulation environments. Simulations usually do not deal with the usage and disposal practices of product users after sale. Simulations typically do not model the by-products of manufacturing. product reuse. or system that is crucial to the evaluation of alternative solutions. . energy consumption or carbon footprint. pollution. improving production efficiency. Current simulation products do not typically support the modeling of environmental concerns or impacts. Possible sustainability metrics will measure energy consumption. A table of the traditional metrics used today and new sustainability metrics for the future is presented in Table 1 below. The types and quantities of manufacturing waste associated with manufacturing processes are not often a simulation consideration. Information on alternative manufacturing technologies. generation of effluents. Further the metrics for sustainable manufacturing are different than traditional manufacturing and incorporation of these sustainable aspects into the modeling and simulation tool requires additional programming. processes. recycling. Similarly.g. Recovery. metrics have focused on enhancing product quality. and pollution. and data is not readily available to the simulation analyst to incorporate into models.

blockage or Pollution starvation emissions per unit of product output machine utilization effluents that are captured and treated balance of equipment utilization greenhouse gases that are captured and overall plant capacity utilization treated time to market cost of fines and charges due to job lateness pollution number of jobs tardy carbon footprint of products and proportion of jobs tardy processes order lead times noise level measures travel distance for products and components inventory turns Material usage work-in-process % recycled/recyclable materials used scrap and rework measures % environmentally-friendly materials used Costs and returns output per unit of material used cost of carrying raw materials and work-in-progress output per units of water used inventories lifetime of materials used machine cost per unit time environmentally-friendly packaging material handling/transportation costs measures . cycle. or manufacturing lead time energy use per unit of product made makespan of a set of jobs energy cost per product unit job queuing time energy cost as % of total expenses queue lengths plant heating and cooling energy job transfer time efficiency measures worker and equipment utilization equipment downtime due to breakage.Table 1: Traditional and sustainability metrics Traditional Metrics Sustainability Metrics Efficiency Energy use Number of jobs produced per unit of time % of energy use that is renewable job flow.

labor cost paper process management measures energy cost per unit time total job completion cost Waste payback periods quantity of waste produced per unit return on investment in plant and equipment output percentage of waste materials recovered waste water recovery measure costs to recover (and dispose or reuse) discarded product. etc. if regulations impose so Worker health and safety work-related accidents and injuries ergonomics issues consideration in material handling and processing healthcare costs due to occupational accidents compensation costs due to work related injuries and suffering worker job repetitiveness. green space. morale factors lost work days due to injuries lost production due to injuries Community impact land usage. traffic impact on local roads use of public transportation by employees rain water capture . satisfaction level.

A.New Jersey: Prentice-Hall. 1996. 2d ed. Banks. “ Simulation Modleing and Analysis. J. Carson. Upper Saddle River. 4 e Tata McGraw Hill.REFERENCES: 1. 2008. 3. and B. M. Law. L. Deogratias Kibira & Charles Mclean. 4. Discrete-Event System Simulation. Nelson. “Modeling And Simulation For Sustainable Manufacturing” NIST paper 2. J.. S.. Lecture notes .