Showing posts with label simulation. Show all posts
Showing posts with label simulation. Show all posts

Characteristics or Elements of Queuing System


In order to model queuing systems, we first need to be a bit more precise about what constitutes a queuing system. The three basic elements common to all queuing systems are:
  1. Arrival Process or patterns
  2. Service process or patterns
  3. Queuing discipline


1. Arrival Process or Patterns
Any queuing system must work on something − customers, parts, patients, orders, etc. We generally called them as entities or customers. Before entities can be processed or subjected to waiting, they must first enter the system. Depending on the environment, entities can arrive smoothly or in an unpredictable fashion. They can arrive one at a time or in clumps (e.g., bus loads or batches). They can arrive independently or according to some kind of correlation. 
A special arrival process, which is highly useful for modeling purposes, is the Markov arrival process. Both of these names refer to the situation where entities arrive one at a time and the times between arrivals are exponential random variables. This type of arrival process is memory less, which means that the likelihood of an arrival within the next t minutes is the same no matter how long it has been since the last arrival.
Examples where this occurs are phone calls arriving at an exchange, customers arriving at a fast food restaurant, hits on a web site, and many others.

2. Service Process or Patterns
Once entities have entered the system they must be served. The physical meaning of “service” depends on the system. Customers may go through the checkout process. Parts may go through machining. Patients may go through medical treatment. Orders may be filled. And so on. From a modeling standpoint, the operational characteristics of service matter more than the physical characteristics. Specifically, we care about whether service times are long or short, and whether they are regular or highly variable. We care about whether entities are processed in first-come-first-serve (FCFS) order or according to some kind of priority rule. We care about whether entities are serviced by a single server or by multiple servers working in parallel etc

Markov Service Process
A special service process is the Markov service process, in which entities are processed one at a time in FCFS order and service times are independent and exponential. As with the case of Markov arrivals, a Markov service process is memory less, which means that the expected time until an entity is finished remains constant regardless of how long it has been in service. 
For example, in the Marcrohard example, a Markov service process would imply that the additional time required to resolve a caller’s problem is 15 minutes, no matter how long the technician has already spent talking to the customer. While this may seem unlikely, it does occur when the distribution of service times looks like the case shown in Figure 1. This depicts a case where the average service time is 15 minutes, but many customers require calls much shorter than 15 minutes (e.g., to be reminded of a password or basic procedures) while a few customers require significantly more than 15 minutes (e.g., to perform complex diagnostics or problem resolution). Simply knowing how long a customer has been in service doesn’t tell us enough about what kind of problem the customer has to predict how much more time will be required.

3. Queuing Discipline:
The third required component of a queuing system is a queue, in which entities wait for service.
The number of customer can wait in a line is called system capacity.
The simplest case is an unlimited queue which can accommodate any number of customers.  It is called system with unlimited capacity.
But many systems (e.g., phone exchanges, web servers, call centers), have limits on the number of entities that can be in queue at any given time.
Arrivals that come when the queue is full are rejected (e.g., customers get a busy signal when trying to dial into a call center). Even if the system doesn't have a strict limit on the queue size,
The logical ordering of customer in a waiting line is called Queuing discipline and it determines which customer will be chosen for service. We may say that queuing discipline is a rule to chose the customer for service from the waiting line.
The queuing discipline includes:
i. FIFO (First in First out) : According to this rule, Service is offered on the basis of arrival time of customer. The customer who comes first will get the service first. So in other word the customer who get the service next will be determine on the basis of longest waiting time.
ii. Last in First Out(LIFO): It is usually abbreviated as LIFO, occurs when service is next offered to the customer that arrived recently or which have waiting time least. In the crowded train the passenger getting in or out from the train is an example of LIFO.
iii. Service in Random order (SIRO): it means that a random choice is made between all waiting customers at the time service is offered. I.e a customer is picked up randomly form the waiting queue for the service.
iv. Shortest processing time First (SPT): it means that the customer with shortest service time will be chosen first for the service. i.e. the shortest service time customer will get the priority in the selection process.
v. Priority: a special number is assigned to each customer in the waiting line and it is called priority. Then according to this number, the customer is chosen for service.

Hybrid and Real Time Simulation

Hybrid Simulation:
For most studies, the system under study is clearly either of continuous or discrete nature and it is the determining factor in deciding whether to use an analog or digital computer for system simulation.
If the system being simulated is an interconnection of continuous and discrete subsystem, then such system simulation is known as hybrid simulation. Such hybrid system can be digital computer being linked together
Hybrid simulation required high speed converters to transform signals from analog to digital from and vice-versa.

