Sunteți pe pagina 1din 20

Ammar Mushtaq

ammar.mushtaq@rcms.nust.edu.pk

Research Center for Modeling and Simulation (RCMS)


National University of Sciences and Technology (NUST)
Islamabad, Pakistan

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 1

Course Outline

Introduction to Simulations

Types of Simulation Models


MODELING & SIMULATION

Simulation Examples

Monte-Carlo Simulations
Comparison of System Designs

Analysis of Variance

Variance Reduction Techniques

Design of Experiments

BEST SOLUTION

EVALUATION OF DESIGN

Response Surface Methods

Classical Optimization Theory

Unconstrained Optimization

Constrained Optimization

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 2

Pre-requisites & Books


Probability & Statistics
Programming & MATLAB
Linear Algebra & Calculus
Discrete-Event Simulation (A first course)
by S. Park & L. Leemis

Simulation Modeling & Analysis


by Averill M. Law

Statistical Quality Control


by Douglas C. Montgomery
Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 3

Evaluation
ATTENDANCE

3-0 Course (~ 45 Lec)

>75%

MARKS DISTRIBUTION

Quizzes

(06)

10-15%

Assignments

(03)

05-10%

OHTs

(02)

30-40%

End Term

40-50%

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 4

M & S?

Simulation has emerged as the

THIRD METHODOLOGY
of exploring the truth

It would complement the theory and experimental


methodology
Simulation will never replace them!!

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 5

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 6

Ways to Study?
System

Experiment with
Actual System

Experiment with
Model of the System

Mathematical
Model

Analytical Solution

Physical
Model

Simulation

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 7

Models Types
System model

Deterministic

Dynamic

Stochastic

Static

Static

Dynamic

Monte Carlo
simulation
Discrete

Continuous

Discrete-event
simulation

Continuous
simulation

Continuous
Continuous
simulation

Discrete
Discrete-event
simulation

Linear and Nonlinear


Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 8

Models Types
Stochastic
Model that contains random (probabilistic) elements,
Examples
Inter-arrival time or service time of customers at a restaurant or store
Amount of time required to service a customer

Output is a random quantity (multiple runs required analyze


output)

Deterministic
Model containing no random elements
Examples
Simulation of a digital circuit
Simulation of a chemical reaction
Output is deterministic for a given set of inputs
Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 9

Models Types
Static
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
Model focusing on the evolution of the system under
investigation over time

Typically represented by differential equations.

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 10

Models Types
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
Velocity of fluid in pipe flows
Temperatures and stresses in a solid

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 11

Model Development Cycle


Define goals, objectives of study

Develop conceptual model

Develop specification of model


Fundamentally an
iterative process
Develop computational model

Verify model

Validate model
Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 12

Objective & Goals


What does you (or the customer) hope to accomplish
with the model
Predict the weather
Train personnel to develop certain skills (e.g., driving)
Optimize a manufacturing process or develop the most cost effective
means to reduce traffic congestion in some part of a city

Often requires developing a business case to justify the


cost
Improved efficiency will save the company $$$
Example: electronics

Objectives may not be known when you start the project!


One often learns things along the way

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 13

Conceptual Model
An abstract (i.e., not directly executable) representation of the
system
What are state variables?
How are they interrelated?
Which variables should be included in model?
What can be left out?
Level of detail
Appropriate choice depends on the purpose of the model

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 14

Specification Model
A more detailed specification of the model including more
specifics
Collect data to populate model
Traffic example: Road geometry, signal timing, expected traffic demand,
driver behavior
Empirical data or probability distributions often used

Development of algorithms necessary to simulate the system


Example: Path planning for vehicles

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 15

Computational Model
Executable simulation model

Software approach
General purpose programming language
Special purpose simulation language
Simulation package
Approach often depends on need for customization and economics
Where do you make your money?
Defense vs. commercial industry

Other (non-functional) requirements


Performance
Interoperability with other models/tools/data

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 16

Verification
Did I build the computational model right?
Does the computational model match the specification model?
Largely a software engineering activity (debugging)
Not to be confused with correctness (see model validation)!

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 17

Validation
Did I build the right model?

Does the computational model match the actual (or envisioned)


system?
Typically, compare against
Measurements of actual system
An analytic (mathematical) model of the system
Another simulation model

By necessity, always an incomplete activity!


Often can only validate portions of the model
If you can validate the simulation with 100% certainty, why build the
simulation?

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 18

M & S Team Skills

Knowledge of the system under investigation (Domain Expert)

System analyst skills (model mathematical formulation)

Model building skills (model programming)

Data collection skills

Statistical skills (input data representation)

More statistical skills (output data analysis)

Even more statistical skills (Design of


Experiments/ANOVA/Optimization)

Management skills (to get everyone pulling in the same


directions)

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 19

Summary

Modeling and simulation is an important, widely used technique with

a wide range of applications


Computation power increases (Moores law) have made it more universal
In some cases, it has become essential (e.g., to be economically competitive)
Rich variety of types of models, applications, uses

As easy (actually, easier!) to get wrong or misleading answers as it is to

get useful results


Appropriate methodologies required to protect against major mistakes

Ammar Mushtaq

Modeling, Simulation & Optimization Lecture 1: 19

S-ar putea să vă placă și