Simulation To Be Cont'
Simulation To Be Cont'
>Implemented
recursively. >Produces an optimal solution. >Spends more time. Greedy algorithms – Make short-sighted, “best
guess” decisions – Required less time/work – Provide approximate solutions. optimization is the problem of
minimizing or maximizing a function subject to a number of constraints.
Examples of Optimization Problems (i). Minimize the number of trucks required to pick up garbage by finding
the most efficient route for each truck. (ii). City planners may need to decide where to build new fire stations
in order to efficiently serve their citizens. (iii). How to construct an investment portfolio that maximizes its
expected return while limiting volatility; (iv). how to build a resilient tele-communication network as cheaply
as possible; (v). how to schedule flights in a cost-effective way while meeting the demand for passengers; (vi).
or how to schedule final exams using as few classrooms as possible.
Bellman-Ford algorithm. A single-source shortest path algorithm that finds the shortest path from a given
source vertex to all other vertices in a graph. It starts with an assumption that the shortest distance to all
vertices from the source vertex is infinity. Through a series of iterations, it updates these distances by relaxing
the edges—finding shorter paths whenever possible, in what is known as relaxation.
1. Initialization: a)Set the distance of the source node to infinity. b)Set the distance to the source itself as 0.
c)Set the predecessor of all vertices to NULL. 2. Relaxation: a)For each vertex, apply relaxation for all its edges
as stated above. b)Repeat the relaxation process V-1 times, where V is the number of vertices in the graph.
Simulation Techniques for using computers to imitate the operations of various kinds of real-world facilities or
processes. A discrete system is one for which the state variables change instantaneously at separated points in
time. A continuous system is one for which the state variables change continuously with respect to time.
Modeling: Involves creating a mathematical representation (equations) that describes how the system works.
Simulation: Uses the mathematical model to predict how the system will behave in different situations.
Simulation: Advantages •Hypotheses about how or why a phenomenon occurs can be tested for feasibility •
Time can be compressed or expanded (Slow-down or Speed-up) • Insight can be obtained about the
interaction of variables • Bottleneck analysis can be performed to detect excessive delays • Simulation can
help to understand how the system operates rather than how people think the system operates • What if‖
questions can be answered • Policies, procedures, decision rules, information flows can be explored without
disrupting the real system. Simulation: Disadvantages; • Model building requires training • Simulation results
can be difficult to interpret • Simulation can be time consuming and expensive •Simulation packages contain
models that only need input data; •Simulation packages contain output-analysis capabilities.
A static simulation model is a representation of a system at a particular time, or one that may be used to
represent a system in which time simply plays no role; eg Monte Carlo models. dynamic simulation model
represents a system as it evolves over time, such as a conveyor system in a factory. Deterministic a simulation
model does not contain any probabilistic (i.e., random) components. Stochastic Simulation Models:
Incorporate random inputs, leading to outputs that are probabilistic and require estimation.
Little’s Law Little's Law is a fundamental theorem in queuing theory
that relates the number of items in a queueing system (L), the average
arrival rate of items (λ), and the average time an item spends in the
system (W). It is mathematically expressed as: L=λ×W
L: The average number of customers in the system, including those
being served and waiting in the queue.
λ: The arrival rate, which is the average number of customers arriving
per unit time.
W: The average time a customer spends in the system, including
waiting and service time.
This law applies to steady-state systems, meaning the system’s
properties do not change over time. It is widely used to analyze and
optimize performance in various systems, such as production lines,
call centers, and computer networks.
Continuous simulations model systems where changes occur continuously over time. They often involve
differential equations to represent physical phenomena like temperature, velocity, or population growth.
Applications include:>Climate modeling.>Fluid dynamics.
Parallel Simulation This approach involves running simulations on multiple processors or computers
simultaneously to reduce computation time. It is particularly useful for large-scale or complex simulations
like:>Military training exercises.>Large traffic systems.
Monte Carlo Simulation Monte Carlo simulations use random sampling and statistical modeling to estimate
numerical results. They are used to analyze uncertain systems and processes, particularly in:>Financial risk
analysis.>Engineering reliability assessments.
Spreadsheet Simulation Spreadsheet simulation employs spreadsheet software (e.g., Microsoft Excel) to model
and simulate systems. It uses built-in functions, formulas, and scenarios to analyze outcomes. It is simple and
user-friendly, often applied in:>Business decision-making.>Budget forecasting.
MPEN 584E: OPTIMIZATION AND SIMULATION
ASSIGNMENT:
PETER NYAGA
MPE/035/20
Question One:
Little's Law is a fundamental theorem in queuing theory that relates the number of items in a queueing system
(L), the average arrival rate of items (λ), and the average time an item spends in the system (W). It is
mathematically expressed as:
L=λ×WL
• L: The average number of customers in the system, including those being served and waiting in the
queue.
• λ: The arrival rate, which is the average number of customers arriving per unit time.
• W: The average time a customer spends in the system, including waiting and service time.
This law applies to steady-state systems, meaning the system’s properties do not change over time. It is widely
used to analyze and optimize performance in various systems, such as production lines, call centers, and
computer networks.
Question Two:
• Climate modeling.
• Fluid dynamics.
• Business decision-making.
• Budget forecasting.