Real time simulation:
In real time simulation, actual device (which are part of a system) are used in conjunction with either digital computer or hybrid computer. It provides the simulation of the points of systems that do not exist or that cannot be easily used in an experiment. i.e. the basic idea of real time simulation is ‘uses the actual part if they are appropriate to use in experiment otherwise use the simulation of the points of the system’.
A well-known examples is “simulation to train pilots”. It uses the devices for training pilots by giving them the impression that is at the control of an aircraft.
It requires real time simulator of the plane its control system, the weather and other environmental conditions. Sometimes, real time simulation also refers to a computer model of a physical system that can execute at the same rate as actual system can. For example: if a machine takes 10 minutes to fill a tank in real world, the simulation also would take 10 minutes.
Real time simulation of an engineering system becomes possible when replace physical device with virtual device are.

Steps on simulation Study

1. Problem formulation
Every study begins with a statement of the problem, provided by policy makers. Analyst ensures it is clearly understood. If it is developed by analyst policy makers should understand and agree with it.

2. Setting of objectives and overall project plan
The objectives indicate the questions to be answered by simulation. At this point a determination should be made concerning whether simulation is the appropriate methodology. Assuming it is appropriate, the overall project plan should include:

  • A statement of the alternative systems
  • A method for evaluating the effectiveness of these alternatives
  • Plans for the study in terms of the number of people involved
  • Cost of the study
  • The number of days required to accomplish each phase of the work with the anticipated results.

3. Model conceptualization
The construction of a model of a system is probably as much art as science. The art of modeling is enhanced by ability:

  • To abstract the essential features of a problem
  • To select and modify basic assumptions that characterizes the system
  • To enrich and elaborate the model until a useful approximation results
Thus, it is best to start with a simple model and build toward greater complexity. Model conceptualization enhances the quality of the resulting model and increases the confidence of the model user in the application of the model.

4. Data collection
There is a constant interplay between the construction of model and the collection of needed input data. It is done in the early stages. Objective kind of data is collected.

5. Model translation
Real-world systems result in models that require a great deal of information storage and computation. It can be programmed by using simulation languages or special purpose simulation software. Simulation languages are powerful and flexible. Simulation software models development time can be reduced.

6. Verified
It pertains to the computer program and checking the performance. If the input parameters and logical structure are correctly represented, verification is completed.

7. Validated
It is the determination that a model is an accurate representation of the real system. It is achieved through calibration of the model. The calibration of model is an iterative process of comparing the model to actual system behavior and the discrepancies between the two.

8. Experimental Design
The alternatives that are to be simulated must be determined. Which alternatives to simulate may be a function of runs? For each system design, decisions need to be made concerning

  • Length of the initialization period
  • Length of simulation runs
  • Number of replication to be made of each run

9. Production runs and analysis
They are used to estimate measures of performance for the system designs that are being simulated.

10. More runs
Based on the analysis of runs that have been completed, the analyst determines if additional runs are needed and what design those additional experiments should follow.

11. Documentation and Reporting
Two types of documentation:
            i. Program documentation
           ii. Process documentation

i. Program documentation
Can be used again by the same or different analyst’s to understand how the program operates. Further modification will be easier. Model users can change the input parameters for better performance.

ii. Process documentation
Gives the history of a simulation project. The result of all analysis should be reported clearly and concisely in a final report. This enables to review the final formulation and alternatives, results of the experiments and the recommended solution to the problem. The final report provides a vehicle of certification.

12. Implementation
Success depends on the previous steps. If the model user has been thoroughly involved and understands the nature of the model and its outputs, likelihood of a vigorous implementation is enhanced. The simulation model building can be broken into 4 phases.

Applications of Simulation

Manufacturing Applications
1. Analysis of electronics assembly operations
2. Design and evaluation of a selective assembly station for high precision scroll compressor shells.
3. Comparison of dispatching rules for semiconductor manufacturing using large facility models.
4. Evaluation of cluster tool throughput for thin-film head production.
5. Determining optimal lot size for a semiconductor backend factory.
6. Optimization of cycle time and utilization in semiconductor test manufacturing.
7. Analysis of storage and retrieval strategies in a warehouse.
8. Investigation of dynamics in a service oriented supply chain.
9. Model for an Army chemical munitions disposal facility.

