Dr. Saad A. Ayoob: University of Mosul College of Engineering Electrical Engineering Department

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

University of Mosul

College of Engineering
Electrical Engineering Department

Dr. Saad A. Ayoob

Email: sa_ah_ay@yahoo.com
❖ Types of Simulation Models

❖ Modeling Concepts

❖ Example of a simple system

❖ DES Model Development

❖ Three Model Levels

❖ Round Robin Scheduling Algorithm (RRSA)


Types of Simulation Models
Types of Simulation Models
❑ Stochastic simulation: a simulation that contains random (probabilistic) elements, e.g.

➢ Examples:
• Inter-arrival time or service time of customers at a bank or store
• Amount of time required to service a customer
➢ Output is a random quantity (multiple runs required analyze output)

❑ Deterministic simulation: a simulation containing no random elements.

➢ Examples
• Simulation of a digital circuit
• Simulation of a chemical reaction based on differential equations
➢ Output is deterministic for a given set of inputs
Types of Simulation Models
❑Static models:

➢ Model where time is not a significant variable

➢ Examples:
▪ Determine the probability of a winning solitaire hand

➢ Static + stochastic = Monte Carlo simulation


▪ Statistical sampling to develop approximate solutions to numerical problems

❑Dynamic models:

Model focusing on the evolution of the system under investigation over time
Types of Simulation Models
❑ Discrete:

➢ State of the system is viewed as changing at discrete points in time


➢ An event is associated with each state transition
▪ Events contain time stamp

❑ Continuous:

➢ State of the system is viewed as changing continuously across time


➢ System typically described by a set of differential equations
Modeling Concepts

❖ General Terminology:

1. Entity: Object of interest in the system.


2. Attribute: Property of an entity.
3. Activity: A time period of specified length.
4. System state: Collection of variables required to describe the system at any time.
5. Event: An instantaneous occurrence that might change the state of the system.
6. Endogenous: Activities and Events occurring within the system.
7. Exogenous: Activities and Events in the environment (outside the system) that affect the
system.
Example of a simple system (Components of a System)
• Entity Router with two interfaces

• Attributes: {IF1, IF2}

• Activity:
Transmit IF1 -> IF2, 20μs
Transmit IF2 -> IF2, 15μs
Drop on IF1, 10μs
Drop on IF2, 10μs

• System state: S = {R1, T1, D1, Q1, R2, T2, D2, Q2}
Ri = Received packets on interface i
Ti = Transmitted packets on interface i
Di = Dropped packets at interface i
Qi = Queue length of interface I

• Events: Arrival of packet {IF, Time, Packet length}

❖ researchers and practitioners should be familiarized with at least one mathematical software (e.g.: Wiris, Maple,
Mathcad, Mathematica, Matlab, GNU Octave, etc.) and one statistical software (e.g.: Minitab, Excel, SPSS, R, S-Plus,
etc.).
System and System Environment
❑ System is a group of objects that are joined together in some regular interaction or interdependence
toward the accomplishment of some purpose.

❑ Example:
➢ Automobile factory
• Machines, parts, and workers operate jointly to produce a vehicle
➢ Computer network
• User, hosts, routers, lines establish a network

❑ System environment
➢ Everything outside the system, but affects the system.

❑ Attention
• It is important to decide on the boundary between the system and the system environment.
• This decision depends on the purpose of the study.
DES Model Development
❑ How to develop a model:

1) Determine the goals and objectives.


2) Build a conceptual model.
3) Convert into a specification model.
4) Convert into a computational model.
5) Verify.
6) Validate.

❑ Typically an iterative process


Three Model Levels
❑ Conceptual
• Very high level
• How comprehensive should the model be?
• What are the state variables, which are dynamic, and which are important?

❑Specification
o On paper
o May involve equations, pseudocode, etc.
o How will the model receive input?

❑Computational
▪ A computer program
▪ General-purpose or simulation language?
Round Robin Scheduling Algorithm (RRSA)
❑Round Robin Scheduling (RRS) is one of the simplest scheduling algorithms;
it assigns time slot to each process in equal portions and in a circular order,
and treats all processes without priority. It is successfully applied to data
packet scheduling in computer networks.

❑It can easily be proved that RRS results in max-min fairness if the data
packets are equally sized. This is related to the fact that the data flow which
has waited the longest time is given scheduling priority;

❑The next Figure shows an example of how to apply RRS by a Switch to select
in sequence four types (sets) of entities stored in First In First Out (FIFO)
buffers.
Example of Round Robin Scheduling (RRS) process
Results of Round Robin Scheduling (RRS) process
❑ When the switch selects an entity, it makes other entities unavailable, regardless of how
long it takes for an entity to arrive at the selected port. Figure (a) and Figure (b) show the
output of attribute scope for the cases of equal and unequal data rate of all entities.

Figure (a): The output of switch for equal data rate using (RRS).
Results of Round Robin Scheduling (RRS) process

Figure (b): The output of switch for unequal data rate using (RRS).

You might also like