Simulation and Modelling - Unit Wise Questions
1. What is model? What are the different types of models? Give example for each.
Model
- Model is a computerized program that defines the mechanics of the considered system.
- During system modeling, the focus is on the system components, system structure, relationships among the components of the system and the behavior of the modeled system.
- Model must have state which may change on each time step.
- Model represents the system for the purpose of studying the system.
Types of Model
1. Physical Model
Physical model is the smaller or larger physical copy of an object being modeled. The physical model helps in visualization of the object taken into consideration in an effective way. It is also used to solve equations with the particular boundary conditions.
Two types of physical model:
i) Static Physical Model:
- Static physical model is the physical model which describes relationships that do not change with respect to time.
- Such models only depict the object’s characteristics at any instance of time, considering that the object’s property will not change over time.
- E.g. An architectural model of a house, scale model of a ship and so on.
ii) Dynamic Physical Model:
- Dynamic physical model is the physical model which describes the time varying relationships of the object properties.
- Such models describes the characteristics of the object that changes over time.
- It rely upon the analogy between the system being studied and some other system of a different nature, but have similarity on forces that directs the behavior of the both systems.
- E.g. A model of wind tunnel, a model of automobile suspension and so on.
2. Mathematical Model
Mathematical model is the model which is composed of a symbols and logic. It describes the system using mathematical concepts. The mathematical model is used to explain the system and to study the effects of different components, and to make predictions about the behavior of the system.
Two types of mathematical model:
i) Static Mathematical Model:
- Static mathematical model is the mathematical model that represents the logical view of the system in equilibrium state.
- Such models are time-invariant.
- It is generally represented by the basic algebraic equations.
- E.g. An equation relating the length and weight on each side of a playground variation, supply and demand relationship model of a market and so on.
ii) Dynamic Mathematical Model:
- Dynamic mathematical model is the mathematical model that accounts for the time dependent changes in the logical state of the system.
- Such models are time-variant.
- It is generally represented by differential equations or difference equations.
- E.g. The equation of motion of planets around the sun in the solar system.
3. Deterministic Model
It contains no random variables. They have a known set of inputs which will result in a unique set of outputs. E.g. Arrival of patients to the Dentist at the scheduled appointment time.
4. Stochastic Model
It has one or more random variable as inputs. Random inputs leads to random outputs. E.g. Simulation of a bank involves random inter-arrival and service times.
AI is thinking...
1. Describe different types of mathematical simulation models. Develop a mathematical model (differential equation) for any dynamic system.
Two types of mathematical model:
1. Static Mathematical Model:
- Static mathematical model is the mathematical model that represents the logical view of the system in equilibrium state.
- Such models are time-invariant.
- It is generally represented by the basic algebraic equations.
- E.g. An equation relating the length and weight on each side of a playground variation, supply and demand relationship model of a market and so on.
2. Dynamic Mathematical Model:
- Dynamic mathematical model is the mathematical model that accounts for the time dependent changes in the logical state of the system.
- Such models are time-variant.
- It is generally represented by differential equations or difference equations.
- E.g. The equation of motion of planets around the sun in the solar system.
The derivation may be made with an analytical solution or with a numerical computation, depending upon the complexity of the model. The equation that was derived to describe the behavior of a car wheel is an example of a dynamic mathematical model; in this case, an equation that can be solved analytically.
It is customary to write the equation in the form
Where 2 ζ ω =D/M and ω 2=K/M
Expressed in this form, solutions can be given in terms of the variable wt. Figure below shows how x varies in response to a steady force applied at time t = 0 as would occur, for instance, if a load were suddenly placed on the automobile.
Solutions are shown for several values of ζ , and it can be seen that when ζ is less than 1, the motion is oscillatory.
Fig: Solutions of second order equations
The factor ζ is called the damping ratio and, when the motion is oscillatory, the frequency of oscillation is determined from the formula:
Where f is the number of cycles per second.
AI is thinking...
1. Define simulation. What are the various steps in simulation study? Explain.
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.
Steps in simulation study
- 1.Problem formulation
- Clearly state the problem.
- 2. Setting of objectives and overall project plan
- How we should approach the problem.
- 3. Model conceptualization
- Establish a reasonable model.
- 4. Data collection
- Collect the data necessary to run the simulation (such as arrival rate, arrival process, service discipline, service rate etc.).
- 5. Model translation
- Convert the model into a programming language.
- 6. Verification
- Verify the model by checking if the program works properly. Use common sense.
- 7. Validation
- Check if the system accurately represent the real system.
- 8. Experimental design
- How many runs? For how long? What kind of input variations?
- 9. Production runs and analysis
- Actual running the simulation, collect and analize the output.
- 10. Repeatition
- Repeat the experiments if necessary.
- 11. Document and report
- Document and report the results.
- 12. Implementation: Implement the simulated system in the real world if the simulation results show that it is advantageous to implement the new system or policy.
AI is thinking...
1. Differentiate between dynamic physical models and static physical models with example.
Static Physical Model
- Static physical model is the physical model which describes relationships that do not change with respect to time.
- Such models only depict the object’s characteristics at any instance of time, considering that the object’s property will not change over time.
- Eg : An architectural model of a house, scale model of a ship and so on.
Dynamic Physical Model
- Dynamic physical model is the physical model which describes the time varying relationships of the object properties.
- Such models describes the characteristics of the object that changes over time.
- It rely upon the analogy between the system being studied and some other system of a different nature, but have similarity on forces that directs the behavior of the both systems.
- Eg: A model of wind tunnel, a model of automobile suspension and so on.
To illustrate this type of physical model, consider the two systems shown in following figures i.e. Figure 1 and Figure 2.
Fig1: Mechanical System
Fig2: Electrical system
The Figure 1. represents a mass that is subject to an applied force F(t) varying with time, a spring whose force is proportional to its extension or contraction, and a shock absorber that exerts a damping force proportional to the velocity of the mass.It can be shown that the motion of the system is described by the following differential equation.
Where,
x is the distance moved, M is the mass, K is the stiffness of the spring & D is the damping factor of the shock absorber.
Figure 2. represents an electrical circuit with an inductance L, a resistance R, and a capacitance C, connected in series with a voltage source that varies in time according to the function E(t). If q is the charge on the capacitance, it can be shown that the behavior of the circuit is governed by the following differential equation:
Inspection of these two equations shows that they have exactly the same form and that the following equivalences occur between the quantities in the two systems:
a) Displacement x = Charge q
b) Velocity x’ = Current I, q’
c) Force F = Voltage E
d) Mass M = Inductance L
e) Damping Factor D = Resistance R
f) Spring stiffness K = Inverse of Capacitance 1/C
g) Acceleration x’’ = Rate of change of current q’’
The mechanical system and the electrical system are analogs of each other, and the performance of either can be studied with the other.
AI is thinking...
1. Differentiate between static and dynamic physical models in simulation. Describe dynamic physical model in detail with the help of suitable example.
Static Physical Model
- Static physical model is the physical model which describes relationships that do not change with respect to time.
- Such models only depict the object’s characteristics at any instance of time, considering that the object’s property will not change over time.
- Eg : An architectural model of a house, scale model of a ship and so on.
Dynamic Physical Model
- Dynamic physical model is the physical model which describes the time varying relationships of the object properties.
- Such models describes the characteristics of the object that changes over time.
- It rely upon the analogy between the system being studied and some other system of a different nature, but have similarity on forces that directs the behavior of the both systems.
- Eg: A model of wind tunnel, a model of automobile suspension and so on.
To illustrate this type of physical model, consider the two systems shown in following figures i.e. Figure 1 and Figure 2.
Fig1: Mechanical System
Fig2: Electrical system
The Figure 1. represents a mass that is subject to an applied force F(t) varying with time, a spring whose force is proportional to its extension or contraction, and a shock absorber that exerts a damping force proportional to the velocity of the mass.It can be shown that the motion of the system is described by the following differential equation.
Where,
x is the distance moved, M is the mass, K is the stiffness of the spring & D is the damping factor of the shock absorber.
Figure 2. represents an electrical circuit with an inductance L, a resistance R, and a capacitance C, connected in series with a voltage source that varies in time according to the function E(t). If q is the charge on the capacitance, it can be shown that the behavior of the circuit is governed by the following differential equation:
Inspection of these two equations shows that they have exactly the same form and that the following equivalences occur between the quantities in the two systems:
a) Displacement x = Charge q
b) Velocity x’ = Current I, q’
c) Force F = Voltage E
d) Mass M = Inductance L
e) Damping Factor D = Resistance R
f) Spring stiffness K = Inverse of Capacitance 1/C
g) Acceleration x’’ = Rate of change of current q’’
The mechanical system and the electrical system are analogs of each other, and the performance of either can be studied with the other.
AI is thinking...
1. Explain the steps in simulation study. What are the limitation of 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.
Steps in simulation study
- 1.Problem formulation
- Clearly state the problem.
- 2. Setting of objectives and overall project plan
- How we should approach the problem.
- 3. Model conceptualization
- Establish a reasonable model.
- 4. Data collection
- Collect the data necessary to run the simulation (such as arrival rate, arrival process, service discipline, service rate etc.).
- 5. Model translation
- Convert the model into a programming language.
- 6. Verification
- Verify the model by checking if the program works properly. Use common sense.
- 7. Validation
- Check if the system accurately represent the real system.
- 8. Experimental design
- How many runs? For how long? What kind of input variations?
- 9. Production runs and analysis
- Actual running the simulation, collect and analyze the output.
- 10. Repetition
- Repeat the experiments if necessary.
- 11. Document and report
- Document and report the results.
- 12. Implementation: Implement the simulated system in the real world if the simulation results show that it is advantageous to implement the new system or policy.
- Limitations of simulation
- Building model requires specialization which is the art learned through experience.
- In some cases, the results of the simulation may be so complex to interpret.
- It may be time consuming and expensive.
AI is thinking...
2. Define physical model. Explain the dynamic physical model with the help of suitable diagrams and expressions. [2+8]
Dynamic Physical Model
- Dynamic physical model is the physical model which describes the time varying relationships of the object properties.
- Such models describes the characteristics of the object that changes over time.
- It rely upon the analogy between the system being studied and some other system of a different nature, but have similarity on forces that directs the behavior of the both systems.
- Eg: A model of wind tunnel, a model of automobile suspension and so on.
To illustrate this type of physical model, consider the two systems shown in following figures i.e. Figure 1 and Figure 2.
Fig1: Mechanical System
Fig2: Electrical system
The Figure 1. represents a mass that is subject to an applied force F(t) varying with time, a spring whose force is proportional to its extension or contraction, and a shock absorber that exerts a damping force proportional to the velocity of the mass.It can be shown that the motion of the system is described by the following differential equation.
Where,
x is the distance moved, M is the mass, K is the stiffness of the spring & D is the damping factor of the shock absorber.
Figure 2. represents an electrical circuit with an inductance L, a resistance R, and a capacitance C, connected in series with a voltage source that varies in time according to the function E(t). If q is the charge on the capacitance, it can be shown that the behavior of the circuit is governed by the following differential equation:
Inspection of these two equations shows that they have exactly the same form and that the following equivalences occur between the quantities in the two systems:
a) Displacement x = Charge q
b) Velocity x’ = Current I, q’
c) Force F = Voltage E
d) Mass M = Inductance L
e) Damping Factor D = Resistance R
f) Spring stiffness K = Inverse of Capacitance 1/C
g) Acceleration x’’ = Rate of change of current q’’
The mechanical system and the electrical system are analogs of each other, and the performance of either can be studied with the other.
AI is thinking...
3. Explain the analogy between Mechanical system and electrical system using Dynamic
Physical Model. Explain Dynamic mathematical model and static mathematical model.
Analogy between Mechanical system and electrical system
Consider the two systems shown in following figures i.e. Figure 1 and Figure 2.
Fig1: Mechanical System
Fig2: Electrical system
The Figure 1. represents a mass that is subject to an applied force F(t) varying with time, a spring whose force is proportional to its extension or contraction, and a shock absorber that exerts a damping force proportional to the velocity of the mass.It can be shown that the motion of the system is described by the following differential equation.
Where,
x is the distance moved, M is the mass, K is the stiffness of the spring & D is the damping factor of the shock absorber.
Figure 2. represents an electrical circuit with an inductance L, a resistance R, and a capacitance C, connected in series with a voltage source that varies in time according to the function E(t). If q is the charge on the capacitance, it can be shown that the behavior of the circuit is governed by the following differential equation:
Inspection of these two equations shows that they have exactly the same form and that the following equivalences occur between the quantities in the two systems:
a) Displacement x = Charge q
b) Velocity x’ = Current I, q’
c) Force F = Voltage E
d) Mass M = Inductance L
e) Damping Factor D = Resistance R
f) Spring stiffness K = Inverse of Capacitance 1/C
g) Acceleration x’’ = Rate of change of current q’’
The mechanical system and the electrical system are analogs of each other, and the performance of either can be studied with the other.
Static Mathematical Model
- Static mathematical model is the mathematical model that represents the logical view of the system in equilibrium state.
- Such models are time-invariant.
- It is generally represented by the basic algebraic equations.
- E.g. An equation relating the length and weight on each side of a playground variation, supply and demand relationship model of a market and so on.
Dynamic Mathematical Model:
- Dynamic mathematical model is the mathematical model that accounts for the time dependent changes in the logical state of the system.
- Such models are time-variant.
- It is generally represented by differential equations or difference equations.
- E.g. The equation of motion of planets around the sun in the solar system.
AI is thinking...
3. What do you understand by static mathematical model? Explain with example. Differentiate between stochastic and deterministic activities.
Static mathematical model is the mathematical model that represents the logical view of the system in equilibrium state. Such models are time-invariant. It is generally represented by the basic algebraic equations.
For example: Supply and demand relationship model of a market
Consider a market model assuming the linear behavior of supply and demand with price.
- Demand for a product will be low when the price is high and will be high when the price is low.
- Supply for a product will be high when the price is high and will be low when the price is low.
- If conditions remain stable, the price will settle to the point at which demand equals supply.
The relations can be stated mathematically as:
Q = a – bP
S = c + dP
S = Q
where, S = supply, Q = demand and P = price
The linear market model is shown below:
Difference Between Stochastic and Deterministic Activities
- Stochastic model / activity has one or more random variable as inputs. Random inputs leads to random outputs. E.g. Simulation of a bank involves random inter-arrival and service times.
- Deterministic model / activity contains no random variables. They have a known set of inputs which will result in a unique set of outputs. E.g. Arrival of patients to the Dentist at the scheduled appointment time.
AI is thinking...
4. Define and describe different types of elements and components of a system.
A group of components which are interconnected and interact to fulfill certain objective is called a system. A system mainly consists of 4 elements: input, process, output and feedback.
Fig: Block diagram of system
Input: It involves capturing and assembling elements that enter the system to be processed. Inputs to the system are anything to be captured by the system from its environment. For example, raw materials.
Processing: It involves transformation processes that convert input to output. For example, a manufacturing process.
Output: It involves transferring elements that have been produced by a transformation process to their ultimate destinations. Outputs are the things produced by the system and sent into its environment. For example, finished products.
Feedback: It is the idea of monitoring the current system output and comparing it to the system goal. Any variation from the goal are then fed back in to the system and used to adjust it to ensure that it meets its goal. For example, data about sales performance is feedback to a sales manager.
A system boundary is a line that separates the system from the system environment. A change occuring outside the system may affect the performance of the system. Such changes are said to occur in the system environment. Therefore the system environment means anything outside the system boundary that may affect the system.
Components of the system
1. Entity: An entity is an object of interest for the purpose of the system study.
2. Attribute: The property or the characteristics of an entity is called attribute.
3. Activity: The time period of specified length is called activity. The activity changes the state of the system.
4. State: The state of a system is defined as the collection of variables necessary to describe the system at any time with respect to objectives of the study.
5. Event: The instantaneous occurance that may change the state of a system is called event. There are 2 types of event:
a) Endogenous Event: The event that occurs within the system and change the state of the system is called endogenous event.
b) Exogenous Event: The event that occurs outside the system but affects the state of the system is called exogenous event.
AI is thinking...
4. Differentiate between static physical and dynamic physicals models.
Static Physical Model
- Static physical model is the physical model which describes relationships that do not change with respect to time.
- Such models only depict the object’s characteristics at any instance of time, considering that the object’s property will not change over time.
- Eg : An architectural model of a house, scale model of a ship and so on.
Dynamic Physical Model
- Dynamic physical model is the physical model which describes the time varying relationships of the object properties.
- Such models describes the characteristics of the object that changes over time.
- It rely upon the analogy between the system being studied and some other system of a different nature, but have similarity on forces that directs the behavior of the both systems.
- Eg: A model of wind tunnel, a model of automobile suspension and so on.
AI is thinking...
4. What are the advantages and disadvantages of
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.
Advantages of Simulation
- New procedures or rules can be explored without hampering the ongoing real time system operations.
- New designs can be tested without acquiring resources.
- The hypotheses about certain phenomena can be tested for feasibility.
- Insights can be obtained about the variable interaction and their credit for system performance.
- It provides the better understanding of the operation of the system in easier way.
- A simulation study can help in understanding how the system operates rather than how individuals think the system operates.
- “what-if” questions can be answered. So it is useful in the design of new systems.
Disadvantages of Simulation
- Building model requires specialization which is the art learned through experience.
- In some cases, the results of the simulation may be so complex to interpret.
- It may be time consuming and expensive.
AI is thinking...
4. When is simulation appropriate and when it is not?
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.
The following lists when simulation is useful:
- Simulation enables the study of, and experimentation with, the internal interactions of a complex system, or a subsystem within a complex system.
- Informational, organizational, and environmental changes can be simulated, and the effects of these alterations on the model’s behavior can be observed.
- Simulation can be used as a pedagogical device to reinforce analytic solution methodologies.
- Simulation can be used to experiment with new designs or policies prior to implementation
- Simulation can be used to verify analytic solutions.
- By simulating different capabilities for a machine, requirements can be determined.
- Animation shows a system in simulated operations so that the plan can be visualized.
- The modern system is so complex that the interactions can be treated only through simulation.
The following lists when simulation is not useful:
- Simulation is not appropriate when the problem can be solved by common sense.
- Simulation should not be used if the problem can be solved analytically.
- Simulation should not be used if it is easier to perform direct implementations.
- Simulation should not be used if the cost exceeds the savings.
- Simulation should not be done if the resources and time are not available.
- Simulation can not be done if no data is available.
- Simulation is not preferred if the system behavior is too complex to be defined.
- Simulation is not appropriate when the problem can be solved by common sense.
- Simulation should not be used if the problem can be solved analytically.
- Simulation should not be used if it is easier to perform direct implementations.
- Simulation should not be used if the cost exceeds the savings.
- Simulation should not be done if the resources and time are not available.
- Simulation can not be done if no data is available.
- Simulation is not preferred if the system behavior is too complex to be defined.
AI is thinking...
4. Differentiate between analytical models and numerical models.
Analytical Model | Numerical Model |
Analytical model is one which is solved by using the deductive reasoning of mathematical theory. | Numerical model is the one which is solved by applying computational procedures. |
Analytical model provide a direct solution and will result in exact solution if one exists. | Numerical model often require many iterations to get true solution. |
Analytical model is exact and gives exact solution. E.g. value of 1/2 | Numerical model gives the approximate value or solution. E.g. PI=22/7 is approximate value. |
Analytical models are time consuming and sometimes impossible. | Mathematical models are less time consuming and possible for most cases. |
This model is best for designing calculations, suit for checking calculation with certain limitation. | This model is best for checking calculations, practically effective for designing calculation. |
This model is not versatile & flexible . | This model is versatile and flexible. |
Need much work to be developed, but only simple software for application. | Need expensive and complex software and hardware. |
AI is thinking...
4. Differentiate between numerical and analytical methods in system simulation.
Analytical Method | Numerical Method |
Analytical method is one which is solved by using the deductive reasoning of mathematical theory. | Numerical method is the one which is solved by applying computational procedures. |
Analytical method provide a direct solution and will result in exact solution if one exists. | Numerical method often require many iterations to get true solution. |
Analytical method is exact and gives exact solution. E.g. value of 1/2 | Numerical method gives the approximate value or solution. E.g. PI=22/7 is approximate value. |
Analytical methods are time consuming and sometimes impossible. | Mathematical methods are less time consuming and possible for most cases. |
This model is best for designing calculations, suit for checking calculation with certain limitation. | This model is best for checking calculations, practically effective for designing calculation. |
This model is not versatile & flexible . | This model is versatile and flexible. |
Need much work to be developed, but only simple software for application. | Need expensive and complex software and hardware. |
AI is thinking...
4. What are the types of simulation models?
Model is a computerized program that defines the mechanics of the considered system. It must have state which may change on each time step. Model represents the system for the purpose of studying the system.
A simulation model can be classified as being static or dynamic, deterministic or stochastic, and discrete or continuous.
- A static simulation model, sometimes called a Monte Carlo simulation, represent a system at a particular point in time. For example, the profit of a company, which is affected by 3 variables drawn from different statistics distributions.
- A dynamic simulation model represents a system as it changes over time. For example, the simulation of a bank from 9 am to 4 pm.
- Deterministic model contains no random variables. They have a known set of inputs which will result in a unique set of outputs. E.g. 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. E.g. Simulation of a bank involves random inter-arrival and service times.
- Discrete model 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 model 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.
AI is thinking...
4. Define model. Describe different types of simulation models in brief.
Model is a computerized program that defines the mechanics of the considered system. It must have state which may change on each time step. Model represents the system for the purpose of studying the system.
A simulation model can be classified as being static or dynamic, deterministic or stochastic, and discrete or continuous.
- A static simulation model, sometimes called a Monte Carlo simulation, represent a system at a particular point in time. For example, the profit of a company, which is affected by 3 variables drawn from different statistics distributions.
- A dynamic simulation model represents a system as it changes over time. For example, the simulation of a bank from 9 am to 4 pm.
- Deterministic model contains no random variables. They have a known set of inputs which will result in a unique set of outputs. E.g. 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. E.g. Simulation of a bank involves random inter-arrival and service times.
- Discrete model 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 model 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.
AI is thinking...
5. Describe the importance of differential/Partial differential equations in simulation.
The equation that consists of the higher order derivatives of the dependent variable is known as differential equations.
- The differential equation is said to be linear if any of the dependent variables and its derivatives have power of one and are multiplied by the constant.
E.g. M x’’ + D x’ + K x = K F(t)
where, M, D and K are constants; F(t) is the input to the system depending upon the independent variable t; x’’ and x’ are second and first order derivatives of dependent variable x.
- The differential equation is said to be non-linear if the dependent variable or any of its derivatives are raised to a power or are combined in other way like multiplication.
The differential equation is said to be partial if more than one independent variables occur in a differential equation.
-E.g. Equation of flow of heat in three dimensional body. It consists of four independent variables ( three dimensions and time ) and one dependent variable ( temperature ).
Necessity of differential equations:
1. Most physical and chemical process occurring in the nature involves rate of change, which requires differential equations to provide mathematical model.
2. It can be used to understand general effects of growth trends as differential equations can represent a growth rate.
AI is thinking...
5. Describe the importance of differential/Partial differential equations in simulation.
The equation that consists of the higher order derivatives of the dependent variable is known as differential equations.
- The differential equation is said to be linear if any of the dependent variables and its derivatives have power of one and are multiplied by the constant.
E.g. M x’’ + D x’ + K x = K F(t)
where, M, D and K are constants; F(t) is the input to the system depending upon the independent variable t; x’’ and x’ are second and first order derivatives of dependent variable x.
- The differential equation is said to be non-linear if the dependent variable or any of its derivatives are raised to a power or are combined in other way like multiplication.
The differential equation is said to be partial if more than one independent variables occur in a differential equation.
-E.g. Equation of flow of heat in three dimensional body. It consists of four independent variables ( three dimensions and time ) and one dependent variable ( temperature ).
Necessity of differential equations:
1. Most physical and chemical process occurring in the nature involves rate of change, which requires differential equations to provide mathematical model.
2. It can be used to understand general effects of growth trends as differential equations can represent a growth rate.
AI is thinking...
4. Explain about system, its environment and its components.
A group of components which are interconnected and interact to fulfill certain objective is called a system. A system mainly consists of input, process, output and feedback.
Fig: Block diagram of system
A system boundary is a line that separates the system from the system environment. A change occuring outside the system may affect the performance of the system. Such changes are said to occur in the system environment. Therefore the system environment means anything outside the system boundary that may affect the system.
Components of the system
1. Entity: An entity is an object of interest for the purpose of the system study.
2. Attribute: The property or the characteristics of an entity is called attribute.
3. Activity: The time period of specified length is called activity. The activity changes the state of the system.
4. State: The state of a system is defined as the collection of variables necessary to describe the system at any time with respect to objectives of the study.
5. Event: The instantaneous occurance that may change the state of a system is called event. There are 2 types of event:
a) Endogenous Event: The event that occurs within the system and change the state of the system is called endogenous event.
b) Exogenous Event: The event that occurs outside the system but affects the state of the system is called exogenous event.
AI is thinking...
5. Describe different phases of simulation study with the help of flow chart.
Phases of Simulation Study
I Phase:
- Consists of steps 1 and 2
- It is period of discovery/orientation
- The analyst may have to restart the process if it is not fine-tuned
- Recalibrations and clarifications may occur in this phase or another phase.
II Phase:
- Consists of steps 3,4,5,6 and 7
- A continuing interplay is required among the steps
- Exclusion of model user results in implications during implementation
III Phase:
- Consists of steps 8,9 and 10
- Conceives a thorough plan for experimenting
- Discrete-event stochastic is a statistical experiment
- The output variables are estimates that contain random error and therefore proper statistical analysis is required.
IV Phase:
- Consists of steps 11 and 12
- Successful implementation depends on the involvement of user and every steps successful completion.
AI is thinking...
5. Describe different phases of simulation study with the help of flow chart.
Phases of Simulation Study
I Phase:
- Consists of steps 1 and 2
- It is period of discovery/orientation
- The analyst may have to restart the process if it is not fine-tuned
- Recalibrations and clarifications may occur in this phase or another phase.
II Phase:
- Consists of steps 3,4,5,6 and 7
- A continuing interplay is required among the steps
- Exclusion of model user results in implications during implementation
III Phase:
- Consists of steps 8,9 and 10
- Conceives a thorough plan for experimenting
- Discrete-event stochastic is a statistical experiment
- The output variables are estimates that contain random error and therefore proper statistical analysis is required.
IV Phase:
- Consists of steps 11 and 12
- Successful implementation depends on the involvement of user and every steps successful completion.
AI is thinking...
4. Discuss the merits and demerits of system 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.
Merits of Simulation
- New procedures or rules can be explored without hampering the ongoing real time system operations.
- New designs can be tested without acquiring resources.
- The hypotheses about certain phenomena can be tested for feasibility.
- Insights can be obtained about the variable interaction and their credit for system performance.
- It provides the better understanding of the operation of the system in easier way.
- A simulation study can help in understanding how the system operates rather than how individuals think the system operates.
- “what-if” questions can be answered. So it is useful in the design of new systems.
Demerits of Simulation
- Building model requires specialization which is the art learned through experience.
- In some cases, the results of the simulation may be so complex to interpret.
- It may be time consuming and expensive.
AI is thinking...
6. What do you understand by interactive system? Explain
Interactive systems are computer systems characterized by significant amounts of interaction between humans and the computer. Editors, CAD-CAM (Computer Aided Design-Computer Aided Manufacture) systems, and data entry systems are all computer systems involving a high degree of human-computer interaction. Games and simulations are interactive systems. Web browsers and Integrated Development Environments (IDEs) are also examples of very complex interactive systems.
The earliest interactive systems were command line systems, which tightly controlled the interaction between the human and the computer. The user was required to know the commands that might be issued and how the arguments were to be ordered. Both the UNIX operating system and DOS (Disk Operating System) are classic examples. Users were required to enter data in a particular sequence. The options for the output of data were also tightly controlled, and generally limited. Such systems generally put a high demand on the user to remember commands and the syntax for issuing these commands.
An interactive system has the potential for variation
and unpredictability in its response, and depending on
the context may well be considered more in terms of
a composition or structured improvisation rather than
an instrument.
AI is thinking...
7. Define activity, event and state variables. List out the activities and events for the following systems;
a. Super
market
b. Inventory
control
c. Hospital
Activity: The time period of specified length is called activity.
Event: An instantaneous occurrence that might change the state of the system is called event.
State variables: A collection of variables necessary to describe a system at any time is called state variables.
Now,
a. Supermarkets
Activities: sell product, fill displays, organize the supermarket carts
Events: Arrival and departure of customers, reception of products, lack of products
b. Inventory control
Activities: Withdrawing
Events: Demand
c. Hospital
Activities: vaccinate, feed the patient, administering medicines, heal the wounds
Events: lack of medicines, lack of staff, lack of beds, arrival and departure of patients.
AI is thinking...
7. What do you understand by distributed lag model? explain with example.
Models that have the property of changing only at fixed interval of time is called distributed lag model. It is used to predict current values of a dependent variable based on both the current values of an explanatory variable (independent variable) and the lagged (past period) values of this explanatory variable.
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.
AI is thinking...
8. What are the different phases that are employed in system simulation study? Explain in brief.
Phases of Simulation Study
I Phase:
- Consists of steps 1 and 2
- It is period of discovery/orientation
- The analyst may have to restart the process if it is not fine-tuned
- Recalibrations and clarifications may occur in this phase or another phase.
II Phase:
- Consists of steps 3,4,5,6 and 7
- A continuing interplay is required among the steps
- Exclusion of model user results in implications during implementation
III Phase:
- Consists of steps 8,9 and 10
- Conceives a thorough plan for experimenting
- Discrete-event stochastic is a statistical experiment
- The output variables are estimates that contain random error and therefore proper statistical analysis is required.
IV Phase:
- Consists of steps 11 and 12
- Successful implementation depends on the involvement of user and every steps successful completion.
AI is thinking...
11. “To simulate is to experiment”. Justify it.
Explain...
AI is thinking...
11. Describe the distributed lag model with the help of any practical example.
Models that have the property of changing only at fixed interval of time is called distributed lag model. It is used to predict current values of a dependent variable based on both the current values of an explanatory variable (independent variable) and the lagged (past period) values of this explanatory variable.
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.
AI is thinking...
12. “There is no unified theory in simulation”. Verify it.
Explain....
AI is thinking...
12. Name the entities, attributes, activities, events, and state variables for the following system:
a. Cafeteria
b. Inventory
c. Banking
d. A
hospital emergency room
e. Communication
a. Cafeteria
Entities: customer, cashier, waiter
Attributes: hungry, hurried
Activities: take orders, collect payments, dispatch orders
Events: arrival and departure of customer, lack of raw material, faults in the equipment
State variables: number of occupied tables, number of orders per table, number of customers waiting for attention
b. Inventory
Entities: Warehouse
Attributes:Capacity
Activities: Withdrawing
Events: Demand
State variables: Levels of inventory, background
c. Banking
Entities: Customers
Attributes: Checking-account balance
Activities: Making deposits
Events: Arrival, departure
State variables: Number of busy tellers, number of customer waiting
d. A hospital emergency room
Entities: doctor, nurse, patient, equipment
Attributes:safe, expert in his/her science, intelligent, responsible
Activities: vaccinate, feed the patient, administering medicines, heal the wounds
Events: lack of medicines, lack of staff, lack of beds, arrival and departure of patients.
State variables: number of patients, amount of administrated medicines, number of empty beds, number of registerd cases.
e. Communication
Entities: Messages
Attributes: Length, destination
Activities: Transmitting
Events: Arrival at destination
State variables: Number waiting to be transmitted
AI is thinking...
12. Explain the distributed lag model.
Models that have the property of changing only at fixed interval of time is called distributed lag model. It is used to predict current values of a dependent variable based on both the current values of an explanatory variable (independent variable) and the lagged (past period) values of this explanatory variable.
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.
AI is thinking...
12. Identify, with reasons, four different problems from your own experience that you think should be solved using digital simulation rather than analytically.
AI is thinking...
13. Write short note on:
a. System,
boundary and system environment
b. Real time
simulation
a. System, boundary and system environment
- A system is defined as a collection of object join in some regular interaction or interdependency for achievement of a common goal. We can also define a system as organized set of inter-related idea or principles. All system have input, output and feedback and maintain a basic level of equilibrium.
- A system boundary is the line that separate the system and its 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
b. Real time simulation
Real-time simulation refers to a computer model of a physical system that can execute at the same rate as actual "wall clock" time. In other words, the computer model runs at the same rate as the actual physical system.
For example, if a tank takes 10 minutes to fill in the real-world, the simulation would take 10 minutes as well. Real-time simulation occurs commonly in computer gaming, but also is important in the industrial market for operator training and off-line controller tuning.
AI is thinking...
13. List out the entities, attributes, activities and events for Banking, Communication, Production, Inventory and Supermarket systems.
a. Banking
Entities: Customers
Attributes: Checking-account balance
Activities: Making deposits
Events: Arrival, departure
b. Communication
Entities: Messages
Attributes: Length, destination
Activities: Transmitting
Events: Arrival at destination
c. Production
Entities: Machines
Attributes: Speed, capacity, breakdown rate
Activities: welding, stamping
Events: Breakdown
d. Inventory
Entities: Warehouse
Attributes: Capacity
Activities: Withdrawing
Events: Demand
State variables: Levels of inventory, background
e. Supermarkets
Entities: Customers, cashier, salesperson
Attributes: Faster, reliable, responsible, punctual, skilled in sales
Activities: sell product, fill displays, organize the supermarket carts
Events: Arrival and departure of customers, reception of products, lack of products
AI is thinking...
13. Describe the basic nature of simulation in brief.
AI is thinking...
12. Write short notes on (any two).( 2 x 2.5 = 5)
a) System and its environment.
b) Simulation run statistics.
a) System and its environment.
- A system is defined as a collection of object join in some regular interaction or interdependency for achievement of a common goal. We can also define a system as organized set of inter-related idea or principles. All system have input, output and feedback and maintain a basic level of equilibrium.
- A system boundary is the line that separate the system and its 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
b) Simulation run statistics
Example:
Consider a system with Kendall’s notation M/M/1/FIFO (i.e. a single server system in which the inter-arrival time is distributed exponentially ;and service time has an exponential and queue discipline is FIFO) and the objective is to measure the mean waiting time.
In simulation run approach, the mean waiting time is estimated by accumulating the waiting time of n successive entities and then it is divided by n. This measures the sample mean such that:
Whenever a waiting line forms, the waiting time of each entity on the line clearly depends upon the waiting time of its predecessors. Such series of data in which one value affect other values is said to be autocorrelated. The sample mean of autocorrelated data can be shown to approximate a normal distribution as the sample size increases.
A simulation run is started with the system in some initial state, frequently the idle state, in which no service is being given and no entities are waiting. The early arrivals then have a more than normal probability of obtaining service quickly, so a sample mean that includes the early arrivals will be biased.
AI is thinking...
1. What do you understand by analog method of system simulation? Explain it with suitable example. [3+7]
Analog computers are those computers that are unified with devices like adder and integral so as to simulate the continuous mathematical model of the system, which generates continuous outputs.
Analog method of system simulation is for use of analog computer and other analog devices in the simulation of continuous system. The analog computation is sometimes called differential analyser. Electronics analog computers for simulation are based on the use of high gain dc amplifiers called operational amplifier (op amps). In such analog computer, voltages are equated to mathematical variables and the op amps can add and integrate the voltages. The proper configurations can handle addition of several input voltages each representing the input variables. The analog computer provides limited accuracy because op amps have many assumptions which can never be true in reality.
The general method to apply analog computers for the simulation of continuous system models involves following components:
Example: Automobile Suspension Problem
The general method by which analog computers are applied can be demonstrated using second order differential equation.
M x" + D x' + K x = K F(t)
Solving the equation for the highest order derivate gives,
M x" = K F(t) – D x' - K x
Fig: Automobile suspension problem
Suppose a variable representing the input F(t) is supplied, assume there exist variables representing -x and -x'. These three variables can be scaled and added to produce Mx". Integrating it with a scale factor 1/M produces X'. Changing sign produces -x', further integrating produces -x, a further sign inverter is included to produce +x as output.
AI is thinking...
1. Differentiate between analog and digital methods of simulation. Explain the analog method of simulation with the help of suitable example.
Analog simulation and Digital simulation differs in the following ways:
- The goal of digital simulation is much simpler to achieve than analog simulation because the circuit is discrete in nature and has no circuit constraints to meet, such as Kirchhoff's Current Law (KCL).
- Digital simulation runs orders of magnitude faster than analog simulation because digital simulation deals with high-level behavior only, while in analog simulation the same elements have analog implementations.
- Digital simulation abstracts away important electrical characteristics that might be revealed by the analog simulation.
Analog Method of simulation
Analog computers are those computers that are unified with devices like adder and integral so as to simulate the continuous mathematical model of the system, which generates continuous outputs.
Analog method of system simulation is for use of analog computer and other analog devices in the simulation of continuous system. The analog computation is sometimes called differential analyser. Electronics analog computers for simulation are based on the use of high gain dc amplifiers called operational amplifier (op amps). In such analog computer, voltages are equated to mathematical variables and the op amps can add and integrate the voltages. The proper configurations can handle addition of several input voltages each representing the input variables. The analog computer provides limited accuracy because op amps have many assumptions which can never be true in reality.
The general method to apply analog computers for the simulation of continuous system models involves following components:
Example: Automobile Suspension Problem
The general method by which analog computers are applied can be demonstrated using second order differential equation.
M x" + D x' + K x = K F(t)
Solving the equation for the highest order derivate gives,
M x" = K F(t) – D x' - K x
Fig: Automobile suspension problem
Suppose a variable representing the input F(t) is supplied, assume there exist variables representing -x and -x'. These three variables can be scaled and added to produce Mx". Integrating it with a scale factor 1/M produces X'. Changing sign produces -x', further integrating produces -x, a further sign inverter is included to produce +x as output.
AI is thinking...
4. Differentiate between discrete and continuous 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 is one in which the state variables change continuously over time. For example, the head of the water behind a dam. During and for some time after a rainstorm, water flows into the lake behind the dam. Water is drawn from the dam for flood control and to make electricity. Evaporation also decreases the water level.
--> Discrete model is appropriate for system having discrete state and changes at particular time point and remains in that state for some time where as Continuous model is a appropriate for system with a continuous state that changes continuously over time.
--> Most discrete time system represents how discrete signals are transformed via difference equations where as Most continuous time system represent how continuous signals are transferred via differential equations.
--> A discrete simulation model is not always used to model a discrete system, nor is a continuous model always used to model a continuous system.
AI is thinking...
5. What is analog computer? Design a basic analog computer that represents a simple
dynamic system.
Analog computers are those computers that are unified with devices like adder and integral so as to simulate the continuous mathematical model of the system, which generates continuous outputs.
Analog method of system simulation is for use of analog computer and other analog devices in the simulation of continuous system. The analog computation is sometimes called differential analyser. Electronics analog computers for simulation are based on the use of high gain dc amplifiers called operational amplifier (op amps). In such analog computer, voltages are equated to mathematical variables and the op amps can add and integrate the voltages. The proper configurations can handle addition of several input voltages each representing the input variables. The analog computer provides limited accuracy because op amps have many assumptions which can never be true in reality.
Now,
Designing analog computer for Automobile Suspension system:
The general method by which analog computers are applied can be demonstrated using second order differential equation.
M x" + D x' + K x = K F(t)
Solving the equation for the highest order derivate gives,
M x" = K F(t) – D x' - K x
Fig: Automobile suspension problem
Suppose a variable representing the input F(t) is supplied, assume there exist variables representing -x and -x'. These three variables can be scaled and added to produce Mx". Integrating it with a scale factor 1/M produces X'. Changing sign produces -x', further integrating produces -x, a further sign inverter is included to produce +x as output.
AI is thinking...
6. What do you understand by interactive and feedback system in simulation? Explain.
Interactive System
Interactive systems are computer systems characterized by significant amounts of interaction between humans and the computer. Editors, CAD-CAM (Computer Aided Design-Computer Aided Manufacture) systems, and data entry systems are all computer systems involving a high degree of human-computer interaction. Games and simulations are interactive systems. Web browsers and Integrated Development Environments (IDEs) are also examples of very complex interactive systems.
Feedback System
The system takes feedback from the output i.e. input is coupled with output. A significant factor in the performance of many systems is that coupling occurs between the input and output of the system. The term feedback is used to describe the phenomenon.
One example of feedback system in which there is continuous control is the aircraft system. Here the input is a desired aircraft heading and the output is the actual heading. The gyroscope of the autopilot is able to detect the difference between the two headings. A feedback is established by using the difference to operate the control surface. Since change of heading will then affect the signal being used to control the heading.
The difference between the desired signal θt and actual heading θ0 is called the error signal, since it is a measure of the extent to which the system from the desired condition. It is denoted by є.
We also know that, in terms of angular acceleration
From equation (1), (2) & (3)
Dividing both sides by I, and making the following substitutions in equation (4)
(where
is damping factor)
This is a second order differential equation.
AI is thinking...
7. Explain, how do you update the clock time in system simulation.
Clock time is updated based on the following two models:
1. Fixed time-step model
In this the timer simulated by the computer is updated at a fixed time interval. The system is checked to see if any event has taken place during that interval. All the events which take place during the time interval are considered to have occurred simultaneously at the end of the interval.
2. Event-to-event model
It is also known as the next-event model. In this the computer advances the time to the occurrence of the next event. So it shifts from one event to the next event and the system state does not change in between. A track of the current time is kept when something interesting happens to the system.
The flowcharts for both models is shown below.
AI is thinking...
6. What is non-stationary Poisson process? How can we convert it into a stationary Poisson
process?
The non-stationary Poisson process is a Poisson process for which the arrival rate varies with time. More specifically, it can be defined as follows:
The counting process N(t) is a non-stationary Poisson process if:
a) The process has independent increments.
b)
Where, λ(t) = the arrival rate at time t
dt = differential sized interval
The definition is identical to the stationary Poisson process, with the exception that the arrival rate, λ(t), is now a function of time.
A counting process N(t) is a stationary Poisson process with rate λ if
a) The process has independent increments.
b) The process has stationary increments. and
c)
A non-stationary Poisson process can be transformed into a stationary Poisson process with arrival rate 1.
AI is thinking...
6. Define arrival pattern. Explain non-stationary Poisson process.
Arrival defines the way customers enter the system. Mostly the arrivals are random with random intervals between two adjacent arrivals. Typically the arrival is described by a random distribution of intervals also called Arrival Pattern. Arrivals may occur at scheduled times or at random times. When at random times, the inter arrival times are usually characterized by a probability distribution and most important model for random arrival is the poisson process. In schedule arrival interarrival time of customers are constant.
The non-stationary Poisson process is a Poisson process for which the arrival rate varies with time. More specifically, it can be defined as follows:
The counting process N(t) is a non-stationary Poisson process if:
a) The process has independent increments.
b)
Where, λ(t) = the arrival rate at time t
dt = differential sized interval
AI is thinking...
7. Explain Monte Carlo simulation method with an example.
Following are the three important characteristics of Monte-Carlo method:
- Its output must generate random samples.
- Its input distribution must be known.
- Its result must be known while performing an experiment.
Flowchart for Monte Carlo simulation:
Fig: Flowchart of Monte Carlo simulation
Example:
Determining the value of PI using Monte Carlo method:
We use random number generation method to determine the sample points that lie inside or outside the curve. Let (x0, y0) be an initial guess for the sample point than from a linear congruential method of random number generation:
Xi+1 = (axi+c) mod m
Yi+1 = (ayi+c) mod m
Where a & c are constants, m is the upper limit of generated random number. If y<=yi then increment n.
AI is thinking...
10. What do you mean by Hybrid simulation?
In reality, the system is of neither a pure continuous nor a pure discrete nature. For simulating such system, the combination of analog and digital computers are used. Such setup is known as hybrid computers. The simulation provided by the hybrid computers is known as hybrid simulation.
The form taken by hybrid simulation depends upon the application. One computer may be simulating the system being studied while other is providing a simulation of the environment in to which the system is to operate. It is also possible that the system being simulated is an interconnection of continuous and discrete subsystem, which can best be modeled by an analog and digital computer being linked together..
The major difficulty in use of hybrid simulation is that it requires high speed converters to transform signals from analog to digital form and vice versa.
AI is thinking...
10. Differentiate between fixed time step and event to event model with the help of suitable examples.
Fixed time-step model
In this the timer simulated by the computer is updated at a fixed time interval. The system is checked to see if any event has taken place during that interval. All the events which take place during the time interval are considered to have occurred simultaneously at the end of the interval.
Event-to-event model
It is also known as the next-event model. In this the computer advances the time to the occurrence of the next event. So it shifts from one event to the next event and the system state does not change in between. A track of the current time is kept when something interesting happens to the system.
The flowcharts for both models is shown below.
AI is thinking...
10. Explain Hybrid simulation with example.
In reality, the system is of neither a pure continuous nor a pure discrete nature. For simulating such system, the combination of analog and digital computers are used. Such setup is known as hybrid computers. The simulation provided by the hybrid computers is known as hybrid simulation.
The form taken by hybrid simulation depends upon the application. One computer may be simulating the system being studied while other is providing a simulation of the environment in to which the system is to operate. It is also possible that the system being simulated is an interconnection of continuous and discrete subsystem, which can best be modeled by an analog and digital computer being linked together..
The major difficulty in use of hybrid simulation is that it requires high speed converters to transform signals from analog to digital form and vice versa.
AI is thinking...
10. What do you understand by feedback systems? Explain
The system takes feedback from the output i.e. input is coupled with output. A significant factor in the performance of many systems is that coupling occurs between the input and output of the system. The term feedback is used to describe the phenomenon.
One example of feedback system in which there is continuous control is the aircraft system. Here the input is a desired aircraft heading and the output is the actual heading. The gyroscope of the autopilot is able to detect the difference between the two headings. A feedback is established by using the difference to operate the control surface. Since change of heading will then affect the signal being used to control the heading.
The difference between the desired signal θt and actual heading θ0 is called the error signal, since it is a measure of the extent to which the system from the desired condition. It is denoted by є.
We also know that, in terms of angular acceleration
From equation (1), (2) & (3)
Dividing both sides by I, and making the following substitutions in equation (4)
(where
is damping factor)
This is a second order differential equation.
AI is thinking...
10. Differentiate between fixed time step and event to event model with the help of suitable examples.
Fixed time-step model
In this the timer simulated by the computer is updated at a fixed time interval. The system is checked to see if any event has taken place during that interval. All the events which take place during the time interval are considered to have occurred simultaneously at the end of the interval.
Event-to-event model
It is also known as the next-event model. In this the computer advances the time to the occurrence of the next event. So it shifts from one event to the next event and the system state does not change in between. A track of the current time is kept when something interesting happens to the system.
The flowcharts for both models is shown below.
AI is thinking...
10. Differentiate between clock time and simulation time used in system simulation.
Clock Time | Simulation Time |
It is the total amount of time for which the CPU remains active. | It is the total amount of time that CPU spends for simulation. |
Clock time is measured continuously through all the operations that a CPU undergoes. | Simulation time only deals with the amount of time eleavated for simulation. |
It is usually more. | It is usually less. |
Let us take an example, where CPU is running for 6 seconds and now it performs a calculation for 0.01 second and stops the calculation, again the CPU runs for 5 more seconds.
So, Clock time= total time CPU is active =6+5 secs = 11 seconds
Simulation time = Time taken by CPU to perform calculation = 0.01 seconds
AI is thinking...
11. How do you update the clock time in simulation? Explain.
Clock time is updated based on the following two models:
1. Fixed time-step model
In this the timer simulated by the computer is updated at a fixed time interval. The system is checked to see if any event has taken place during that interval. All the events which take place during the time interval are considered to have occurred simultaneously at the end of the interval.
2. Event-to-event model
It is also known as the next-event model. In this the computer advances the time to the occurrence of the next event. So it shifts from one event to the next event and the system state does not change in between. A track of the current time is kept when something interesting happens to the system.
The flowcharts for both models is shown below.
AI is thinking...
13. Write short note on:
a. Discrete
system modeling
b. Feedback
systems
a. Discrete system modeling
In discrete systems, the changes in the system state are discontinuous and each change in the state of the system is called an event. The model used in a discrete system simulation has a set of numbers to represent the state of the system, called as a state descriptor.
b. Feedback system
The system takes feedback from the output i.e. input is coupled with output. A significant factor in the performance of many systems is that coupling occurs between the input and output of the system. The term feedback is used to describe the phenomenon.
One example of feedback system in which there is continuous control is the aircraft system. Here the input is a desired aircraft heading and the output is the actual heading. The gyroscope of the autopilot is able to detect the difference between the two headings. A feedback is established by using the difference to operate the control surface. Since change of heading will then affect the signal being used to control the heading.
The difference between the desired signal θt and actual heading θ0 is called the error signal, since it is a measure of the extent to which the system from the desired condition. It is denoted by є.
We also know that, in terms of angular acceleration
From equation (1), (2) & (3)
Dividing both sides by I, and making the following substitutions in equation (4)
(where
is damping factor)
This is a second order differential equation.
AI is thinking...
1. What are the characteristics of Queuing System? What are the various performance
measures in single server (M/M/1) queuing system simulation? (5 +5)
Characteristics of Queueing System
1. Calling Population
The population of potential customers those require service from system is called calling population. It may be finite or infinite. System having large calling population is usually considered as infinite. For e.g. customers at banks, restaurant. And System having less and countable population is usually considered as finite. For e.g. a certain number of machines to be repaired by a service man.
In finite population model, arrival rate depends on the number of customers being served and waiting. But in infinite population model, arrival rate is not affected by the number of customer being served and waiting.
2. Arrival Process
The arrival process for infinite-population models is usually characterized in terms of interarrival times of successive customers. Arrivals may occur at scheduled times or at random times. When at random times, the inter arrival times are usually characterized by a probability distribution and most important model for random arrival is the poisson process. In schedule arrival interarrival time of customers are constant.
3. Service Process
Service process can be measured by the number of customers served per some unit of time or the time taken to complete the service. Once entities have entered to the system they must be served. The service can be provided in single or batch. if it is batch, as in the case of arrival the batch size can be fixed or random. Service time may be of constant duration or of random duration.
Markov Service process: A Markov service process is a special service process in which entities are processed one at a time in FCFS order and service times are independent and exponential. Aswith the case of Markov arrivals, a Markov service process is memoryless, which means that the expected time until an entity is finished remains constant regardless of how long it has been in service.
4. Queueing Discipline and Queueing Behaviour
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
- First in first out :This principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.
- Last in first out : This principle also serves customers one at a time, however the customer with the shortest waiting time will be served first.
- Service in random order: A customer is picked up randomly from the waiting queue for service.
- Shortest job first: The next job to be served is the one with the smallest size (shortest service time).
- Priority: Customers with high priority are served first.
Queue behavior refers to the actions of customers while in a queue waiting for service to begin. Different queue behaviours are:
- Balk/Balking: It means leaving the queue when the customer see the line is too long.
- Renege/Reneging: Leave after being in the line when they see that the line is moving too slowly.
- Jockey/Jockeying: Move from one to a shortest line.
5. Number of Servers:
Servers represent the entity that provides service to the customer. A system may consist of single server or multiple servers.
- A system with multiple servers is able to provide parallel services to the customers.
The various performance measures in single server (M/M/1) queuing system simulation is discussed below:
1. If Ta and Ts be the inter arrival time and the mean service time then
- Arrival rate λ=1/Ta
- Service rate μ=1/Ts
2. The ratio of the mean service time to the mean inter arrival time is called traffic intensity. i.e. u=Ts/Ta
3. Server utilization: It consists of only the arrival that gets served. It is denoted by and defined as
ρ= λTs= λ/ μ (server utilization for single server).
4. Probability of finding service counter free is (1 – ρ) i.e there are zero customers in the service facility.
AI is thinking...
1. Define queuing system. Explain different queuing disciplines. Also explain different performance measures for evaluation of queuing system.
The line where the entities or customer wait is generally known as queue. The combination of all entities in system being served and being waiting for service will be called as queueing system.
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
- First in first out :This principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.
- Last in first out : This principle also serves customers one at a time, however the customer with the shortest waiting time will be served first.
- Service in random order: A customer is picked up randomly from the waiting queue for service.
- Shortest job first: The next job to be served is the one with the smallest size (shortest service time).
- Priority: Customers with high priority are served first.
The performance of a queuing system can be evaluated in terms of a number of response parameters, however the following four are generally employed.
- Average number of customer in the queue or in the system
- Average waiting time of the customer in the queue or in the system
- System utilization (Server utilization)
- The cost of waiting time and idle time
1. If Ta and Ts be the inter arrival time and the mean service time then
- Arrival rate λ=1/Ta
- Service rate μ=1/Ts
- Average number of customer in the system = λ/(μ - λ)
- Average number of customer in the queue = λ2/μ(μ - λ)
- Average waiting time in the system = 1/(μ - λ)
- Average waiting time in the queue = λ/μ(μ - λ)
2. The ratio of the mean service time to the mean inter arrival time is called traffic intensity. i.e. u=Ts/Ta
3. Server utilization: It consists of only the arrival that gets served. It is denoted by and defined as
ρ= λTs= λ/ μ (server utilization for single server).
ρ= λTs= λ/ nμ (server utilization for n server).
4. Probability of finding service counter free is (1 – ρ) i.e there are zero customers in the service facility.
AI is thinking...
2. Define the queuing system. Explain the elements of queuing system with example.
The line where the entities or customer wait is generally known as queue. The combination of all entities in system being served and being waiting for service will be called as queueing system.
Characteristics/Elements of Queueing System
The key elements of queuing systems are customer and server. Customer refers to anything that arrives at a facility and requires service. E.g. people, machines, trucks, emails. Servers refers to any resource that provides the requested service. E.g. receptionist, tellor, CPU, washing machine etc.
1. Calling Population
The population of potential customers those require service from system is called calling population. It may be finite or infinite. System having large calling population is usually considered as infinite. For e.g. customers at banks, restaurant. And System having less and countable population is usually considered as finite. For e.g. a certain number of machines to be repaired by a service man.
In finite population model, arrival rate depends on the number of customers being served and waiting. But in infinite population model, arrival rate is not affected by the number of customer being served and waiting.
2. Arrival Process
The arrival process for infinite-population models is usually characterized in terms of interarrival times of successive customers. Arrivals may occur at scheduled times or at random times. When at random times, the inter arrival times are usually characterized by a probability distribution and most important model for random arrival is the poisson process. In schedule arrival interarrival time of customers are constant.
3. Service Process
Service process can be measured by the number of customers served per some unit of time or the time taken to complete the service. Once entities have entered to the system they must be served. The service can be provided in single or batch. if it is batch, as in the case of arrival the batch size can be fixed or random. Service time may be of constant duration or of random duration.
Markov Service process: A Markov service process is a special service process in which entities are processed one at a time in FCFS order and service times are independent and exponential. Aswith the case of Markov arrivals, a Markov service process is memoryless, which means that the expected time until an entity is finished remains constant regardless of how long it has been in service.
4. Queueing Discipline and Queueing Behaviour
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
- First in first out :This principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.
- Last in first out : This principle also serves customers one at a time, however the customer with the shortest waiting time will be served first.
- Service in random order: A customer is picked up randomly from the waiting queue for service.
- Shortest job first: The next job to be served is the one with the smallest size (shortest service time).
- Priority: Customers with high priority are served first.
Queue behavior refers to the actions of customers while in a queue waiting for service to begin. Different queue behaviours are:
- Balk/Balking: It means leaving the queue when the customer see the line is too long.
- Renege/Reneging: Leave after being in the line when they see that the line is moving too slowly.
- Jockey/Jockeying: Move from one to a shortest line.
5. Number of Servers:
Servers represent the entity that provides service to the customer. A system may consist of single server or multiple servers.
- A system with multiple servers is able to provide parallel services to the customers.
AI is thinking...
2. What do you mean by Queuing system? Explain the characteristics of Queuing system with example.
The line where the entities or customer wait is generally known as queue. The combination of all entities in system being served and being waiting for service will be called as queueing system.
Characteristics of Queueing System
The key elements of queuing systems are customer and server. Customer refers to anything that arrives at a facility and requires service. E.g. people, machines, trucks, emails. Servers refers to any resource that provides the requested service. E.g. receptionist, tellor, CPU, washing machine etc.
1. Calling Population
The population of potential customers those require service from system is called calling population. It may be finite or infinite. System having large calling population is usually considered as infinite. For e.g. customers at banks, restaurant. And System having less and countable population is usually considered as finite. For e.g. a certain number of machines to be repaired by a service man.
In finite population model, arrival rate depends on the number of customers being served and waiting. But in infinite population model, arrival rate is not affected by the number of customer being served and waiting.
2. Arrival Process
The arrival process for infinite-population models is usually characterized in terms of interarrival times of successive customers. Arrivals may occur at scheduled times or at random times. When at random times, the inter arrival times are usually characterized by a probability distribution and most important model for random arrival is the poisson process. In schedule arrival interarrival time of customers are constant.
3. Service Process
Service process can be measured by the number of customers served per some unit of time or the time taken to complete the service. Once entities have entered to the system they must be served. The service can be provided in single or batch. if it is batch, as in the case of arrival the batch size can be fixed or random. Service time may be of constant duration or of random duration.
Markov Service process: A Markov service process is a special service process in which entities are processed one at a time in FCFS order and service times are independent and exponential. Aswith the case of Markov arrivals, a Markov service process is memoryless, which means that the expected time until an entity is finished remains constant regardless of how long it has been in service.
4. Queueing Discipline and Queueing Behaviour
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
- First in first out :This principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.
- Last in first out : This principle also serves customers one at a time, however the customer with the shortest waiting time will be served first.
- Service in random order: A customer is picked up randomly from the waiting queue for service.
- Shortest job first: The next job to be served is the one with the smallest size (shortest service time).
- Priority: Customers with high priority are served first.
Queue behavior refers to the actions of customers while in a queue waiting for service to begin. Different queue behaviours are:
- Balk/Balking: It means leaving the queue when the customer see the line is too long.
- Renege/Reneging: Leave after being in the line when they see that the line is moving too slowly.
- Jockey/Jockeying: Move from one to a shortest line.
5. Number of Servers:
Servers represent the entity that provides service to the customer. A system may consist of single server or multiple servers.
- A system with multiple servers is able to provide parallel services to the customers.
AI is thinking...
3. Define congestion. Describe different types of components, characteristics and queueing disciplines of a queueing system.
A congestion system is system in which there is a demand for resources for a system, and when the resources become unavailable, those requesting the resources wait for them to become available. The level of congestion in such systems is usually measured by the waiting line, or queue, of resource requests (waiting line or queuing models).
Characteristics/Elements of Queueing System
The key elements of queuing systems are customer and server. Customer refers to anything that arrives at a facility and requires service. E.g. people, machines, trucks, emails. Servers refers to any resource that provides the requested service. E.g. receptionist, tellor, CPU, washing machine etc.
1. Calling Population
The population of potential customers those require service from system is called calling population. It may be finite or infinite. System having large calling population is usually considered as infinite. For e.g. customers at banks, restaurant. And System having less and countable population is usually considered as finite. For e.g. a certain number of machines to be repaired by a service man.
In finite population model, arrival rate depends on the number of customers being served and waiting. But in infinite population model, arrival rate is not affected by the number of customer being served and waiting.
2. Arrival Process
The arrival process for infinite-population models is usually characterized in terms of interarrival times of successive customers. Arrivals may occur at scheduled times or at random times. When at random times, the inter arrival times are usually characterized by a probability distribution and most important model for random arrival is the poisson process. In schedule arrival interarrival time of customers are constant.
3. Service Process
Service process can be measured by the number of customers served per some unit of time or the time taken to complete the service. Once entities have entered to the system they must be served. The service can be provided in single or batch. if it is batch, as in the case of arrival the batch size can be fixed or random. Service time may be of constant duration or of random duration.
Markov Service process: A Markov service process is a special service process in which entities are processed one at a time in FCFS order and service times are independent and exponential. Aswith the case of Markov arrivals, a Markov service process is memoryless, which means that the expected time until an entity is finished remains constant regardless of how long it has been in service.
4. Queueing Discipline and Queueing Behaviour
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
- First in first out :This principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.
- Last in first out : This principle also serves customers one at a time, however the customer with the shortest waiting time will be served first.
- Service in random order: A customer is picked up randomly from the waiting queue for service.
- Shortest job first: The next job to be served is the one with the smallest size (shortest service time).
- Priority: Customers with high priority are served first.
Queue behavior refers to the actions of customers while in a queue waiting for service to begin. Different queue behaviours are:
- Balk/Balking: It means leaving the queue when the customer see the line is too long.
- Renege/Reneging: Leave after being in the line when they see that the line is moving too slowly.
- Jockey/Jockeying: Move from one to a shortest line.
5. Number of Servers:
Servers represent the entity that provides service to the customer. A system may consist of single server or multiple servers.
- A system with multiple servers is able to provide parallel services to the customers.
AI is thinking...
3. Define congestion in a queuing system. Describe different types of components and characteristics of a queueing system.
A congestion system is system in which there is a demand for resources for a system, and when the resources become unavailable, those requesting the resources wait for them to become available. The level of congestion in such systems is usually measured by the waiting line, or queue, of resource requests (waiting line or queuing models).
Characteristics/Elements of Queueing System
The key elements of queuing systems are customer and server. Customer refers to anything that arrives at a facility and requires service. E.g. people, machines, trucks, emails. Servers refers to any resource that provides the requested service. E.g. receptionist, tellor, CPU, washing machine etc.
1. Calling Population
The population of potential customers those require service from system is called calling population. It may be finite or infinite. System having large calling population is usually considered as infinite. For e.g. customers at banks, restaurant. And System having less and countable population is usually considered as finite. For e.g. a certain number of machines to be repaired by a service man.
In finite population model, arrival rate depends on the number of customers being served and waiting. But in infinite population model, arrival rate is not affected by the number of customer being served and waiting.
2. Arrival Process
The arrival process for infinite-population models is usually characterized in terms of interarrival times of successive customers. Arrivals may occur at scheduled times or at random times. When at random times, the inter arrival times are usually characterized by a probability distribution and most important model for random arrival is the poisson process. In schedule arrival interarrival time of customers are constant.
3. Service Process
Service process can be measured by the number of customers served per some unit of time or the time taken to complete the service. Once entities have entered to the system they must be served. The service can be provided in single or batch. if it is batch, as in the case of arrival the batch size can be fixed or random. Service time may be of constant duration or of random duration.
Markov Service process: A Markov service process is a special service process in which entities are processed one at a time in FCFS order and service times are independent and exponential. Aswith the case of Markov arrivals, a Markov service process is memoryless, which means that the expected time until an entity is finished remains constant regardless of how long it has been in service.
4. Queueing Discipline and Queueing Behaviour
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
- First in first out :This principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.
- Last in first out : This principle also serves customers one at a time, however the customer with the shortest waiting time will be served first.
- Service in random order: A customer is picked up randomly from the waiting queue for service.
- Shortest job first: The next job to be served is the one with the smallest size (shortest service time).
- Priority: Customers with high priority are served first.
Queue behavior refers to the actions of customers while in a queue waiting for service to begin. Different queue behaviours are:
- Balk/Balking: It means leaving the queue when the customer see the line is too long.
- Renege/Reneging: Leave after being in the line when they see that the line is moving too slowly.
- Jockey/Jockeying: Move from one to a shortest line.
5. Number of Servers:
Servers represent the entity that provides service to the customer. A system may consist of single server or multiple servers.
- A system with multiple servers is able to provide parallel services to the customers.
AI is thinking...
5. Define congestion in a queuing system, and describe its major characteristics.
A congestion system is system in which there is a demand for resources for a system, and when the resources become unavailable, those requesting the resources wait for them to become available. The level of congestion in such systems is usually measured by the waiting line, or queue, of resource requests (waiting line or queuing models).
Characteristics/Elements of Queueing System
The key elements of queuing systems are customer and server. Customer refers to anything that arrives at a facility and requires service. E.g. people, machines, trucks, emails. Servers refers to any resource that provides the requested service. E.g. receptionist, tellor, CPU, washing machine etc.
1. Calling Population
The population of potential customers those require service from system is called calling population. It may be finite or infinite. System having large calling population is usually considered as infinite. For e.g. customers at banks, restaurant. And System having less and countable population is usually considered as finite. For e.g. a certain number of machines to be repaired by a service man.
In finite population model, arrival rate depends on the number of customers being served and waiting. But in infinite population model, arrival rate is not affected by the number of customer being served and waiting.
2. Arrival Process
The arrival process for infinite-population models is usually characterized in terms of interarrival times of successive customers. Arrivals may occur at scheduled times or at random times. When at random times, the inter arrival times are usually characterized by a probability distribution and most important model for random arrival is the poisson process. In schedule arrival interarrival time of customers are constant.
3. Service Process
Service process can be measured by the number of customers served per some unit of time or the time taken to complete the service. Once entities have entered to the system they must be served. The service can be provided in single or batch. if it is batch, as in the case of arrival the batch size can be fixed or random. Service time may be of constant duration or of random duration.
4. Queueing Discipline and Queueing Behaviour
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
Queue behavior refers to the actions of customers while in a queue waiting for service to begin.
5. Number of Servers:
Servers represent the entity that provides service to the customer. A system may consist of single server or multiple servers.
- A system with multiple servers is able to provide parallel services to the customers.
AI is thinking...
5. What are the elements of queuing system?
The key elements of queuing systems are customer and server. Customer refers to anything that arrives at a facility and requires service. E.g. people, machines, trucks, emails. Servers refers to any resource that provides the requested service. E.g. receptionist, tellor, CPU, washing machine etc.
1. Calling Population
The population of potential customers those require service from system is called calling population. It may be finite or infinite. System having large calling population is usually considered as infinite. For e.g. customers at banks, restaurant. And System having less and countable population is usually considered as finite. For e.g. a certain number of machines to be repaired by a service man.
In finite population model, arrival rate depends on the number of customers being served and waiting. But in infinite population model, arrival rate is not affected by the number of customer being served and waiting.
2. Arrival Process
The arrival process for infinite-population models is usually characterized in terms of interarrival times of successive customers. Arrivals may occur at scheduled times or at random times. When at random times, the inter arrival times are usually characterized by a probability distribution and most important model for random arrival is the poisson process. In schedule arrival interarrival time of customers are constant.
3. Service Process
Service process can be measured by the number of customers served per some unit of time or the time taken to complete the service. Once entities have entered to the system they must be served. The service can be provided in single or batch. if it is batch, as in the case of arrival the batch size can be fixed or random. Service time may be of constant duration or of random duration.
4. Queueing Discipline and Queueing Behaviour
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
Queue behavior refers to the actions of customers while in a queue waiting for service to begin.
5. Number of Servers:
Servers represent the entity that provides service to the customer. A system may consist of single server or multiple servers.
- A system with multiple servers is able to provide parallel services to the customers.
AI is thinking...
5. What do you mean by Multi Server Queues?
The multi server queue consists of multiple servers and a common queue for all items. When any item requests for the server, it is allocated if at-least one server is available. Else the queue begins to start until the server is free. In this system, we assume that all servers are identical, i.e. there is no difference which server is chosen for which item.
The total server utilization for N server system is
ρ = λ/μN
where, μ = service rate and λ = arrival rate
Fig: Multi server queue
AI is thinking...
5. What do you mean by server utilization?
Server/System utilization is the percentage of the time that all servers are busy. System utilization factor (ρ ) is the ratio of average arrival rate (λ) to the average service rate (μ).
ρ = λ/μ in the case of a single server model
ρ = λ/μn in the case of a “n” server model
The system utilization can be increased by increasing the arrival rate which amounts to increasing the average queue length as well as the average waiting time, as shown in fig below. Under the normal circumstances 100% system utilization is not a realistic goal.
AI is thinking...
8. Define queuing discipline. Describe different types of queuing disciplines with example.
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
- First in first out :This principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.
- Last in first out : This principle also serves customers one at a time, however the customer with the shortest waiting time will be served first.
- Service in random order: A customer is picked up randomly from the waiting queue for service.
- Shortest job first: The next job to be served is the one with the smallest size (shortest service time).
- Priority: Customers with high priority are served first.
AI is thinking...
9. Define traffic intensity and server utilization. Write down the kendall’s notation for queuing system.
Traffic Intensity
The ratio of the mean service time to the mean inter arrival time is called traffic intensity. I.e. u= λ"Ts or u=Ts/Ta
Server Utilization
Server utilization is the percentage of the time that all servers are busy. Server utilization factor (ρ ) is the ratio of average arrival rate (λ) to the average service rate (μ).
ρ = λ/μ in the case of a single server model
ρ = λ/μn in the case of a “n” server model
Kendall's notation
Kendall’s notation is used for parallel server systems. The basic format of this notation is of form: A / B / c / N / K, where, A, B, c, N, K respectively indicate arrival pattern, service pattern, number of servers, system capacity, and Calling population.
The symbols used for the probability distribution for inter arrival time, and service time are, D for deterministic, M for exponential (or Markov) and Ek for Erlang.
E.g.
a) M/D/2/5/∞ stands for a queuing system having exponential arrival times, deterministic service time, 2 servers, capacity of 5 customers, and infinite population.
b) M/D/2 means exponential arrival time, deterministic service time, 2 servers, infinite service capacity, and infinite population.
AI is thinking...
9. What are the Kendall notation of Queuing System?
Kendall’s notation is used for parallel server systems. The basic format of this notation is of form: A / B / c / N / K, where, A, B, c, N, K respectively indicate arrival pattern, service pattern, number of servers, system capacity, and Calling population.
The symbols used for the probability distribution for inter arrival time, and service time are, D for deterministic, M for exponential (or Markov) and Ek for Erlang.
E.g.
a) M/D/2/5/∞ stands for a queuing system having exponential arrival times, deterministic service time, 2 servers, capacity of 5 customers, and infinite population.
b) M/D/2 means exponential arrival time, deterministic service time, 2 servers, infinite service capacity, and infinite population.
AI is thinking...
9. Define traffic intensity and server utilization. Write down the Kendall’s notation for queuing system with example.
Traffic Intensity
The ratio of the mean service time to the mean inter arrival time is called traffic intensity. I.e. u= λ"Ts or u=Ts/Ta
Server Utilization
Server utilization is the percentage of the time that all servers are busy. Server utilization factor (ρ ) is the ratio of average arrival rate (λ) to the average service rate (μ).
ρ = λ/μ in the case of a single server model
ρ = λ/μn in the case of a “n” server model
Kendall's notation
Kendall’s notation is used for parallel server systems. The basic format of this notation is of form: A / B / c / N / K, where, A, B, c, N, K respectively indicate arrival pattern, service pattern, number of servers, system capacity, and Calling population.
The symbols used for the probability distribution for inter arrival time, and service time are, D for deterministic, M for exponential (or Markov) and Ek for Erlang.
E.g.
a) M/D/2/5/∞ stands for a queuing system having exponential arrival times, deterministic service time, 2 servers, capacity of 5 customers, and infinite population.
b) M/D/2 means exponential arrival time, deterministic service time, 2 servers, infinite service capacity, and infinite population.
AI is thinking...
10. What do you understand by queueing and queueing discipline? An office works for 5 days, 8 hours per day, and receives 1200 telephone call in the week. Calculate the mean arrival rate and mean inter-arrival time of the calls.
The line where the entities or customer wait is generally known as queue. The combination of all entities in system being served and being waiting for service will be called as queueing system.
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
- First in first out :This principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.
- Last in first out : This principle also serves customers one at a time, however the customer with the shortest waiting time will be served first.
- Service in random order: A customer is picked up randomly from the waiting queue for service.
- Shortest job first: The next job to be served is the one with the smallest size (shortest service time).
- Priority: Customers with high priority are served first.
Now,
Mean arrival rate = λ
Mean inter-arrival time = Ta
Total working hours = 5 * 8 = 40 hrs per week
Total calls in the week = 1200
Ta = (40*60*60 sec)/1200 = 144,000 sec/1200 = 120 sec = 2 min
λ = 1/Ta = 1/2 = 0.5 call per min
AI is thinking...
13. Write short note on:
a. Queuing discipline
b. CSMP
a. Queueing Discipline
Queue discipline refers to the rule that a server uses to choose the next customer from the queue when the server completes the service of the current customer. Common queue disciplines include first-in-first-out (FIFO); last-in-first-out (LIFO); service in random order (SIRO); shortest processing time first (SPT); and service according to priority (PR).
- First in first out :This principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.
- Last in first out : This principle also serves customers one at a time, however the customer with the shortest waiting time will be served first.
- Service in random order: A customer is picked up randomly from the waiting queue for service.
- Shortest job first: The next job to be served is the one with the smallest size (shortest service time).
- Priority: Customers with high priority are served first.
b. CSMP
CSMP or Continuous System Modelling Program is an early scientific computer software designed for modelling and solving differential equations numerically. This enables real-world systems to be simulated and tested with a computer.
Types of statements in CSMP:
1. Structural statements which defines the model. They consist of FORTARN like statement and functional block designed for operations that frequently occur in a model definition. Structural statement can make use of the operation of addition, subtraction, multiplication, division and exponentiation, using the same notation and rule as are used in FORTRAN. If the model include the equation .Then the following statement would be used
X=6.0*Y/W+(Z-2)**2.0
2. Data statements which assign numerical value to parameters, constant and initial conditions. For example one data statement called INCON can be used to set the initial value of integration function block.
3. Control statements which specify options in the assembly and execution of program and choice of inputs. For e.g. If printed output is required, control statements with PRINT and PRDEL are used followed by the names of variables to form the outputs.
AI is thinking...
1. Define and describe Markov chain in detail with the help of suitable examples. Also describe at least three areas of application of Markov chain.
If the future states of a process are independent of the past and depend only on the present , the process is called a Markov process. A discrete state Markov process is called a Markov chain. A Markov Chain is a random process with the property that the next state depends only on the current state.
Markov chains are used to analyze trends and predict the future. (Weather, stock market, genetics, product success, etc.
Formally,
A Markov chain is a sequence of random variables X1, X2, X3, ... with the Markov property, namely that, given the present state, the future and past states are independent.
The conditional probability above gives us the probability that a process in state in at time n moves to in+1 at time n + 1. We call this the transition probability for the Markov chain. If the transition probability does not depend on the time n, we have a stationary Markov chain, with transition probabilities
Now we can write down the whole Markov chain as a matrix P:
Example:
Weather Problem:
- raining today ⇒ 40 % rain tomorrow
⇒ 60 % no rain tomorrow
- not raining today ⇒ 20 % rain tomorrow
⇒ 80 % no rain tomorrow
What will be probability if todays is not raining then not rain the day after tomorrow?
Markov chain diagram:
Transition matrix:
Thus, the probability of not rainy the day after tomorrow is 0.76.
Applications of Markov Chain
1. Physics: Markovian systems appear extensively in thermodynamics and statistical mechanics, whenever probabilities are used to represent unknown or unmodelled details of the system, if it can be assumed that the dynamics are time-invariant, and that no relevant history need be considered which is not already included in the state description.
2. Internet applications: The Page Rank of a webpage as used by Google is defined by a Markov chain. It is the probability to be at page i in the stationary distribution on the following Markov chain on all (known) web pages
3. Statistics: Markov chain methods have also become very important for generating sequences of random numbers to accurately reflect very complicated desired probability distributions, via a process called Markov chain Monte Carlo (MCMC) And many more.
AI is thinking...
2. Explain Markov Chains with example.
If the future states of a process are independent of the past and depend only on the present , the process is called a Markov process. A discrete state Markov process is called a Markov chain. A Markov Chain is a random process with the property that the next state depends only on the current state.
Markov chains are used to analyze trends and predict the future. (Weather, stock market, genetics, product success, etc.
Formally,
A Markov chain is a sequence of random variables X1, X2, X3, ... with the Markov property, namely that, given the present state, the future and past states are independent.
The conditional probability above gives us the probability that a process in state in at time n moves to in+1 at time n + 1. We call this the transition probability for the Markov chain. If the transition probability does not depend on the time n, we have a stationary Markov chain, with transition probabilities
Now we can write down the whole Markov chain as a matrix P:
Example:
Weather Problem:
- raining today ⇒ 40 % rain tomorrow
⇒ 60 % no rain tomorrow
- not raining today ⇒ 20 % rain tomorrow
⇒ 80 % no rain tomorrow
What will be probability if todays is not raining then not rain the day after tomorrow?
Markov chain diagram:
Transition matrix:
Thus, the probability of not rainy the day after tomorrow is 0.76.
AI is thinking...
2. Explain the Markov chains with examples and its applications.
If the future states of a process are independent of the past and depend only on the present , the process is called a Markov process. A discrete state Markov process is called a Markov chain. A Markov Chain is a random process with the property that the next state depends only on the current state.
Markov chains are used to analyze trends and predict the future. (Weather, stock market, genetics, product success, etc.
Formally,
A Markov chain is a sequence of random variables X1, X2, X3, ... with the Markov property, namely that, given the present state, the future and past states are independent.
The conditional probability above gives us the probability that a process in state in at time n moves to in+1 at time n + 1. We call this the transition probability for the Markov chain. If the transition probability does not depend on the time n, we have a stationary Markov chain, with transition probabilities
Now we can write down the whole Markov chain as a matrix P:
Example:
Weather Problem:
- raining today ⇒ 40 % rain tomorrow
⇒ 60 % no rain tomorrow
- not raining today ⇒ 20 % rain tomorrow
⇒ 80 % no rain tomorrow
What will be probability if todays is not raining then not rain the day after tomorrow?
Markov chain diagram:
Transition matrix:
Thus, the probability of not rainy the day after tomorrow is 0.76.
Applications of Markov Chain
1. Physics: Markovian systems appear extensively in thermodynamics and statistical mechanics, whenever probabilities are used to represent unknown or unmodelled details of the system, if it can be assumed that the dynamics are time-invariant, and that no relevant history need be considered which is not already included in the state description.
2. Internet applications: The Page Rank of a webpage as used by Google is defined by a Markov chain. It is the probability to be at page i in the stationary distribution on the following Markov chain on all (known) web pages
3. Statistics: Markov chain methods have also become very important for generating sequences of random numbers to accurately reflect very complicated desired probability distributions, via a process called Markov chain Monte Carlo (MCMC) And many more.
AI is thinking...
6. What are the key features of Markov chains?
If the future states of a process are independent of the past and depend only on the present , the process is called a Markov process. A discrete state Markov process is called a Markov chain. A Markov Chain is a random process with the property that the next state depends only on the current state.
Markov chains are used to analyze trends and predict the future. (Weather, stock market, genetics, product success, etc.
Key features of Markov chains
1. The outcome of each experiment is one of a set of discrete state.
2. The outcome of the experiment depends only on the present state and not on the past state.
3. The transition probability remains constant from one to the next.
AI is thinking...
7. Define a Markov chains and its application.
If the future states of a process are independent of the past and depend only on the present , the process is called a Markov process. A discrete state Markov process is called a Markov chain. A Markov Chain is a random process with the property that the next state depends only on the current state.
Markov chains are used to analyze trends and predict the future. (Weather, stock market, genetics, product success, etc.
Applications of Markov Chain
1. Physics: Markovian systems appear extensively in thermodynamics and statistical mechanics, whenever probabilities are used to represent unknown or unmodelled details of the system, if it can be assumed that the dynamics are time-invariant, and that no relevant history need be considered which is not already included in the state description.
2. Internet applications: The Page Rank of a webpage as used by Google is defined by a Markov chain. It is the probability to be at page i in the stationary distribution on the following Markov chain on all (known) web pages
3. Statistics: Markov chain methods have also become very important for generating sequences of random numbers to accurately reflect very complicated desired probability distributions, via a process called Markov chain Monte Carlo (MCMC) And many more.
4. Queuing theory: Markov chains are the basis for the analytical treatment of queues (queuing theory). Agner Krarup Erlang initiated the subject in 1917. This makes them critical for optimizing the performance of telecommunications networks, where messages must often compete for limited resources (such as bandwidth).
AI is thinking...
5. Explain markov's chain with a suitable example.
If the future states of a process are independent of the past and depend only on the present , the process is called a Markov process. A discrete state Markov process is called a Markov chain. A Markov Chain is a random process with the property that the next state depends only on the current state.
Markov chains are used to analyze trends and predict the future. (Weather, stock market, genetics, product success, etc.
Formally,
A Markov chain is a sequence of random variables X1, X2, X3, ... with the Markov property, namely that, given the present state, the future and past states are independent.
The conditional probability above gives us the probability that a process in state in at time n moves to in+1 at time n + 1. We call this the transition probability for the Markov chain. If the transition probability does not depend on the time n, we have a stationary Markov chain, with transition probabilities
Now we can write down the whole Markov chain as a matrix P:
Example:
Weather Problem:
- raining today ⇒ 40 % rain tomorrow
⇒ 60 % no rain tomorrow
- not raining today ⇒ 20 % rain tomorrow
⇒ 80 % no rain tomorrow
What will be probability if todays is not raining then not rain the day after tomorrow?
Markov chain diagram:
Transition matrix:
Thus, the probability of not rainy the day after tomorrow is 0.76.
AI is thinking...
13. Write short notes on:
a. Markov
Chain
b. Feedback
system
a. Markov Chain
If the future states of a process are independent of the past and depend only on the present , the process is called a Markov process. A discrete state Markov process is called a Markov chain. A Markov Chain is a random process with the property that the next state depends only on the current state.
Markov chains are used to analyze trends and predict the future. (Weather, stock market, genetics, product success, etc.
b. Feedback system
The system takes feedback from the output i.e. input is coupled with output. A significant factor in the performance of many systems is that coupling occurs between the input and output of the system. The term feedback is used to describe the phenomenon.
One example of feedback system in which there is continuous control is the aircraft system. Here the input is a desired aircraft heading and the output is the actual heading. The gyroscope of the autopilot is able to detect the difference between the two headings. A feedback is established by using the difference to operate the control surface. Since change of heading will then affect the signal being used to control the heading.
The difference between the desired signal θt and actual heading θ0 is called the error signal, since it is a measure of the extent to which the system from the desired condition. It is denoted by є.
We also know that, in terms of angular acceleration
From equation (1), (2) & (3)
Dividing both sides by I, and making the following substitutions in equation (4)
(where
is damping factor)
This is a second order differential equation.
AI is thinking...
13. Define and describe Markov Chain with example.
If the future states of a process are independent of the past and depend only on the present , the process is called a Markov process. A discrete state Markov process is called a Markov chain. A Markov Chain is a random process with the property that the next state depends only on the current state.
Markov chains are used to analyze trends and predict the future. (Weather, stock market, genetics, product success, etc.
Formally,
A Markov chain is a sequence of random variables X1, X2, X3, ... with the Markov property, namely that, given the present state, the future and past states are independent.
The conditional probability above gives us the probability that a process in state in at time n moves to in+1 at time n + 1. We call this the transition probability for the Markov chain. If the transition probability does not depend on the time n, we have a stationary Markov chain, with transition probabilities
Now we can write down the whole Markov chain as a matrix P:
Example:
Weather Problem:
- raining today ⇒ 40 % rain tomorrow
⇒ 60 % no rain tomorrow
- not raining today ⇒ 20 % rain tomorrow
⇒ 80 % no rain tomorrow
What will be probability if todays is not raining then not rain the day after tomorrow?
Markov chain diagram:
Transition matrix:
Thus, the probability of not rainy the day after tomorrow is 0.76.
AI is thinking...
12. Write short notes on: (2 × 2.5 = 5)
a. Differential equation
b. Markov Chain
a. Differential equation
The equation that consists of the higher order derivatives of the dependent variable is known as differential equations.
- The differential equation is said to be linear if any of the dependent variables and its derivatives have power of one and are multiplied by the constant.
E.g. M x’’ + D x’ + K x = K F(t)
where, M, D and K are constants; F(t) is the input to the system depending upon the independent variable t; x’’ and x’ are second and first order derivatives of dependent variable x.
- The differential equation is said to be non-linear if the dependent variable or any of its derivatives are raised to a power or are combined in other way like multiplication.
The differential equation is said to be partial if more than one independent variables occur in a differential equation.
-E.g. Equation of flow of heat in three dimensional body. It consists of four independent variables ( three dimensions and time ) and one dependent variable ( temperature ).
b. Markov Chain
If the future states of a process are independent of the past and depend only on the present , the process is called a Markov process. A discrete state Markov process is called a Markov chain. A Markov Chain is a random process with the property that the next state depends only on the current state.
Markov chains are used to analyze trends and predict the future. (Weather, stock market, genetics, product success, etc).
AI is thinking...
2. Differentiate between true and pseudo random numbers. What are the basic properties of random numbers? The sequence of numbers 0.37, 0.29, 0.19, 0.88 0.44, 0.63, 0.77, 0.70 0.21, and 0.58 has been generated. Use K-S test to determine if the numbers are uniformly distributed (Dα = 0.41 for α = 0.05 (2 + 2 + 6)
Difference between true and pseudo random numbers
- Pseudo random numbers are the random numbers that are generated by using some known methods (algorithms) so as to produce a sequence of numbers in [0,1] that can simulates the ideal properties of random numbers. They are not completely random as the set of random numbers can be replicated because of use of some known method.
- True random numbers are gained from physical processes like radioactive decay or also rolling a dice and introduce it into a computer.
- Pseudo random numbers have fast response in generating numbers while true random have slow response.
- In pseudo random number, sequence of numbers can be reproduced where as In true random number, sequence of numbers can't be reproduced.
- In pseudo random number, sequence of number is repeated where as In true random number, sequence of numbers will or will not be repeated.
Properties of Random Numbers
1. Uniformity:
- The random numbers generated should be uniform. That means a sequence of random numbers should be equally probable every where.
- If we divide all the set of random numbers into several numbers of class interval then number of samples in each class should be same.
- If ‘N’ number of random numbers are divided into ‘K’ class interval, then expected number of samples in each class should be equal to ei = N / K.
2. Independent:
- Each random number should be independent samples drawn from a continuous uniform distribution between 0 and 1.
- The probability density function is given by:
f(x) = 1, 0 <= x <= 1
= 0, otherwise
3. Maximum Density:
- The large samples of random number should be generated in a given range.
4. Maximum Cycle:
- It states that the repetition of numbers should be allowed only after a large interval of time.
Now,
Given sequence of number,
0.37, 0.29, 0.19, 0.88 0.44, 0.63, 0.77, 0.70 0.21, and 0.58
Arranging the given number in ascending order:
0.19, 0.21, 0.29, 0.37, 0.44, 0.58, 0.63, 0.7, 0.77, 0.88
Here, N = 10
Calculation table for Kolmogorov-Smirnov test :
i | ||||
1 | 0.19 | 0.1 | - | 0.19 |
2 | 0.21 | 0.2 | - | 0.11 |
3 | 0.29 | 0.3 | 0.01 | 0.09 |
4 | 0.37 | 0.4 | 0.03 | 0.07 |
5 | 0.44 | 0.5 | 0.06 | 0.04 |
6 | 0.58 | 0.6 | 0.02 | 0.08 |
7 | 0.63 | 0.7 | 0.07 | 0.03 |
8 | 0.7 | 0.8 | 0.1 | - |
9 | 0.77 | 0.9 | 0.13 | - |
10 | 0.88 | 1.0 | 0.12 | - |
Now, calculating
= 0.13
= 0.19
= 0.19
Given, Critical value = 0.41
Since the computed value, D = 0.19, is less than the tabulated critical value, = 0.41, the hypothesis of no difference between the distribution of the generated numbers and the uniform distribution is not rejected.
AI is thinking...
2. Describe the linear congruential method for random number generation. Use the Multiplicative congruential method to generate a sequence of four-three digit random integers, with seed = 117, constant multiplier = 43 and modulus = 1000. [4+6]
The linear congruential method produces a sequence of integers X1, X2, X3,.......between zero and m-1 according to the following recursive relationship:
- The initial value X0 is called the seed;
- a is called the constant multiplier;
- c is the increment
- m is the modulus
The selection of a, c, m and X0 drastically affects the statistical properties such as mean and variance, and the cycle length.
Case 1:
When , the form is called the mixed congruential method.
Case 2:
When c = 0, the form is known as the multiplicative congruential method.
Case 3:
When a = 1, the form is known as additive congruential method.
The random numbers corresponding to each random integer can be obtained as:
Ri = Xi/m, for i = 0, 1, 2, 3, …………..
Now,
Given,
X0 = 117,
α = 43,
m=1000
We have,
For multiplicative congruential method:
Xi+1 = (α Xi ) mod m
The sequence of random integers are calculated as follows:
X0 = 117
X1 = (α X0) mod m = (43*117) mod 1000 = 5031 mod 1000 = 031
X2 = (α X1) mod m = (43*31) mod 1000 = 1333 mod 1000 = 333
X3 = (α X2) mod m = (43*333) mod 1000 = 14319 mod 1000 = 319
X4= (α X3 ) mod m = (43*319) mod 1000 = 13717 mod 1000 = 717
AI is thinking...
2. Use multiplicative congruential method to generate a sequence of three digits random numbers between (0, 1) with X0=27, a=3 and m=1000. Use any one of the uniformity test to find out whether the generated numbers are uniformly distributed or not? (Critical value for α=0.05 and N=5 is 0.565).
Given,
X0 = 27,
α = 3,
m=1000
We have,
For multiplicative congruential method:
Xi+1 = (α Xi ) mod m
& Ri =Xi/m,
The sequence of random numbers are calculated as follows:
X0 = 27
R0 = 27/1000 = 0.027
X1 = (α X0) mod m = (3*27) mod 1000 = 81 mod 1000 = 81
R1 = 81/1000 = 0.081
X2 = (α X1) mod m = (3*81) mod 1000 = 243 mod 1000 = 243
R2 = 243/1000 = 0.243
X3 = (α X2) mod m = (3*243) mod 1000 = 729 mod 1000 = 729
R3 = 729/1000 = 0.729
X4= (α X3 ) mod m = (3*729) mod 1000 = 2187 mod 1000 = 187
R4 = 187/1000 = 0.187
Arranging the above random numbers number in ascending order:
0.027, 0.081, 0.187, 0.243,, 0.729
Here, N = 5
Calculation table for Kolmogorov-Smirnov test :
i | ||||
1 | 0.027 | 0.2 | 0.173 | 0.027 |
2 | 0.081 | 0.4 | 0.319 | - |
3 | 0.187 | 0.6 | 0.413 | - |
4 | 0.243 | 0.8 | 0.557 | - |
5 | 0.729 | 1 | 0.271 | - |
Now, calculating
= 0.557
= 0.027
= 0.557
Given, Critical value = 0.565
Since the computed value, D = 0.557, is less than the tabulated critical value, = 0.565, the hypothesis of no difference between the distribution of the generated numbers and the uniform distribution is not rejected.
AI is thinking...
2. Define and develop a Poker test for four-digit random numbers. A sequence of 10,000 random numbers, each of four digits has been generated. The analysis of the numbers reveals that in 5120 numbers all four digits are different, 4230 contain exactly one pair of like digits, 560 contain two pairs, 75 have three digits of a kind and 15 contain all like digits. Use Poker test to determine whether these numbers are independent. (Critical value of chi-square test for α=0.05 and N=4 is 9.49)
The Poker Test is the test for independence based on the frequency with which certain digits are repeated with in a series of numbers. This test not only tests for the randomness of the sequence of numbers, but also the digits comprising of each of the numbers. The expected value of each of the combination of digits in a number is compared with the observed value by means of the chi-square test for independence. The acceptance is done if the observed value of chi-square sums for all the possible combinations of digits is less than the acceptable value for the given degree of freedom at the specified confidence interval.
Poker test for four digit numbers
In four digit number, there are five different possibilities
- All individual digits can be different
- There can be one pair of like digit
- There can be two pair of like digits
- There can be three digits of a kind
- There can be four digits of a kind
The probabilities associated with each of the possibilities is given by
P (four different digits) = 4C4 * (10/10) * (9/10) * (8/10) * (7/10) = 0.504
P (one pair) = 4C2 * (10/10) * (1/10) * (9/10) * (8/10) = 0.432
P (two pair) = (4C2/2)*(10/10) * (1/10) * (9/10) * (1/10) = 0.027
P (three digits of a kind) = 4C3 * (10/10) * (1/10) * (1/10) * (9/10) = 0.036
P (four digits of a kind) = 4C4 * (10/10) * (1/10) * (1/10) * (1/10) = 0.001
Now the calculation table for the Chi-square statistics is:
Combination(i) | Observed Frequency(Oi) | Expected Frequency(Ei) | (Oi-Ei) | (Oi-Ei)2/Ei |
Four different digits | 5120 | 0.504*10000 = 5040 | 80 | 1.269 |
One pair | 4230 | 0.432*10000 = 4320 | -90 | 1.875 |
Two pair | 560 | 0.027*10000 = 270 | 290 | 311.481 |
Three digits of a kind | 75 | 0.036*10000 = 360 | 285 | 225.625 |
Four digits of a kind | 15 | 0.001*10000 = 10 | 5 | 2.5 |
10000 | 10000 | Σ(Oi-Ei)2/Ei = 542.75 |
= 542.75
and Given α, N =
0.05, 4= 9.49
Here the calculated value of chi-square is 542.75 which is greater than the given tabulated value of chi- square so we reject the null hypothesis of independence between given numbers.
AI is thinking...
2. Use multiplicative congruential method to generate a sequence of three digits random numbers between (0, 1) with X0=27, a=3 and m=1000. Use any one of the uniformity test to find out whether the generated numbers are uniformly distributed or not? (Critical value for α=0.05 and N=5 is 0.565).
Given,
X0 = 27,
α = 3,
m=1000
We have,
For multiplicative congruential method:
Xi+1 = (α Xi ) mod m
& Ri =Xi/m,
The sequence of random numbers are calculated as follows:
X0 = 27
R0 = 27/1000 = 0.027
X1 = (α X0) mod m = (3*27) mod 1000 = 81 mod 1000 = 81
R1 = 81/1000 = 0.081
X2 = (α X1) mod m = (3*81) mod 1000 = 243 mod 1000 = 243
R2 = 243/1000 = 0.243
X3 = (α X2) mod m = (3*243) mod 1000 = 729 mod 1000 = 729
R3 = 729/1000 = 0.729
X4= (α X3 ) mod m = (3*729) mod 1000 = 2187 mod 1000 = 187
R4 = 187/1000 = 0.187
Arranging the above random numbers number in ascending order:
0.027, 0.081, 0.187, 0.243,, 0.729
Here, N = 5
Calculation table for Kolmogorov-Smirnov test :
i | ||||
1 | 0.027 | 0.2 | 0.173 | 0.027 |
2 | 0.081 | 0.4 | 0.319 | - |
3 | 0.187 | 0.6 | 0.413 | - |
4 | 0.243 | 0.8 | 0.557 | - |
5 | 0.729 | 1 | 0.271 | - |
Now, calculating
= 0.557
= 0.027
= 0.557
Given, Critical value = 0.565
Since the computed value, D = 0.557, is less than the tabulated critical value, = 0.565, the hypothesis of no difference between the distribution of the generated numbers and the uniform distribution is not rejected.
AI is thinking...
2. Define and develop a Poker test for four-digit random numbers. A sequence of 10,000 random numbers, each of four digits has been generated. The analysis of the numbers reveals that in 5120 numbers all four digits are different, 4230 contain exactly one pair of like digits, 560 contain two pairs, 75 have three digits of a kind and 15 contain all like digits. Use Poker test to determine whether these numbers are independent. (Critical value of chi-square test for α=0.05 and N=4 is 9.49)
The Poker Test is the test for independence based on the frequency with which certain digits are repeated with in a series of numbers. This test not only tests for the randomness of the sequence of numbers, but also the digits comprising of each of the numbers. The expected value of each of the combination of digits in a number is compared with the observed value by means of the chi-square test for independence. The acceptance is done if the observed value of chi-square sums for all the possible combinations of digits is less than the acceptable value for the given degree of freedom at the specified confidence interval.
Poker test for four digit numbers
In four digit number, there are five different possibilities
- All individual digits can be different
- There can be one pair of like digit
- There can be two pair of like digits
- There can be three digits of a kind
- There can be four digits of a kind
The probabilities associated with each of the possibilities is given by
P (four different digits) = 4C4 * (10/10) * (9/10) * (8/10) * (7/10) = 0.504
P (one pair) = 4C2 * (10/10) * (1/10) * (9/10) * (8/10) = 0.432
P (two pair) = (4C2/2)*(10/10) * (1/10) * (9/10) * (1/10) = 0.027
P (three digits of a kind) = 4C3 * (10/10) * (1/10) * (1/10) * (9/10) = 0.036
P (four digits of a kind) = 4C4 * (10/10) * (1/10) * (1/10) * (1/10) = 0.001
Now the calculation table for the Chi-square statistics is:
Combination(i) | Observed Frequency(Oi) | Expected Frequency(Ei) | (Oi-Ei) | (Oi-Ei)2/Ei |
Four different digits | 5120 | 0.504*10000 = 5040 | 80 | 1.269 |
One pair | 4230 | 0.432*10000 = 4320 | -90 | 1.875 |
Two pair | 560 | 0.027*10000 = 270 | 290 | 311.481 |
Three digits of a kind | 75 | 0.036*10000 = 360 | 285 | 225.625 |
Four digits of a kind | 15 | 0.001*10000 = 10 | 5 | 2.5 |
10000 | 10000 | Σ(Oi-Ei)2/Ei = 542.75 |
= 542.75
and Given α, N =
0.05, 4= 9.49
Here the calculated value of chi-square is 542.75 which is greater than the given tabulated value of chi- square so we reject the null hypothesis of independence between given numbers.
AI is thinking...
3. What is the main objective of gap test? Explain gap test algorithm with example.
The gap test is used to determine the significance of the interval between recurrence of the same digit. A gap of length x occurs between the recurrence of some digit. It Counts the number of digits that appear between repetitions of a particular digit and then uses the Kolmogorov-Smirnov test to compare with the expected number of gaps.
The probability of a particular gap length can be determined by a Bernoulli trail.
If we are only concerned with digits between 0 and 9, then
The theoretical frequency distribution for randomly ordered digits is given by

AI is thinking...
3. Explain the independence test. A sequence of 1000 four digit numbers has been generated and an analysis indicates the following combinations and frequencies.
Combination(i) |
Observed frequency (Oi) |
Four different digits |
560 |
One pair |
394 |
Two pair |
32 |
Three digits of a kind |
13 |
Four digits of a kind |
1 |
|
1000 |
Based on poker test, test whether these numbers are independent. Use α=0.05 and N=4 is 9.49.
Independent test determines whether a random number generator is producing independent random number in a sequence. Test for independence includes the three types of tests as given below:
1) Autocorrelation Test tests the correlation between numbers and compares the sample correlation to the expected correlation of zero.
2) Gap test Counts the number of digits that appear between repetitions of particular digit and then uses the Kolmogorov-Smirnov test to compare with the expected size of gaps,
3) Poker test: Treats numbers grouped together as a poker hand. Then the hands obtained are compared to what is expected using the chi-square test.
Now,
The probabilities associated with each of the given combination is given by
P (four different digits) = 4C4 * (10/10) * (9/10) * (8/10) * (7/10) = 0.504
P (one pair) = 4C2 * (10/10) * (1/10) * (9/10) * (8/10) = 0.432
P (two pair) = (4C2/2)*(10/10) * (1/10) * (9/10) * (1/10) = 0.027
P (three digits of a kind) = 4C3 * (10/10) * (1/10) * (1/10) * (9/10) = 0.036
P (four digits of a kind) = 4C4 * (10/10) * (1/10) * (1/10) * (1/10) = 0.001
Now the calculation table for the Chi-square statistics is:
Combination(i) | Observed Frequency(Oi) | Expected Frequency(Ei) | (Oi-Ei) | (Oi-Ei)2/Ei |
Four different digits | 560 | 0.504*1000 = 504 | 56 | 6.22 |
One pair | 394 | 0.432*1000 = 432 | -38 | 3.343 |
Two pair | 32 | 0.027*1000 = 27 | 5 | 0.926 |
Three digits of a kind | 13 | 0.036*1000 = 36 | -23 | 14.694 |
Four digits of a kind | 1 | 0.001*1000 = 1 | 0 | 0.000 |
1000 | 1000 | Σ(Oi-Ei)2/Ei = 25.183 |
= 25. 183
and Given α, N =
0.05, 4= 9.49
Here the calculated value of chi-square is 25.183 which is greater than the given tabulated value of chi- square so we reject the null hypothesis of independence between given numbers.
AI is thinking...
2. Differentiate between chi-square test and KS test for uniformity. Use KS test to check for the uniformity for the input set of random numbers given below.0.54, 0.73, 0.98, 0.11,0.68,0.45. Assume level of significance to be Dα = 0.05=> 0.565.
The Chi Square test is used to test whether the distribution of nominal variables is same or not as well as for other distribution matches and on the other hand the Kolmogorov Smirnov (K-S) test is only used to test to the goodness of fit for a continuous data.
Kolmogorov Smirnov (K-S) test compares the continuous cdf, F(X), of the uniform distribution to the empirical cdf, SN(x), of the sample of N observations. By definition,
F(x) = x, 0 <= x <= 1
If the sample from the random-number generator is R1, R2,......,RN, then the empirical cdf, SN(X), is defined by
SN(X) = (Number of R1, R2,......,RN which are <= x)/N
As N becomes larger, SN(X) should become a better approximation to F(X), provided that the null hypothesis is true. The Kolmogorov-Smirnov test is based on the largest absolute deviation or difference between F(x) and SN(X) over the range of the random variable. I.e. it is based on the statistic
D = max | F(x) - SN(x)|
The chi-square test uses the sample statistic
Where Oi is the observed number in the ith class, Ei is the expected number in the ith class, and n is the number of classes. For the uniform distribution, Ei ist the expected number in each class is given by: Ei = N/n, N is the total number of observation.
Now,
Given sequence of number,
0.54, 0.73, 0.98, 0.11,0.68 and 0.45
Arranging the given number in ascending order:
0.11, 0.45, 0.54, 0.68, 0.73, 0.98
Here, N = 6
Calculation table for Kolmogorov-Smirnov test :
i | ||||
1 | 0.11 | 0.17 | 0.06 | 0.11 |
2 | 0.45 | 0.33 | - | 0.28 |
3 | 0.54 | 0.5 | - | 0.21 |
4 | 0.68 | 0.67 | 0.07 | 0.18 |
5 | 0.73 | 0.83 | 0.1 | 0.06 |
6 | 0.98 | 1 | 0.02 | 0.15 |
Now, calculating
= 0.1
= 0.28
= 0.28
Given, Critical value = 0.565
Since the computed value, D = 0.28, is less than the tabulated critical value, = 0.565, the hypothesis of no difference between the distribution of the generated numbers and the uniform distribution is not rejected.
AI is thinking...
3. What do you mean by uniformity test? Explain the poker test with example.
The testing for uniformity can be achieved through different frequency test. These tests use the Kolmogorov-Smirnov or the chi- square test to compare the distribution of the set of numbers generated to a uniform distribution.
The Poker Test is the test for independence based on the frequency with which certain digits are repeated with in a series of numbers. This test not only tests for the randomness of the sequence of numbers, but also the digits comprising of each of the numbers. The expected value of each of the combination of digits in a number is compared with the observed value by means of the chi-square test for independence. The acceptance is done if the observed value of chi-square sums for all the possible combinations of digits is less than the acceptable value for the given degree of freedom at the specified confidence interval.
Example:
Poker test for three digit numbers
In each case, a pair of like digits appears in the number that was generated. In three-digit numbers there are only three possibilities, as follows:
1. The individual numbers can all be different.
2. The individual numbers can all be the same.
3. There can be one pair of like digits.
The probability associated with each of these possibilities is given by the following
P (three different digits) = (0.9)*(0.8) = 0.72
P (three like digits) = (0.1)*(0.1) = 0.01
P (exactly one pair) = 1 - 0.72 - 0.01 = 0.27
E.g.
Suppose a sequence of 1000 three-digit numbers has been generated and an analysis indicates that 680 have three different digits, 289 contain exactly one pair of like digits, and 31 three like digits. Based on the poker test, we are going to check are these number independent? Let α = 0.05..
Since, 47.65 > X20.05,2 = 5.99 (tabulated value), the independence of the numbers is rejected on the basis of this test.
AI is thinking...
3. Define frequency test for random numbers. Develop the Poker test for four digit numbers, and use it to test whether a sequence of following 1000-four digit numbers are independent. [2+4+4]
(Use Use α=0.05 and N=4 is 9.49)
Combination(i) |
Observed frequency (Oi) |
Four different digits |
565 |
One pair |
392 |
Two pairs |
17 |
Three like digits |
24 |
Four like digits |
2 |
|
1000 |
Frequency test uses the Kolmogorov-Smirnov or the chi-square test to compare the distribution of the set of numbers generated to a uniform distribution.
The Poker Test is the test for independence based on the frequency with which certain digits are repeated with in a series of numbers. This test not only tests for the randomness of the sequence of numbers, but also the digits comprising of each of the numbers. The expected value of each of the combination of digits in a number is compared with the observed value by means of the chi-square test for independence. The acceptance is done if the observed value of chi-square sums for all the possible combinations of digits is less than the acceptable value for the given degree of freedom at the specified confidence interval.
Poker test for four digit numbers
In four digit number, there are five different possibilities
- All individual digits can be different
- There can be one pair of like digit
- There can be two pair of like digits
- There can be three digits of a kind
- There can be four digits of a kind
The probabilities associated with each of the possibilities is given by
P (four different digits) = 4C4 * (10/10) * (9/10) * (8/10) * (7/10) = 0.504
P (one pair) = 4C2 * (10/10) * (1/10) * (9/10) * (8/10) = 0.432
P (two pair) = (4C2/2)*(10/10) * (1/10) * (9/10) * (1/10) = 0.027
P (three digits of a kind) = 4C3 * (10/10) * (1/10) * (1/10) * (9/10) = 0.036
P (four digits of a kind) = 4C4 * (10/10) * (1/10) * (1/10) * (1/10) = 0.001
Now the calculation table for the Chi-square statistics is:
Combination(i) | Observed Frequency(Oi) | Expected Frequency(Ei) | (Oi-Ei) | (Oi-Ei)2/Ei |
Four different digits | 565 | 0.504*1000 = 504 | 61 | 7.383 |
One pair | 392 | 0.432*1000 = 432 | -40 | 3.704 |
Two pair | 17 | 0.027*1000 = 27 | -10 | 3.704 |
Three digits of a kind | 24 | 0.036*1000 = 36 | -12 | 4.000 |
Four digits of a kind | 2 | 0.001*1000 = 1 | 1 | 1 |
1000 | 1000 | Σ(Oi-Ei)2/Ei = 19.791 |
= 19.791
and Given α, N =
0.05, 4= 9.49
Here the calculated value of chi-square is 19.791 which is greater than the given tabulated value of chi- square so we reject the null hypothesis of independence between given numbers.
AI is thinking...
3. What are the properties of random number? The sequence of numbers 0.54, 0.73, 0.98, 0.11 and 0.68 has been generated. Use the Kolmogorov-Smirnov test α=0.05 to determine if the hypothesis that the numbers are uniformly distributed on the interval 0 to 1 can be rejected. (Note that the critical value of D for α=0.05 and N=5 is 0.565).
Random numbers are samples drawn from a uniformly distributed random variable between some satisfied intervals, they have equal probability of occurrence.
Properties of Random Numbers
1. Uniformity:
- The random numbers generated should be uniform. That means a sequence of random numbers should be equally probable every where.
- If we divide all the set of random numbers into several numbers of class interval then number of samples in each class should be same.
- If ‘N’ number of random numbers are divided into ‘K’ class interval, then expected number of samples in each class should be equal to ei = N / K.
2. Independent:
- Each random number should be independent samples drawn from a continuous uniform distribution between 0 and 1.
- The probability density function is given by:
f(x) = 1, 0 <= x <= 1
= 0, otherwise
3. Maximum Density:
- The large samples of random number should be generated in a given range.
4. Maximum Cycle:
- It states that the repetition of numbers should be allowed only after a large interval of time.
Now,
Given sequence of number,
0.54, 0.73, 0.98, 0.11 and 0.68
Arranging the given number in ascending order:
0.11, 0.54, 0.68, 0.73, 0.98
Here, N = 5
Calculation table for Kolmogorov-Smirnov test :
i | ||||
1 | 0.11 | 0.2 | 0.09 | 0.11 |
2 | 0.54 | 0.4 | - | 0.34 |
3 | 0.68 | 0.6 | - | 0.28 |
4 | 0.73 | 0.8 | 0.07 | 0.13 |
5 | 0.98 | 1 | 0.02 | 0.18 |
Now, calculating
= 0.09
= 0.35
= 0.35
Given, Critical value = 0.565
Since the computed value, D = 0.35, is less than the tabulated critical value, = 0.565, the hypothesis of no difference between the distribution of the generated numbers and the uniform distribution is not rejected.
AI is thinking...
5. What do you mean by Pseudo random numbers?
Pseudo random numbers are the random numbers that are generated by using some known methods (algorithms) so as to produce a sequence of numbers in [0,1] that can simulates the ideal properties of random numbers. They are not completely random as the set of random numbers can be replicated because of use of some known method.
Every new number is generated from the previous ones by an algorithm. This means that the new value is fully determined by the previous ones. But, depending on the algorithm, they often have properties making them very suitable for simulations.
When generating pseudo-random numbers, certain problems or errors can occur. Some examples include the following:
1. The generated numbers might not be uniformly distributed.
2. The generated numbers might be discrete valued instead of continuous valued.
3. The mean of the generated numbers might be too high or too low.
4. The variance of the generated numbers might be too high or too low.
5. There might be presence of correlation between the generated numbers.
The important considerations that should be made while generating pseudo random numbers are as follows:
1. The method used to generate random number should be fast because the simulation problem requires a large set of random numbers which can increase time complexity of the system.
2. The method used should be portable to different platform and programming languages so as to generate same results wherever it is executed.
3. The method should have long cycle.
4. The random numbers should be replicable. It means that the same set of random numbers should be generated with same starting point.
5. The generated random numbers should approximate the uniformity and independence properties.
AI is thinking...
6. Why the random numbers generated by computer called pseudo random number? List out different types of errors that may occur while generating pseudo-random numbers.
In computer random numbers are derived from a known starting point and is typically repeated over and over using some known methods (algorithms) to produce a sequence of numbers. The sequence of numbers are not completely random as the set of random numbers can be replicated because of use of some known method. So, the random numbers generated by computer called pseudo random numbers.
Every new number is generated from the previous ones by an algorithm. This means that the new value is fully determined by the previous ones. But, depending on the algorithm, they often have properties making them very suitable for simulations.
When generating pseudo-random numbers, certain problems or errors can occur. Some examples include the following:
1. The generated numbers might not be uniformly distributed.
2. The generated numbers might be discrete valued instead of continuous valued.
3. The mean of the generated numbers might be too high or too low.
4. The variance of the generated numbers might be too high or too low.
5. There might be presence of correlation between the generated numbers.
AI is thinking...
6. Define random numbers and describe why the random numbers generated by computer called pseudo random numbers?
- Random numbers are samples drawn from a uniformly distributed random variable between some satisfied intervals, they have equal probability of occurrence.
- A number chosen from some specified distribution randomly such that selection of large set of these numbers reproduces the underlying distribution is called random number.
In computer random numbers are derived from a known starting point and is typically repeated over and over using some known methods (algorithms) to produce a sequence of numbers. The sequence of numbers are not completely random as the set of random numbers can be replicated because of use of some known method. So, the random numbers generated by computer called pseudo random numbers.
Every new number is generated from the previous ones by an algorithm. This means that the new value is fully determined by the previous ones. But, depending on the algorithm, they often have properties making them very suitable for simulations.
When generating pseudo-random numbers, certain problems or errors can occur. Some examples include the following:
1. The generated numbers might not be uniformly distributed.
2. The generated numbers might be discrete valued instead of continuous valued.
3. The mean of the generated numbers might be too high or too low.
4. The variance of the generated numbers might be too high or too low.
5. There might be presence of correlation between the generated numbers.
AI is thinking...
6. What do you mean by pseudo random numbers?
Pseudo random numbers are the random numbers that are generated by using some known methods (algorithms) so as to produce a sequence of numbers in [0,1] that can simulates the ideal properties of random numbers. They are not completely random as the set of random numbers can be replicated because of use of some known method.
Every new number is generated from the previous ones by an algorithm. This means that the new value is fully determined by the previous ones. But, depending on the algorithm, they often have properties making them very suitable for simulations.
When generating pseudo-random numbers, certain problems or errors can occur. Some examples include the following:
1. The generated numbers might not be uniformly distributed.
2. The generated numbers might be discrete valued instead of continuous valued.
3. The mean of the generated numbers might be too high or too low.
4. The variance of the generated numbers might be too high or too low.
5. There might be presence of correlation between the generated numbers.
The important considerations that should be made while generating pseudo random numbers are as follows:
1. The method used to generate random number should be fast because the simulation problem requires a large set of random numbers which can increase time complexity of the system.
2. The method used should be portable to different platform and programming languages so as to generate same results wherever it is executed.
3. The method should have long cycle.
4. The random numbers should be replicable. It means that the same set of random numbers should be generated with same starting point.
5. The generated random numbers should approximate the uniformity and independence properties.
AI is thinking...
6. Explain non-uniform random number generation.
Non-uniform random variate generation is concerned with the generation of random variables with certain distributions. Such random variables are often discrete, taking values in a countable set, or absolutely continuous, and thus described by a density. The methods used for generating non-uniform random variate are inverse transformation technique and acceptance/rejection technique.
Acceptance/Rejection Method
The rejection method for obtaining samples of random numbers forms a given non-uniform distribution works by generating uniform random numbers repeatedly and accepting only those numbers that meet certain conditions.
The rejection method is applied when the probability density function, f(x), has a lower and upper limit to its range, 'a' and 'b', respectively, and an upper bound 'c'. The method can be specified as follows:
1. Find the maximum value c of f(x) on a ≤ x ≤ b.
f(X) ≤ c ∀ x ∈ [a, b]
2. Compute two values μ1, μ2 of the uniformity distributed variables, both defined on [a, b] = [0, 1].
3. Compute x0 = a + μ1(b - a)
4. Compute y0 = c μ2
5. If y0 ≤ f(x0), accept x0 as desired output; otherwise reject x0 and repeat the process with two next values μ1 & μ2.
AI is thinking...
6. What do you mean by non-uniform random number?
Non-uniform random variate generation is concerned with the generation of random variables with certain distributions. Such random variables are often discrete, taking values in a countable set, or absolutely continuous, and thus described by a density. The methods used for generating non-uniform random variate are inverse transformation technique and acceptance/rejection technique.
Acceptance/Rejection Method
The rejection method for obtaining samples of random numbers forms a given non-uniform distribution works by generating uniform random numbers repeatedly and accepting only those numbers that meet certain conditions.
The rejection method is applied when the probability density function, f(x), has a lower and upper limit to its range, 'a' and 'b', respectively, and an upper bound 'c'. The method can be specified as follows:
1. Find the maximum value c of f(x) on a ≤ x ≤ b.
f(X) ≤ c ∀ x ∈ [a, b]
2. Compute two values μ1, μ2 of the uniformity distributed variables, both defined on [a, b] = [0, 1].
3. Compute x0 = a + μ1(b - a)
4. Compute y0 = c μ2
5. If y0 ≤ f(x0), accept x0 as desired output; otherwise reject x0 and repeat the process with two next values μ1 & μ2.
AI is thinking...
7. Explain the process of testing for auto-correlation test.
Autocorrelation Test is a statistical test that determines whether a random number generator is producing independent random number in a sequence. The test for the auto correlation is concerned with the dependence between numbers in a sequence.
The test computes the autocorrelation between every m numbers (m is also known as lag) starting with ith index. Thus the autocorrelation between the following numbers would be of interest.
The value M is the largest integer such that where N is the total number of values in the sequence.
For large values of M, the distribution of the estimator , denoted as
, is approximately normal if the values
are uncorrelated.
Form the test statistic:
The actual formula for and the standard deviation is
and
After computing , do not reject the null hypothesis of independence if
where
is the level of significance.
AI is thinking...
7. Explain the congruence method of generating random numbers.
The congruence method (linear congruential method) produces a sequence of integers X1, X2, X3,.......between zero and m-1 according to the following recursive relationship:
- The initial value X0 is called the seed;
- a is called the constant multiplier;
- c is the increment
- m is the modulus
The selection of a, c, m and X0 drastically affects the statistical properties such as mean and variance, and the cycle length.
Case 1:
When , the form is called the mixed congruential method.
Case 2:
When c = 0, the form is known as the multiplicative congruential method.
Case 3:
When a = 1, the form is known as additive congruential method.
The random numbers corresponding to each random integer can be obtained as:
Ri = Xi/m, for i = 0, 1, 2, 3, …………..
AI is thinking...
7. Why an auto-correlation test is needed in random number?
Autocorrelation Test is needed to determines whether a random number generator is producing independent random number in a sequence. The test for the auto correlation is concerned with the dependence between numbers in a sequence.
The test computes the autocorrelation between every m numbers (m is also known as lag) starting with ith index. Thus the autocorrelation between the following numbers would be of interest.
The value M is the largest integer such that where N is the total number of values in the sequence.
For large values of M, the distribution of the estimator , denoted as
, is approximately normal if the values
are uncorrelated.
Form the test statistic:
The actual formula for and the standard deviation is
and
After computing , do not reject the null hypothesis of independence if
where
is the level of significance.
AI is thinking...
7. Describe the rejection method of generating the random numbers.
The rejection method for obtaining samples of random numbers forms a given non-uniform distribution works by generating uniform random numbers repeatedly and accepting only those numbers that meet certain conditions.
The rejection method is applied when the probability density function, f(x), has a lower and upper limit to its range, 'a' and 'b', respectively, and an upper bound 'c'. The method can be specified as follows:
1. Find the maximum value c of f(x) on a ≤ x ≤ b.
f(X) ≤ c ∀ x ∈ [a, b]
2. Compute two values μ1, μ2 of the uniformity distributed variables, both defined on [a, b] = [0, 1].
3. Compute x0 = a + μ1(b - a)
4. Compute y0 = c μ2
5. If y0 ≤ f(x0), accept x0 as desired output; otherwise reject x0 and repeat the process with two next values μ1 & μ2.
AI is thinking...
8. Use the linear congruential method to generate a sequence of three two-digit random integers. Let X0=29, α=9, c=49 and m=100.
Given,
X0 = 29,
α = 9,
c= 49 &
m=100
We have,
Xi+1 = (α Xi + c) mod m
The sequence of random integers are calculated as follows:
X0 = 29
X1 = (α X0 + c) mod m = (9*29+49) mod 100 = 310 mod 100 = 10
X2 = (α X1 + c) mod m = (9*10+49) mod 100 = 139 mod 100 = 39
X3 = (α X2 + c) mod m = (9*39+49) mod 100 = 400 mod 100 = 0
AI is thinking...
9. The sequence of numbers 0.54, 0.73, 0.97, 0.10 and 0.67 has been generated. Use the Kolmogorov-Smirnov test α=0.05 to determine if the hypothesis that the numbers are uniformly distributed on the interval [0, 1] can be rejected. (Note that the critical value of D for α=0.05 and μ=5 is 0.565).
Given sequence of number,
0.54, 0.73, 0.97, 0.10 and 0.67
Arranging the given number in ascending order:
0.10, 0.54, 0.67, 0.73, 0.97
Here, N = 5
Calculation table for Kolmogorov-Smirnov test :
i | ||||
1 | 0.10 | 0.2 | 0.1 | 0.10 |
2 | 0.54 | 0.4 | - | 0.34 |
3 | 0.67 | 0.6 | - | 0.27 |
4 | 0.73 | 0.8 | 0.07 | 0.13 |
5 | 0.97 | 1 | 0.03 | 0.17 |
Now, calculating
= 0.1
= 0.34
= 0.34
Given, Critical value = 0.565
Since the computed value, D = 0.34, is less than the tabulated critical value, = 0.565, the hypothesis of no difference between the distribution of the generated numbers and the uniform distribution is not rejected.
AI is thinking...
9. Use Multiplicative congruential method to generate a sequence of 10 three-digit random
integers and corresponding random variables. Let X0 = 5, a = 3 and c=2.
Given,
X0 = 5,
α = 3
c = 2,
For three-digit random integers
m=1000
We have,
For multiplicative congruential method ( c =0) so
Xi+1 = (α Xi ) mod m
The sequence of random integers are calculated as follows:
X0 = 5
R0 = 5/1000 = 0.005
X1 = (α X0) mod m = (3*5) mod 1000 = 15 mod 1000 = 15
R1 = 15/1000 = 0.015
X2 = (α X1) mod m = (3*15) mod 1000 = 45 mod 1000 = 45
R2 = 45/1000 = 0.045
X3 = (α X2) mod m = (3*45) mod 1000 = 135 mod 1000 = 135
R3 = 135/1000 = 0.135
X4= (α X3 ) mod m = (3*135) mod 1000 = 405 mod 1000 = 405
R4 = 405/1000 = 0.405
X5= (α X4 ) mod m = (3*405) mod 1000 = 1215 mod 1000 = 215
R5= 215/1000 = 0.215
X6= (α X5) mod m = (3*215) mod 1000 = 645 mod 1000 = 645
R6 = 645/1000 = 0.645
X7= (α X6) mod m = (3*645) mod 1000 = 1935 mod 1000 = 935
R7 = 935/1000 = 0.935
X8= (α X7) mod m = (3*935) mod 1000 = 2805 mod 1000 = 805
R8 = 805/1000 = 0.805
X9= (α X8) mod m = (3*805) mod 1000 = 2415 mod 1000 = 415
R9 = 415/1000 = 0.415
X10 = (α X9) mod m = (3*415) mod 1000 = 1245 mod 1000 = 245
R10 = 245/1000 = 0.245
AI is thinking...
10. Use the multiplicative congruential method to generate five three digit random integers. X0=118, α=45 and m=1000.
Given,
X0 = 118,
α = 45,
m=1000
We have,
For multiplicative congruential method:
Xi+1 = (α Xi ) mod m
The sequence of random integers are calculated as follows:
X0 = 118
X1 = (α X0) mod m = (45*118) mod 1000 = 5310 mod 1000 = 310
X2 = (α X1) mod m = (45*310) mod 1000 = 13950 mod 1000 = 950
X3 = (α X2) mod m = (45*950) mod 1000 = 42750 mod 1000 = 750
X4= (α X3 ) mod m = (45*750) mod 1000 = 33750 mod 1000 = 750
X5= (α X4 ) mod m = (45*750) mod 1000 = 33750 mod 1000 = 750
AI is thinking...
8. Use mixed congruential method to generate a sequence of random numbers with X0 = 27, a = 17, m = 100 and c = 43.
Given,
X0 = 27,
α = 17,
c= 43 &
m=100
We have,
Xi+1 = (α Xi + c) mod m
Mixed Congruential Method: c ≠ 0
& Ri =Xi/m,
The sequence of random numbers are calculated as follows:
X0 = 27
R0 = 27/100 = 0.27
X1 = (α X0 + c) mod m = (17*27+43) mod 100 = 502 mod 100 = 2
R1 = 2/100 = 0.02
X2 = (α X1 + c) mod m = (17*2+43) mod 100 = 77 mod 100 = 77
R2 = 77/100 = 0.77
X3 = (α X2 + c) mod m = (17*77+43) mod 100 = 1352 mod 100 = 52
R3 = 52/100 = 0.52
X4 = (α X3 + c) mod m = (17*52+43) mod 100 = 927 mod 100 = 27
R4 = 27/100 = 0.27
Therefore,
The sequence of random integers are 27, 02, 77, 52, 27 & so on.
The sequence of random numbers are 0.27, 0.02, 0.77, 0.52, 0.27 & so on.
AI is thinking...
11. Use the mixed congruential method to generate a sequence of three two-digit random numbers with X0=37, α=7, c=29 and m=100.
Given,
X0 = 37,
α = 7,
c= 29 &
m=100
We have,
Xi+1 = (α Xi + c) mod m
Mixed Congruential Method: c ≠ 0
& Ri =Xi/m,
The sequence of random numbers are calculated as follows:
X0 = 37
R0 = 37/100 = 0.37
X1 = (α X0 + c) mod m = (7*37+29) mod 100 = 288 mod 100 = 88
R1 = 88/100 = 0.88
X2 = (α X1 + c) mod m = (7*88+29) mod 100 = 645 mod 100 = 45
R2 = 45/100 = 0.45
X3 = (α X2 + c) mod m = (7*45+29) mod 100 = 344 mod 100 = 44
R3 = 44/100 = 0.44
Therefore,
The sequence of random integers are 37, 88, 45, 44
The sequence of random numbers are 0.37, 0.88. 0.45, 0.44.
AI is thinking...
11. Use the multiplicative congruential method to generate a sequence of four three-digit random numbers. Let X0=118, α=4 and m=1000.
Given,
X0 = 118,
α = 4,
m=1000
We have,
For multiplicative congruential method:
Xi+1 = (α Xi ) mod m
& Ri =Xi/m,
The sequence of random numbers are calculated as follows:
X0 = 118
R0 = 118/1000 = 0.118
X1 = (α X0) mod m = (4*118) mod 1000 = 472 mod 1000 = 472
R1 = 472/1000 = 0.472
X2 = (α X1) mod m = (4*472) mod 1000 = 1888 mod 1000 = 888
R2 = 888/1000 = 0.888
X3 = (α X2) mod m = (4*888) mod 1000 = 3552 mod 1000 = 552
R3 = 552/1000 = 0.552
X4= (α X3 ) mod m = (4*552) mod 1000 = 2208 mod 1000 = 208
R4 = 208/1000 = 0.208
AI is thinking...
12. Write a computer program in C that will generate four digit random numbers using the multiplicative congruential method. Allow the user to input values of X0, a, c and m.
# include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
int x[10], n, a, c, m, i, j;
float r[10];
printf("Enter the number of random number to generate:");
scanf("%d", &n);
printf("Enter the value of seed x0:);
scanf("%d", &x[0]);
printf("Enter the value of a:");
scanf("%d", &a);
printf("Enter the value of c:");
scanf("%d", &c);
printf("Enter the value of m:");
scanf("%d", &m);
i=0;
r[0] = float(x[0]/m);
if (c == 0 && m==10000){
do{
x[i+1] = (a*x[i])%m;
r[i+1] = float(x[i+1]/m);
i++;
}while(i<=n);
printf("The obtained random numbers are:");
for(j=0; j<n; j++)
{
printf("%f", &r[j];
}
else{
printf("For Multiplicative congruential method the value of c should be zero and to generate four digit random number the value of m should be 10000 !!");
}
return 0;
}
AI is thinking...
12. Write a computer program that will generate three digit random numbers using the linear congruential method. Allow the user to input values of X0, a, c and m.
# include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
int x[10],n, a, c, m, i, j;
float r[10];
printf("Enter the number of random number to generate:");
scanf("%d", &n);
printf("Enter the value of seed x0:);
scanf("%d", &x[0]);
printf("Enter the value of a:");
scanf("%d", &a);
printf("Enter the value of c:");
scanf("%d", &c);
printf("Enter the value of m:");
scanf("%d", &m);
i=0;
r[0] = float(x[0]/m);
if (m ==1000)
{
do{
x[i+1] = (a*x[i]+c)%m;
r[i+1] = float(x[i+1]/m);
i++;
}while(i<=n);
printf("The obtained random numbers are:");
for(j=0; j<n; j++)
{
printf("%f", &r[j];
}
else{
printf("To generate three digit random number the value of m should be 1000 !!");
}
return 0;
}
AI is thinking...
12. Write a computer program in C that will generate four digit random numbers using the multiplicative congruential method. Allow the user to input values of X0, a, c and m.
# include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
int x[10], n, a, c, m, i, j;
float r[10];
printf("Enter the number of random number to generate:");
scanf("%d", &n);
printf("Enter the value of seed x0:);
scanf("%d", &x[0]);
printf("Enter the value of a:");
scanf("%d", &a);
printf("Enter the value of c:");
scanf("%d", &c);
printf("Enter the value of m:");
scanf("%d", &m);
i=0;
r[0] = float(x[0]/m);
if (c == 0 && m==10000){
do{
x[i+1] = (a*x[i])%m;
r[i+1] = float(x[i+1]/m);
i++;
}while(i<=n);
printf("The obtained random numbers are:");
for(j=0; j<n; j++)
{
printf("%f", &r[j];
}
else{
printf("For Multiplicative congruential method the value of c should be zero and to generate four digit random number the value of m should be 10000 !!");
}
return 0;
}
AI is thinking...
10. Explain generation of non uniform random number generation using inverse method.
Non-uniform random variate generation is concerned with the generation of random variables with certain distributions. Such random variables are often discrete, taking values in a countable set, or absolutely continuous, and thus described by a density.
AI is thinking...
4. Verification is concerned with building the “model right” and validation is concerned with building the “right model”. Justify it with suitable reasons.
Verification is the process of determining that a model implementation and its associated data accurately represent the developer's conceptual description and specifications. Verification answers the question "Have we built the model right?". The verification focuses on comparing the elements of a simulation model of the system with the description of what the requirements and capabilities of the model were to be. Verification is an iterative process aimed at determining whether the product of each step in the development of the simulation model fulfills all the requirements levied on it by the previous step and is internally complete, consistent, and correct enough to support the next phase.
Validation is the process of determining the degree to which a simulation model and its associated data are an accurate representation of the real world from the perspective of the intended uses of the model. Validation answers the question "Have we built the right model?”. The validation focuses on the agreement between the observed behavior of elements of a system with the corresponding elements of a simulation model of the system and on determining whether the differences are acceptable given the intended use of the model. If a satisfactory agreement is not obtained, the model is adjusted to bring it in closer agreement with the observed behavior of the actual system (or errors in observation/experimentation or reference models/analyses are identified and rectified).
AI is thinking...
6. Describe the process of model building, verification, and validation in brief.
Verification is concerned with building the model right. It is utilized in comparison of the conceptual model to the computer representation that implements that conception.
Validation is concerned with building the right model. It is utilized to determine that a model is an accurate representation of the real system. It is usually achieved through the calibration of the model.
Fig: Model building, verification and validation
1.The first step in model building consists of observing the real system and the interactions among its various components and collecting data on its behavior.
2.The second step in model building is the construction of a conceptual model – a collection of assumptions on the components and the structure of the system, plus hypotheses on the values of model input parameters, illustrated by the above figure.
3.The third step is the translation of the operational model into a computer recognizable form- the computerized model.
Model building, verification and validation is not a linear process. Will return to each many step while building, verification and validation of model.
AI is thinking...
8. Describe the process of calibration and validation in detail with example.
Validation is concerned with building the right model. It is utilized to determine that a model is an accurate representation of the real system. It is usually achieved through the calibration of the model.
Calibration means to validate the model with the real system, look out for the places for betterment of the models and revising the model to form next better model repeatedly until a satisfiable model is not achieved. The initial model is developed and is calibrated using Naylor-Finger calibration steps with the real system. It is then revised and a first revision model is generated. The first revision model is then calibrated with the real system. It is revised to form a second revision model. This process is continued until the model becomes acceptable.
Naylor and Finger formulated a three step approach:-
1. Build a model that has high face validity.
2. Validate model assumptions.
3. Compare the model input-output transformations to corresponding input-output transformations for the real system.
The following figure shows the relationship of the model calibration to the overall validation process.
The comparison of the model to reality is carried out by verity of test. Some test are subjective and other are objective.
- Subjective test usually involve people, who are knowledgeable about one or more aspects of the system, making judgments about the model and its output.
- Objective test always require data on the system's behavior plus the corresponding data produced by the model.
AI is thinking...
8. Explain with example of calibration and validation of model.
Validation is concerned with building the right model. It is utilized to determine that a model is an accurate representation of the real system. It is usually achieved through the calibration of the model.
Calibration means to validate the model with the real system, look out for the places for betterment of the models and revising the model to form next better model repeatedly until a satisfiable model is not achieved. The initial model is developed and is calibrated using Naylor-Finger calibration steps with the real system. It is then revised and a first revision model is generated. The first revision model is then calibrated with the real system. It is revised to form a second revision model. This process is continued until the model becomes acceptable.
Naylor and Finger formulated a three step approach:-
1. Build a model that has high face validity.
2. Validate model assumptions.
3. Compare the model input-output transformations to corresponding input-output transformations for the real system.
The following figure shows the relationship of the model calibration to the overall validation process.
The comparison of the model to reality is carried out by verity of test. Some test are subjective and other are objective.
- Subjective test usually involve people, who are knowledgeable about one or more aspects of the system, making judgments about the model and its output.
- Objective test always require data on the system's behavior plus the corresponding data produced by the model.
AI is thinking...
8. Describe the process of model building, verification and validation in detail with example.
Verification is concerned with building the model right. It is utilized in comparison of the conceptual model to the computer representation that implements that conception.
Validation is concerned with building the right model. It is utilized to determine that a model is an accurate representation of the real system. It is usually achieved through the calibration of the model.
Fig: Model building, verification and validation
1.The first step in model building consists of observing the real system and the interactions among its various components and collecting data on its behavior.
2.The second step in model building is the construction of a conceptual model – a collection of assumptions on the components and the structure of the system, plus hypotheses on the values of model input parameters, illustrated by the above figure.
3.The third step is the translation of the operational model into a computer recognizable form- the computerized model.
Model building, verification and validation is not a linear process. Will return to each many step while building, verification and validation of model.
AI is thinking...
8. Describe the process of calibration and validation in detail.
Validation is concerned with building the right model. It is utilized to determine that a model is an accurate representation of the real system. It is usually achieved through the calibration of the model.
Calibration means to validate the model with the real system, look out for the places for betterment of the models and revising the model to form next better model repeatedly until a satisfiable model is not achieved. The initial model is developed and is calibrated using Naylor-Finger calibration steps with the real system. It is then revised and a first revision model is generated. The first revision model is then calibrated with the real system. It is revised to form a second revision model. This process is continued until the model becomes acceptable.
Naylor and Finger formulated a three step approach:-
1. Build a model that has high face validity.
2. Validate model assumptions.
3. Compare the model input-output transformations to corresponding input-output transformations for the real system.
The following figure shows the relationship of the model calibration to the overall validation process.
The comparison of the model to reality is carried out by verity of test. Some test are subjective and other are objective.
- Subjective test usually involve people, who are knowledgeable about one or more aspects of the system, making judgments about the model and its output.
- Objective test always require data on the system's behavior plus the corresponding data produced by the model.
AI is thinking...
8. What do you mean by calibration and validation?
Validation is concerned with building the right model. It is utilized to determine that a model is an accurate representation of the real system. It is usually achieved through the calibration of the model.
Calibration means to validate the model with the real system, look out for the places for betterment of the models and revising the model to form next better model repeatedly until a satisfiable model is not achieved. The initial model is developed and is calibrated using Naylor-Finger calibration steps with the real system. It is then revised and a first revision model is generated. The first revision model is then calibrated with the real system. It is revised to form a second revision model. This process is continued until the model becomes acceptable.
Naylor and Finger formulated a three step approach:-
1. Build a model that has high face validity.
2. Validate model assumptions.
3. Compare the model input-output transformations to corresponding input-output transformations for the real system.
The following figure shows the relationship of the model calibration to the overall validation process.
The comparison of the model to reality is carried out by verity of test. Some test are subjective and other are objective.
- Subjective test usually involve people, who are knowledgeable about one or more aspects of the system, making judgments about the model and its output.
- Objective test always require data on the system's behavior plus the corresponding data produced by the model.
AI is thinking...
8. What do you mean by calibration and validation of models?
Validation is concerned with building the right model. It is utilized to determine that a model is an accurate representation of the real system. It is usually achieved through the calibration of the model.
Calibration means to validate the model with the real system, look out for the places for betterment of the models and revising the model to form next better model repeatedly until a satisfiable model is not achieved. The initial model is developed and is calibrated using Naylor-Finger calibration steps with the real system. It is then revised and a first revision model is generated. The first revision model is then calibrated with the real system. It is revised to form a second revision model. This process is continued until the model becomes acceptable.
Naylor and Finger formulated a three step approach:-
1. Build a model that has high face validity.
2. Validate model assumptions.
3. Compare the model input-output transformations to corresponding input-output transformations for the real system.
The following figure shows the relationship of the model calibration to the overall validation process.
The comparison of the model to reality is carried out by verity of test. Some test are subjective and other are objective.
- Subjective test usually involve people, who are knowledgeable about one or more aspects of the system, making judgments about the model and its output.
- Objective test always require data on the system's behavior plus the corresponding data produced by the model.
AI is thinking...
8. Describe the process of model building, verification and validation in detail.
Verification is concerned with building the model right. It is utilized in comparison of the conceptual model to the computer representation that implements that conception.
Validation is concerned with building the right model. It is utilized to determine that a model is an accurate representation of the real system. It is usually achieved through the calibration of the model.
Fig: Model building, verification and validation
1.The first step in model building consists of observing the real system and the interactions among its various components and collecting data on its behavior.
2.The second step in model building is the construction of a conceptual model – a collection of assumptions on the components and the structure of the system, plus hypotheses on the values of model input parameters, illustrated by the above figure.
3.The third step is the translation of the operational model into a computer recognizable form- the computerized model.
Model building, verification and validation is not a linear process. Will return to each many step while building, verification and validation of model.
AI is thinking...
8. Explain the three step approach of validation of models in simulation
Naylor and Finger proposed three step approach for validation process. These steps are as follows:
1. Face Validity
2. Validate Model Assumptions
3. Input - Output Transformation
1. Face validity
- A model should appear reasonable on its face to model users and to those who knows about the real system that is being simulated.
- A model should be designed with high degree of realism regarding system structure and behaviour through reliable data.
- The potential users should also be involved in the validation process to aid in identification of model deficiencies and optimizing those deficiencies to produce better model. This process is termed as structural walkthrough.
- Sensitivity analysis is also used for face validity of the model. It analyses the effect on output when there is change in input parameters. Sensitivity analysis is done through appropriate statistical techniques.
2. Model Assumptions
Model assumptions fall into two categories: structural assumptions and data assumptions.
- Structural assumptions involve questions of how the system operates and usually involve simplification and abstractions of reality.
- Data assumptions should be based on the collection of reliable data and correct statistical analysis of the data. It deals with such questions as what kind of input data model is? What are the parameter values to the input data model?
3. Input-Output Transformations:
- It involves validating whether the model can predict the future behaviour of the real system when the model input data match the real inputs and when a policy implemented in the model is implemented at some point in the system.
- In this validation phase, the model accepts values of the input parameters and transforms them into output measures of performance.
- The modeler uses the historical data reserved for validation purposes only.
- For the complete input-output validation, at least one set of input conditions should be collected from the system data so as to compare to model prediction.
AI is thinking...
9. Why do we use verification and validation in simulation?
Verification
- Verification is concerned with building the model right.
- It is performed by comparing the conceptual model to the computerized simulation implementation.
- It tests whether the given model is implemented correctly in the simulation software.
Validation
- Validation is concerned with building the right model.
- It is performed by calibration of the model.
- Calibration is the iterative process of comparing the model to the actual system behaviour.
- It attempts to confirm that a model represents the real system accurately.
Verification and validation is used in simulation:
- To produce a model that represents true system behavior closely enough for the model to be used as a substitute for the actual system for the purpose of experimenting with system.
- To increase an acceptable, level the credibility of the model, so that the model will be used by managers and other decision makers.
AI is thinking...
7. Differentiate between validation and calibration. How can we perform validation of model?
Validation is a process of comparing the model and its behavior to the real system and its behavior. Calibration is the iterative process of comparing the model with real system, revising the model if necessary, comparing again, until a model is accepted (validated).
Naylor and Finger proposed three step approach for validation of model. These steps are as follows:
1. Face validity
- A model should appear reasonable on its face to model users and to those who knows about the real system that is being simulated.
- A model should be designed with high degree of realism regarding system structure and behaviour through reliable data.
- The potential users should also be involved in the validation process to aid in identification of model deficiencies and optimizing those deficiencies to produce better model. This process is termed as structural walkthrough.
- Sensitivity analysis is also used for face validity of the model. It analyses the effect on output when there is change in input parameters. Sensitivity analysis is done through appropriate statistical techniques.
2. Model Assumptions
Model assumptions fall into two categories: structural assumptions and data assumptions.
- Structural assumptions involve questions of how the system operates and usually involve simplification and abstractions of reality.
- Data assumptions should be based on the collection of reliable data and correct statistical analysis of the data. It deals with such questions as what kind of input data model is? What are the parameter values to the input data model?
3. Input-Output Transformations
- It involves validating whether the model can predict the future behaviour of the real system when the model input data match the real inputs and when a policy implemented in the model is implemented at some point in the system.
- In this validation phase, the model accepts values of the input parameters and transforms them into output measures of performance.
- The modeler uses the historical data reserved for validation purposes only.
- For the complete input-output validation, at least one set of input conditions should be collected from the system data so as to compare to model prediction.
AI is thinking...
11. Explain the iterative process of calibrating a model.
Iterative calibration means to validate the model with the real system, look out for the places for betterment of the models and revising the model to form next better model repeatedly until a satisfiable model is not achieved. The initial model is developed and is calibrated using Naylor-Finger calibration steps with the real system. It is then revised and a first revision model is generated. The first revision model is then calibrated with the real system. It is revised to form a second revision model. This process is continued until the model becomes acceptable.
Naylor and Finger formulated a three step approach:-
1. Build a model that has high face validity.
2. Validate model assumptions.
3. Compare the model input-output transformations to corresponding input-output transformations for the real system.
The following figure shows the relationship of the model calibration to the overall validation process.
The comparison of the model to reality is carried out by verity of test. Some test are subjective and other are objective.
- Subjective test usually involve people, who are knowledgeable about one or more aspects of the system, making judgments about the model and its output.
- Objective test always require data on the system's behavior plus the corresponding data produced by the model.
AI is thinking...
12. Explain with example verification of simulation models.
Verification is the process of determining that a model implementation and its associated data accurately represent the developer's conceptual description and specifications. Verification answers the question "Have we built the model right?". The verification focuses on comparing the elements of a simulation model of the system with the description of what the requirements and capabilities of the model were to be. Verification is an iterative process aimed at determining whether the product of each step in the development of the simulation model fulfills all the requirements levied on it by the previous step and is internally complete, consistent, and correct enough to support the next phase.
Example:
Let us say that you are developing a cell phone to be launched in the market. You conducted the market research and then collected the numbers of functionalities to be included in the cell phone. Then you design the procedures to be used to build the product and specify the quality requirements for it. Now the production process has been started. To make sure that everything is going according to plan, you perform the inspection activities to the process, then, you would say that product has been verified and is being developed as you planned for it.
AI is thinking...
1. Why do we perform the analysis of simulation output? Explain how do you use simulation run statistics in the output analysis. [4+6]
Example:
Consider a system with Kendall’s notation M/M/1/FIFO (i.e. a single server system in which the inter-arrival time is distributed exponentially ;and service time has an exponential and queue discipline is FIFO) and the objective is to measure the mean waiting time.
In simulation run approach, the mean waiting time is estimated by accumulating the waiting time of n successive entities and then it is divided by n. This measures the sample mean such that:
Whenever a waiting line forms, the waiting time of each entity on the line clearly depends upon the waiting time of its predecessors. Such series of data in which one value affect other values is said to be autocorrelated. The sample mean of autocorrelated data can be shown to approximate a normal distribution as the sample size increases.
A simulation run is started with the system in some initial state, frequently the idle state, in which no service is being given and no entities are waiting. The early arrivals then have a more than normal probability of obtaining service quickly, so a sample mean that includes the early arrivals will be biased.
AI is thinking...
5. How do you use estimation method in the analysis of simulation output? Explain in brief.
AI is thinking...
7. Define confidence interval. How do you use estimation method in simulation output analysis? Explain.
The confidence interval is the range of possible values for the parameter based on a set of data (e.g. the simulation results.) Confidence intervals are based on the premise that the data being produced by the simulation is represented well by a probability model.
AI is thinking...
7. Define confidence interval and I.I.D in output analysis. How do you use simulation run statistics in simulation output analysis? Explain.
Example:
Consider a system with Kendall’s notation M/M/1/FIFO (i.e. a single server system in which the inter-arrival time is distributed exponentially ;and service time has an exponential and queue discipline is FIFO) and the objective is to measure the mean waiting time.
In simulation run approach, the mean waiting time is estimated by accumulating the waiting time of n successive entities and then it is divided by n. This measures the sample mean such that:
Whenever a waiting line forms, the waiting time of each entity on the line clearly depends upon the waiting time of its predecessors. Such series of data in which one value affect other values is said to be autocorrelated. The sample mean of autocorrelated data can be shown to approximate a normal distribution as the sample size increases.
A simulation run is started with the system in some initial state, frequently the idle state, in which no service is being given and no entities are waiting. The early arrivals then have a more than normal probability of obtaining service quickly, so a sample mean that includes the early arrivals will be biased.
AI is thinking...
9. How do you eliminate the effect of transient and initial bias in simulation output?
There are two general approaches that can be used to remove the initial bias:
1. The system can be started in more representative states rather than in the empty state.
2. The first part of the simulation run can be ignored.
In the first approach, it is necessary to know the steady-state distinction for the system and we then select the initial state distinction. In the study of simulation, particularly the existing system, there may be information available on the expected condition which makes it feasible to select a better initial condition and thus eliminating the initial bias.
The second approach that is used to remove the initial bias is the most common approach. In this method, the initial section of the run which has a high bias (simulation) result is eliminated.
First, the run is started from an idle state and stopped after certain period of time (The time at which the bias is satisfactory). The entities existing in the system at that are left as they are and this point is the point of a restart for other repeating simulation runs. Then the run is restarted with statistics being gathered from the point of the restart.
AI is thinking...
9. Explain the replication of runs.
Replication of runs
This approach is used to obtain independent results by repeating the simulation. Repeating the experiment with different random numbers for the same sample size n gives a set of independent determinations of the sample mean .The mean of the means and the mean of the variances are then used to estimate the confidence interval.
Suppose the experiment is repeated p times with independent random values of n sample sizes. Let xij be the ith observation in jth run and let the sample mean and the variance for the jth run is denoted by and
respectively. Then for jth run, the estimates are
Combining the result of p independent measurement gives the following estimate for the mean and variance s2 of the populations as:
AI is thinking...
9. When is estimation method appropriate? Explain.
AI is thinking...
11. Why do we need the analysis of simulation output? How do you use simulation run statistics in output analysis? Explain.
Example:
Consider a system with Kendall’s notation M/M/1/FIFO (i.e. a single server system in which the inter-arrival time is distributed exponentially ;and service time has an exponential and queue discipline is FIFO) and the objective is to measure the mean waiting time.
In simulation run approach, the mean waiting time is estimated by accumulating the waiting time of n successive entities and then it is divided by n. This measures the sample mean such that:
Whenever a waiting line forms, the waiting time of each entity on the line clearly depends upon the waiting time of its predecessors. Such series of data in which one value affect other values is said to be autocorrelated. The sample mean of autocorrelated data can be shown to approximate a normal distribution as the sample size increases.
A simulation run is started with the system in some initial state, frequently the idle state, in which no service is being given and no entities are waiting. The early arrivals then have a more than normal probability of obtaining service quickly, so a sample mean that includes the early arrivals will be biased.
AI is thinking...
9. What do you understand by replication of runs. Why is it necessary?
Replication of run is used to obtain independent results by repeating the simulation. Repeating the experiment with different random numbers for the same sample size n gives a set of independent determinations of the sample mean .The mean of the means and the mean of the variances are then used to estimate the confidence interval.
Suppose the experiment is repeated p times with independent random values of n sample sizes. Let xij be the ith observation in jth run and let the sample mean and the variance for the jth run is denoted by and
respectively. Then for jth run, the estimates are
Combining the result of p independent measurement gives the following estimate for the mean and variance s2 of the populations as:
Replication of runs are necessary for running experiments based on scenarios with stochastic parameters. It is used to obtain independent results by repeating the simulation. If replications are not used, a single run of an experiment will not produce statistically significant results and will not allow for proper calculation of statistical data.
AI is thinking...
10. Why Confidence interval is needed in the analysis of simulation output. How can we can
we establish a confidence interval?
The confidence interval is the range of possible values for the parameter based on a set of data (e.g. the simulation results.). Confidence interval is needed because:
- A confidence interval displays the probability that a parameter will fall between a pair of values around the mean.
- Confidence intervals measure the degree of uncertainty or certainty in a sampling method.
Confidence intervals are based on the premise that the data being produced by the simulation is represented well by a probability model. Suppose the model is the normally distributed with mean , Variance
and we have a sample of n size then the confidence interval is given by:
In practice, the population variance is usually not known; in this case variance is replaced by the estimate calculated by the formula
This has a student t-distribution, with n – 1 degree of freedom. In terms of estimated variance S2, the confidence interval for is defined by
Here, the quantity is found on the student t-distribution table.
Example:
Suppose, the daily production time of a product in a factory for 120 days is 5.8 hours and sample standard deviation (S) is 1.6.
Now, confidence interval for 95% confidence level is calculated as;
[t119, 0.025 = 1.98]
Hence, the estimates between can be accepted for 95% confidence interval.
AI is thinking...
11. Why do we need the analysis of simulation output? How do you use estimation method in output analysis? Explain.
AI is thinking...
13. Write short note on:
a. Replication
of Runs
b. Simulation
tools
a. Replication of runs
This approach is used to obtain independent results by repeating the simulation. Repeating the experiment with different random numbers for the same sample size n gives a set of independent determinations of the sample mean .The mean of the means and the mean of the variances are then used to estimate the confidence interval.
Suppose the experiment is repeated p times with independent random values of n sample sizes. Let xij be the ith observation in jth run and let the sample mean and the variance for the jth run is denoted by and
respectively. Then for jth run, the estimates are
Combining the result of p independent measurement gives the following estimate for the mean and variance s2 of the populations as:
b. Simulation tools
Simulation tool is a software which is used for simulating hardware, software and network. It is a type of software based on the process of modeling a real world phenomenon with mathematical formula. This program allows the user to observe the operation without actually performing that operation . Its main importance is: how it actually supports the model building.
The tools commonly used for simulation are:
1. CPU network simulation (Queueing network, Petri net simulators)
2. Processor simulation
3. Memory simulation
4. ALU simulation
5. Logic network simulation
AI is thinking...
3. Consider that a machine tool in a manufacturing shop is turning out parts at the rate of one every 5 minutes. As they are finished, the parts go to an inspector, who takes 4±3 minutes to examine each one and rejects 10% of the parts. Now, develop a block diagram and write the code for simulating the above problem using GPSS, and also explain the function of each block used in the block diagram in detail. [3+3+4]
The block diagram for given problem using GPSS is given below:
A GENERATE block is used to represent the output of the machine by creating one transaction every five units of time. A QUEUE block places the transaction in the queue and SEIZE block allows a transaction to engage a facility if it is available. If more than one inspector is available, the transaction leaves the queue which is denoted by DEPART block and enters into ADVANCE block. An ADVANCE block with a mean of 4 and modifier of 3 is used to represent inspection. The time spent on inspection will therefore be any one of the values 1, 2, 3, 4, 5, 6 or 7, with equal probability given to each value. Upon completion of the inspection, RELEASE block allows a transaction to disengage the facility and transaction go to a TRANSFER block with a selection factor of 0.1, so that 90 % of the parts go to the next location called ACC, to represent accepted parts and 10 % go to another location called REJ to represent rejects. Both locations reached from the TRANSFER block are TERMINATE blocks.
Now,
Code for simulating the given problem using GPSS:
GENERATE 5, 0
QUEUE 1
SEIZE 1
DEPART 1
ADVANCE 4, 3
RELEASE 1
TRANSFER 0.1 ACC REJ
ACC TERMINATE 1
REJ TERMINATE 1
AI is thinking...
3. Why is GPSS called transaction flow oriented language? A machine tool in a manufacturing shop is turning out parts at the rate of every 5 minutes. When they are finished, the parts are sent to an inspector, who takes 4±3 minutes to examine each one and rejects 15% of the parts. Draw and explain a block diagram and write a GPSS program to simulate using the concept of facility.
GPSS (General Purpose Simulation System) is a highly structured and special purpose simulation language based on process interaction approach and oriented toward queuing systems. The system being simulated is described by the block diagram using various GPSS blocks. Each block represents events, delays or other actions that affect the transaction flow. Therefore GPPS is called transaction flow oriented language.
The block diagram for given problem using GPSS is given below:
A GENERATE block is used to represent the output of the machine by creating one transaction every five units of time. A QUEUE block places the transaction in the queue and SEIZE block allows a transaction to engage a facility if it is available. If more than one inspector is available, the transaction leaves the queue which is denoted by DEPART block and enters into ADVANCE block. An ADVANCE block with a mean of 4 and modifier of 3 is used to represent inspection. The time spent on inspection will therefore be any one of the values 1, 2, 3, 4, 5, 6 or 7, with equal probability given to each value. Upon completion of the inspection, RELEASE block allows a transaction to disengage the facility and transaction go to a TRANSFER block with a selection factor of 0.15, so that 85 % of the parts go to the next location called ACC, to represent accepted parts and 15 % go to another location called REJ to represent rejects. Both locations reached from the TRANSFER block are TERMINATE blocks.
Now,
Code for simulating the given problem using GPSS:
GENERATE 5, 0
QUEUE 1
SEIZE 1
DEPART 1
ADVANCE 4, 3
RELEASE 1
TRANSFER 0.15 ACC REJ
ACC TERMINATE 1
REJ TERMINATE 1
AI is thinking...
3. Why is GPSS called transaction flow oriented language? A machine tool in a manufacturing shop is turning out parts at the rate of every 5 minutes. When they are finished, the parts are sent to an inspector, who takes 4±3 minutes to examine each one and rejects 20% of the parts. Draw and explain a block diagram for it and write a GPSS program to simulate using the concept of FACILITY.
GPSS (General Purpose Simulation System) is a highly structured and special purpose simulation language based on process interaction approach and oriented toward queuing systems. The system being simulated is described by the block diagram using various GPSS blocks. Each block represents events, delays or other actions that affect the transaction flow. Therefore GPPS is called transaction flow oriented language.
The block diagram for given problem using GPSS is given below:
A GENERATE block is used to represent the output of the machine by creating one transaction every five units of time. A QUEUE block places the transaction in the queue and SEIZE block allows a transaction to engage a facility if it is available. If more than one inspector is available, the transaction leaves the queue which is denoted by DEPART block and enters into ADVANCE block. An ADVANCE block with a mean of 4 and modifier of 3 is used to represent inspection. The time spent on inspection will therefore be any one of the values 1, 2, 3, 4, 5, 6 or 7, with equal probability given to each value. Upon completion of the inspection, RELEASE block allows a transaction to disengage the facility and transaction go to a TRANSFER block with a selection factor of 0.2, so that 80 % of the parts go to the next location called ACC, to represent accepted parts and 20 % go to another location called REJ to represent rejects. Both locations reached from the TRANSFER block are TERMINATE blocks.
Now,
Code for simulating the given problem using GPSS:
GENERATE 5, 0
QUEUE 1
SEIZE 1
DEPART 1
ADVANCE 4, 3
RELEASE 1
TRANSFER 0.2 ACC REJ
ACC TERMINATE 1
REJ TERMINATE 1
AI is thinking...
6. Explain any four program control statements that are used in GPSS.
GPSS (General Purpose Simulation System) is a highly structured and special purpose simulation language based on process interaction approach and oriented toward queuing systems.
- The system being simulated is described by the block diagram using various GPSS blocks.
- Each block represents events, delays or other actions that affect the transaction flow.
- GPSS model is developed by converting the block diagram into block statements and adding the control statements.
Any four Program control statements that are used in GPSS are:
1. CLEAR: A CLEAR Command returns the simulation to the unused state.
CLEAR A
Operand:
A - ON or OFF. If the A Operand is omitted, ON is assumed. Optional. The operand must be ON, OFF or Null.
2. END: The END Control Statement has been replaced by EXIT, which can terminate a Session. END is now a keyword in the PLUS Language.
3. RESET: A RESET Command marks the beginning of a measurement period.
RESET
Operands: None.
4. START: A START Command begins a simulation.
START A,B,C,D
Operands:
A - Termination count. Required. The operand must be PosInteger.
B - Printout operand. NP for “no printout”. Default is to print a standard report. Optional. The operand must be NP or Null.
C - Not used. Kept for compatibility with older dialects of GPSS.
D - Chain printout. 1 to include the CEC and FEC in the standard report. Optional. The operand must be Null, or PosInteger.
AI is thinking...
9. Draw and describe the different types of GPSS blocks that are used to gather statistics?
GPSS (General Purpose Simulation System) is a highly structured and special purpose simulation language based on process interaction approach and oriented toward queuing systems.
- The system being simulated is described by the block diagram using various GPSS blocks.
- Each block represents events, delays or other actions that affect the transaction flow.
The general blocks used in GPSS are given below:
GENERATE BLOCK:
This block will produce a flow of transactions with inter-arrival times determined by the attribute values. The distribution of inter-arrival times follows a uniform probability distribution.
SYNTAX: GENERATE A,B,C,D,E
ATTRIBUTES: A = average value of uniform distribution, B = half-width of uniform distribution, C = time delay before first transaction is generated, D = maximum number of transactions generated, E = priority allocated to transactions
QUEUE BLOCK:
This block will instruct GPSS to start gathering queuing statistics on the queue named in its attribute value.
SYNTAX: QUEUE A
ATTRIBUTES: A = name of queue (for example: garage)
DEPART BLOCK:
This block instructs GPSS that a transaction is leaving the queue named in it‟s attribute value. This is necessary in order to compile the statistics on the queue.
SYNTAX: DEPART A
ATTRIBUTES: A = name of the queue (for example: checkout)
SEIZE BLOCK:
This blocks allows the transaction to seize a facility if it is free.
SYNTAX: SIZE A
ATTRIBUTES: A = name of facility (for example: pump)
RELEASE BLOCK:
A transaction entering this block informs GPSS that it is giving up ownership of the facility named in its attribute value.
SYNTAX: RELEASE A
ATTRIBUTES: A = name of facility (for example: runaway)
ADVANCE BLOCK:
This block represents the servicing of a transaction. The servicing times follow a uniform probability distribution.
SYNTAX: ADVANCE A,B
ATTRIBUTES: A = average value of uniform distribution, B = half-width of uniform distribution
TERMINATE BLOCK:
This block destroys any transaction entering it and removes it from computer memory. Each time a transaction enters this block it decrements a counter by an amount equal to its attribute value. The counter is set by the user upon starting the simulation.
SYNTAX: TERMINATE A
ATTRIBUTES: A = decrements simulation counter by this amount
etc.
AI is thinking...
9. Draw and describe different types of GPSS blocks that are used to deal with queues?
GPSS (General Purpose Simulation System) is a highly structured and special purpose simulation language based on process interaction approach and oriented toward queuing systems.
- The system being simulated is described by the block diagram using various GPSS blocks.
- Each block represents events, delays or other actions that affect the transaction flow.
The two main blocks that are used with queues are QUEUE and DEPART.
QUEUE BLOCK:
This block will instruct GPSS to start gathering queuing statistics on the queue named in its attribute value. SYNTAX: QUEUE A
ATTRIBUTES: A = name of queue (for example: garage)
DEPART BLOCK:
This block instructs GPSS that a transaction is leaving the queue named in it‟s attribute value. This is necessary in order to compile the statistics on the queue.
SYNTAX: DEPART A
ATTRIBUTES: A = name of the queue (for example: checkout)
Some other blocks that are used with above blocks are:
GENERATE BLOCK:
This block will produce a flow of transactions with inter-arrival times determined by the attribute values. The distribution of inter-arrival times follows a uniform probability distribution.
SYNTAX: GENERATE A,B,C,D,E
ATTRIBUTES: A = average value of uniform distribution, B = half-width of uniform distribution, C = time delay before first transaction is generated, D = maximum number of transactions generated, E = priority allocated to transactions
ADVANCE BLOCK:
This block represents the servicing of a transaction. The servicing times follow a uniform probability distribution.
SYNTAX: ADVANCE A,B
ATTRIBUTES: A = average value of uniform distribution, B = half-width of uniform distribution
TERMINATE BLOCK:
This block destroys any transaction entering it and removes it from computer memory. Each time a transaction enters this block it decrements a counter by an amount equal to its attribute value. The counter is set by the user upon starting the simulation.
SYNTAX: TERMINATE A
ATTRIBUTES: A = decrements simulation counter by this amount
etc.
AI is thinking...
10. Describe different types of statements, used in CSMP, with suitable examples.
CSMP or Continuous System Modelling Program is an early scientific computer software designed for modelling and solving differential equations numerically. This enables real-world systems to be simulated and tested with a computer.
Types of statements in CSMP
1. Structural statements which defines the model. They consist of FORTARN like statement and functional block designed for operations that frequently occur in a model definition. Structural statement can make use of the operation of addition, subtraction, multiplication, division and exponentiation, using the same notation and rule as are used in FORTRAN. If the model include the equation .Then the following statement would be used
X=6.0*Y/W+(Z-2)**2.0
2. Data statements which assign numerical value to parameters, constant and initial conditions. For example one data statement called INCON can be used to set the initial value of integration function block.
3. Control statements which specify options in the assembly and execution of program and choice of inputs. For e.g. If printed output is required, control statements with PRINT and PRDEL are used followed by the names of variables to form the outputs.
AI is thinking...
10. Explain the data and control statement in CSMP.
CSMP or Continuous System Modelling Program is an early scientific computer software designed for modelling and solving differential equations numerically. This enables real-world systems to be simulated and tested with a computer.
1. Data statements which assign numerical value to parameters, constant and initial conditions. For example one data statement called INCON can be used to set the initial value of integration function block.
2. Control statements which specify options in the assembly and execution of program and choice of inputs. For e.g. If printed output is required, control statements with PRINT and PRDEL are used followed by the names of variables to form the outputs.
Example program in CSMP
TITILE AUTOMOBILE SUSPENSION SYSTEM
*
PARAM D=(5.656,16.968,39.592,56.56) //initial
*
X2DOT=(1.0/M)*(K*F-K*X-D*XDOT)
XDOT=INTGRL(0.0,X2DOT) //dynamic
X=INTGRL(0.0,XDOT)
*
CONST M=2.0,F=1.0,K=400.0
TIMER DELT=0.005,FINTIM=1.5, PRDEL=0.05 //terminal
PRINT X, XDOT, X2DOT
END
STOP
AI is thinking...
11. What do you mean by simulation tool?
Simulation tool is a software which is used for simulating hardware, software and network. It is a type of software based on the process of modeling a real world phenomenon with mathematical formula. This program allows the user to observe the operation without actually performing that operation . Its main importance is: how it actually supports the model building.
The tools commonly used for simulation are:
1. CPU network simulation (Queueing network, Petri net simulators)
2. Processor simulation
3. Memory simulation
4. ALU simulation
5. Logic network simulation
AI is thinking...
11. What is absolute clock and relative clock time in GPSS? How do you update the clock time in simulation? Explain.
Absolute clock measures the simulated time that has elapsed since the simulation began.
Relative clock tells how much simulated time has elapsed since a RESET statement was most recently executed. The relative clock has no special meaning unless one or more RESET run-control statements are used in the model file.
When there are no RESET statements in a model file, the RELATIVE and ABSOLUTE CLOCKS have identical values.
Clock time is updated based on the following two models:
1. Fixed time-step model
In this the timer simulated by the computer is updated at a fixed time interval. The system is checked to see if any event has taken place during that interval. All the events which take place during the time interval are considered to have occurred simultaneously at the end of the interval.
2. Event-to-event model
It is also known as the next-event model. In this the computer advances the time to the occurrence of the next event. So it shifts from one event to the next event and the system state does not change in between. A track of the current time is kept when something interesting happens to the system.
The flowcharts for both models is shown below.
AI is thinking...
12. Write short note on:
a) GPSS
b) Server
Utilization
a. GPSS
- GPSS (General Purpose Simulation System) is a highly structured and special purpose simulation language based on process interaction approach and oriented toward queuing systems.
- The system being simulated is described by the block diagram using various GPSS blocks.
- Each block represents events, delays or other actions that affect the transaction flow.
- GPSS model is developed by converting the block diagram into block statements and adding the control statements.
The general blocks used in GPSS block diagram is shown in figure below:
b. Server Utilization
Server/System utilization is the percentage of the time that all servers are busy. System utilization factor (ρ ) is the ratio of average arrival rate (λ) to the average service rate (μ).
ρ = λ/μ in the case of a single server model
ρ = λ/μn in the case of a “n” server model
The system utilization can be increased by increasing the arrival rate which amounts to increasing the average queue length as well as the average waiting time, as shown in fig below. Under the normal circumstances 100% system utilization is not a realistic goal.
AI is thinking...
11. Create a GPSS model and program to simulate a barber shop for a day (9am to 4pm),
where a costumer enters the Shop every 10 ± 2 minutes and a barber takes 13 ± 2 for a
haircut.
GPSS model to simulate a barber shop
Program
GENERATE 10,2
QUEUE SEAT
SEIZE BARBER
DEPART SEAT
ADVANCE 15,3
RELEASE BARBER
TERMINATE
TIMER GENERATE 420
TERMINATE 1
AI is thinking...
12. Explain GPSS with example.
GPSS (General Purpose Simulation System) is a highly structured and special purpose simulation language based on process interaction approach and oriented toward queuing systems.
- The system being simulated is described by the block diagram using various GPSS blocks.
- Each block represents events, delays or other actions that affect the transaction flow.
- GPSS model is developed by converting the block diagram into block statements and adding the control statements.
The general blocks used in GPSS block diagram is shown in figure below:
Example:
Fig: Manufacturing shop model
AI is thinking...
13. Define CSMP. Describe different types of statements in CSMP with example.
CSMP or Continuous System Modelling Program is an early scientific computer software designed for modelling and solving differential equations numerically. This enables real-world systems to be simulated and tested with a computer.
Types of statements in CSMP
1. Structural statements which defines the model. They consist of FORTARN like statement and functional block designed for operations that frequently occur in a model definition. Structural statement can make use of the operation of addition, subtraction, multiplication, division and exponentiation, using the same notation and rule as are used in FORTRAN. If the model include the equation .Then the following statement would be used
X=6.0*Y/W+(Z-2)**2.0
2. Data statements which assign numerical value to parameters, constant and initial conditions. For example one data statement called INCON can be used to set the initial value of integration function block.
3. Control statements which specify options in the assembly and execution of program and choice of inputs. For e.g. If printed output is required, control statements with PRINT and PRDEL are used followed by the names of variables to form the outputs.
AI is thinking...
11. Parts are being made at the rate of one every 10 minutes. They are of two types, A and B. And are mixed randomly with about 10% being type B. A separate inspector is assigned to examine each part. Inspection of part A takes 6±2 minutes while B takes 10±2 minutes. Both inspector rejects 10% of parts they inspect. Draw GPSS block diagram to simulate the the above problem for 100 parts.
The block diagram for given problem using GPSS is given below:
Code for simulating the given problem using GPSS:
GENERATE 10, 0
TRANSFER 0.1 A B
A ADVANCE 6, 2
B ADVANCE 10, 2
A TRANSFER 0.1 ACC REJ
B TRANSFER 0.1 ACC REJ
A ACC TERMINATE 1
REJ TERMINATE 1
B ACC TERMINATE 1
REJ TERMINATE 1
START 100
AI is thinking...