Semiconductor Manufacturing
1. Comparison of dispatching rules using large-facility models.
2. The corrupting influence of variability.
3. A new lot-release rule for wafer fabrications.
4. Assessment of potential gains in productivity due to proactive retied management.
5. Comparison of a 200 mm and 300 mm X-ray lithography cell.
6. Capacity planning with time constraints between operations.

Military Applications
1. Modeling leadership effects and recruit type in a Army recruiting station.
2. Design and test of an intelligent controller for autonomous sunder water vehicles.
3. Modeling military requirements for non war fighting operations.
4. Multi-trajectory performance for varying scenario sizes.
5. Using adaptive agents in U.S. Air Force retention.

Advantages and Disadvantages of simulation

 Advantages
 1.      Simulation can also be used to study systems in the design stage.
2.     Simulation models are run rather than solver.
3.    New policies, operating procedures, decision rules, information flow, etc can be explored without disrupting the ongoing operations of the real system.
4.   New hardware designs, physical layouts, transportation systems can be tested without committing resources for their acquisition.
5.     Hypotheses about how or why certain phenomena occur can be tested for feasibility.
6.   Time can be compressed or expanded allowing for a speedup or slowdown of the phenomena under investigation.
7.      Insight can be obtained about the interaction of variables.
8.     Insight can be obtained about the importance of variables to the performance of the system.
9.   Bottleneck analysis can be performed indication where work-in process, information materials and so on are being excessively delayed.
10. A simulation study can help in understanding how the system operates rather than how individuals think the system operates.
11.  “what-if” questions can be answered.  So it is useful in the design of new systems.

Disadvantages
1.      Model building requires special training.
2.      Simulation results may be difficult to interpret.
3.      Simulation modeling and analysis can be time consuming and expensive.
4.      Simulation is used in some cases when an analytical solution is possible or even preferable.

When the simulation is not appropriate?

1.      Simulation should not be used when the problem can be solved using common sense.
2.      Simulation should not be used if the problem can be solved analytically.
3.      Simulation should not be used if it is easier to perform direct experiments.etc
4.      Simulation should be used when the problem cannot be solved using common sense.
5.      Simulation should not be used, if the costs exceeds savings.
6.      Simulation should not be performed, if the resources or time are not available.
7.      If no data is available, not even estimate simulation is not advised.
8.     If there is not enough time or the persons are not available, simulation is not appropriate.
9.    If managers have unreasonable expectation say, too much soon – or the power of simulation is over estimated, simulation may not be appropriate.

10.  If system behavior is too complex or cannot be defined, simulation is not appropriate.

When simulation is appropriate Tool?

The availability of special-purpose simulation languages, massive computing capabilities at a decreasing cost per operation, and advances in simulation methodologies have made simulation one of the most widely used and accepted tools in operations research and systems analysis. Simulation can be used for the following purposes:

1. Simulation enables the study of, and experimentation with, the internal interactions of a complex system, or of a subsystem within a complex system.

2. Informational, organizational, and environmental changes can be simulated, and the effect of these alterations on the model's behavior can be observed.

3. The knowledge gained in designing a simulation model may be of great value toward suggesting improvement in the system under investigation.

4. By changing simulation inputs and observing the resulting outputs, valuable insight may be obtained into which variables are most important and how variables interact.

5. Simulation can be used to experiment with new designs or policies prior to implementation, so as to prepare for what may happen.

6. Simulation can be used to verify analytic solutions.

7. By simulating different capabilities for a machine, requirements can be determined.

8. Simulation models designed for training allow learning without the cost and disruption of on-the-job learning.

Distributed Lag Model

Models that have the property of changing only at fixed interval of time and based on current values of variables on other current values of variables are called distributed lag model.

In economic studies some economic data are collected over uniform time interval such as a month or year.

This model consists of linear algebraic equations that represent continuous system but data are available at fixed points in time.

For example: Mathematical model of national economy

Let
C=consumption
I=investment
T=Taxes
G=government expenditures
Y=national income
Then,
C = 20 + 0.7(Y-T)
I = 2 + 0.1Y
T = 0.2Y
Y = C + I + G

All the equation are expressed in billions of rupees. This is static model and can be made dynamic by lagging all the variables as follows

C = 20 + 0.7(Y-1 - T-1)
I = 2 + 0.1Y-1
T = 0.2Y-1
Y = C-1 + I-1 + G-1

Any variable that can be expressed in the form of its current value and one or more previous value is called lagging variable. And hence this model is given the name distributed lag model. the variable in a previous interval is denoted by attaching –n suffix to the variable. Where -n indicate the nth interval.

Advantages of distributed lag model
·         Simple to understand and can be computed by hand, computers are extensively used to run them.
·         There is no need for special programming language to organize simulation task.

Principles used in Modeling

Guidelines used in modeling
-          It is not possible provide rule by which models are built. But a number of guidelines can be stated.
-          The different viewpoints from which we can judge whether certain info. Should be included as excluded in models are:

1.    Block –Building: The description of system should be organized as a sequence of blocks. It simplifies the interaction between block within system. Then it will be easy to describe the whole system in terms of interaction between the block and can be represented graphically as simple block diagram.  For example:-the block of factory system.


Fig: Block diagram of factory system

2.     Relevance: The model should only include relevant information. For example, if the factory system study aims to compare the efficient of different operating rules efficiency it is not relevant to consider the mining of employee as an activity.
Irrelevant information should not include despite of being no harm because it increases the complexity of model and takes more time and effort to solve model.

3.    Accuracy: The gathered information should be accurate as well. For example in aircraft system the accuracy as movement of the aircraft depends upon the representations of air frame such as a rigid body.

4.  Aggregation: It should be considered that to which numbers of individual entities can be grouped into a block. For example in factory system, different department are grouped together handled by production manger.

System Modeling and Types of Model

 System Modeling
A model is defined as a representation of a system for the purpose of studying the system. It is necessary to consider only those aspects of the system that affect the problem under investigation. These aspects are represented in a model, and by definition it is a simplification of the system.
The aspect of system that affect the problem under investigation, are represented in a model of the system. Therefore model is the simplification of the real system.
There is no unique model of a system. Different models of the same system will be produced by different system analysts who are interested in different aspect of system.

The task of deriving a model of a system may be divided broadly into two sub tasks: Establishing model parameter and supplying data.

Establishing model structure determines system boundary and identifies the entities, attributes, activities and events of a system.

Supplying data provides value contained an attribute and define relationships involved in the activities.

Types of Model
The various types of models are listed below.
· Mathematical and Physical Model
· Static Model
· Dynamic Model
· Deterministic Model
· Stochastic Model
· Discrete Model
· Continuous Model

Physical model
These models are based on some analogy between mechanical and electrical system. The system attributes are represented by physical measures such as voltage. The system activities are represented by physical laws.

Physical models are of two types, static and dynamic. Static physical model is a scaled down model of a system which does not change with time. An architect before constructing a building makes a scaled down model of the building, which reflects all it rooms, outer design and other important features. This is an example of static physical model. Similarly for conducting trials in water, we make small water tanks, which are replica of sea, and fire small scaled down shells in them. This tank can be treated as a static physical model of ocean. Dynamic physical models are ones which change with time or which are function of time. In wind tunnel, small aircraft models (static models) are kept and air is blown over them with different velocities and pressure profiles are measured with the help of transducers embedded in the model. Here wind velocity changes with time and is an example of dynamic physical model.

Let us take an example of hanging wheel of a stationary truck and analyze its motion under various forces. Consider a wheel of mass M, suspended in vertical direction, a force F(t), which varies with time, is acting on it. Mass is connected with a spring of stiffness K, and a piston with damping factor D. When force F (t), is applied, mass M oscillates under the action of these three forces.

This model can be used to study the oscillations in a motor wheel. Figure 1.2 shows such a system. This is a discrete physical static model. Discrete in a sense, that one can give discrete values F and observe the oscillations of wheel with some measuring equipment. When force is applied on it, which is a function of time, this discrete physical static model becomes dynamic model. Parameters K and D can also be adjusted in order to get controlled oscillations of the wheel. This type of system is called spring-mass system or wheel suspension. Load on the beams of a building can be studied by the combination of spring-mass system.

Mathematical Model
It uses symbolic notation and mathematical equation to represent system. The system attributes are represented by variables and the activities are represented by mathematical function.

Example: f(x) = mx+c is a mathematical model of a line.

Static Model
Static models can only show the values that the system attributes value does not change over time.
Example: Scientist has used models in which sphere represents atom, sheet of metal to connect the sphere to represent atomic bonds. Graphs are used to model the various system based on network.
A map is also a kind of graph. These models are sometimes said to be iconic models and are of kind static physical models.

Dynamic Model
Dynamic models follow the changes over time that result from system activities. The mechanical and electrical systems are the example of dynamic system. Generally, dynamic models involve the computation of variable value over time and hence they are represented by differential equations.

Analytical Models:
In mathematical model, we can differentiate the model on the basis of solution technique used to solve the model. Analytical technique means using deductive reasoning of mathematical theory to solve a model. Such models are known as analytical model.

Numerical models
Numerical models involve applying computational process to solve equations. For example: we may solve differential equation numerically when the specific limit of variable is given.
The analytical methods to produce solution may take situation numerical methods are preferred.

Deterministic Model
Contain no random variables. They have a known set of inputs which will result in a unique set of outputs. Ex: Arrival of patients to the Dentist at the scheduled appointment time.

Stochastic Model

Has one or more random variable as inputs. Random inputs leads to random outputs. Ex: Simulation of a bank involves random inter-arrival and service times.

Types of System

Open System/Close System
A system with exogenous activities is considered as open system and a system with strict endogenous activities is called a closed system.

System Environment
The external components which interact with the system and produce necessary changes are said to constitute the system environment. In modeling systems, it is necessary to decide on the boundary between the system and its environment. This decision may depend on the purpose of the study.
Example: In a factory system, the factors controlling arrival of orders may be considered to be outside the factory but yet a part of the system environment. When, we consider the demand and supply of goods, there is certainly a relationship between the factory output and arrival of orders. This relationship is considered as an activity of the system.

Endogenous System
The term endogenous is used to describe activities and events occurring within a system.
Example: Drawing cash in a bank.

Exogenous System
The term exogenous is used to describe activities and events in the environment that affect the system. Example: Arrival of customers.

Discrete System
Discrete system is one in which the state variables changes only at a discrete set of time. For example: banking system in which no of customers (state variable) changes only when a customer arrives or service provided to customer i.e customer depart form system.

Continuous System
Continuous system is one in which the state variables change continuously over time. For example, during winter seasons level of which water decreases gradually and during rainy season level of water increase gradually. The change in water level is continuous. The figure below shows the change of water level over time.



Introduction to Simulation and System Concepts


1.     What is simulation?
Simulation is the imitation of the operation of a real-world process or system over time. Simulation involves the generation of an artificial history of the system, and the observation of that artificial history to draw inferences concerning the operating characteristics of the real system that is represented.
Simulation is the numerical technique for conducting experiments on digital computer, which involves logical and mathematical relationships that interact to describe the behavior and the structure of a complex real world system over extended period of time.
The process of designing a model of a real system, implementing the model as a computer program, and conducting experiments with the model for the purpose of understanding the behavior of the system, or evaluating strategies for the operation of the system.
The behavior of a system is studied by developing a simulation model. This model usually takes the form of a set of assumptions concerning the operation of the system. These assumptions are expressed in mathematical, logical, and symbolic relationships between the entities, or object of interest, of the system. Such developed model when validated then is used to investigate a variety of ‘what if’ questions about the real-world system. Thus, simulation modeling can be used both as an analysis tool and design tool.  

2.     System Concepts
A system is defined as a group of objects that are joined together in some regular interaction or interdependence for the accomplishment of some task. For example: Production system for manufacturing automobiles.

A system is usually considered as a set of inter–related factors, which are described as entities activities and have properties or attributes. Processes that cause system changes are called activities. The state of a system is a description of all entities, attributes and the activities at any time.

Example: A factory system shown as follows:
Components of system
2.1 Entity, attribute and activities
An entity represents an object that requires explicit definition. An entity can be dynamic in that it moves through the system, or it can be static in that it serves other entities. In the example, the customer is a dynamic entity, whereas the bank teller is a static entity.

An entity may have attributes that pertain to that entity alone. Thus, attributes should be considered as local values. In the example, an attribute of the entity could be the time of arrival. Attributes of interest in one investigation may not be of interest in another investigation. Thus, if red parts and blue parts are being manufactured, the color could be an attribute.
Processes that cause system changes are called activities or events.

In the bank example, events include the arrival of a customer for service at the bank, the beginning of service for a customer, and the completion of a service.

There are both internal and external events, also called endogenous and exogenous events, respectively. For instance, an endogenous event in the example is the beginning of service of the customer since that is within the system being simulated. An exogenous event is the arrival of a customer for service since that occurrence is outside of the simulation.

2.2 State variables
The state of a system is defined to be that collection of variables necessary to describe the system at any time, relative to the objectives of the study. In the study of a bank, possible state variables are the number of busy tellers, the number of customers waiting in line or being served, and the arrival time of the next customer.
So the system state variables are the collection of all information needed to define what is happening within the system to a sufficient level (i.e., to attain the desired output) at a given point in time.