SlideShare uma empresa Scribd logo
1 de 37
Baixar para ler offline
Simulation
Outline
 Introduction to Simulation
 Discrete Event Simulation
 Simulator
   CSIM (Simulation Language)
   GloMoSim
   NS-2
   NCTU-NS
 Conclusion
 Mini-Project: Using GloMoSim
 Project: Develop a MAC simulator using PARSEC
Outline
 Introduction to Simulation
 Discrete Event Simulation
 Simulator
   CSIM (Simulation Language)
   GloMoSim
   NS-2
   NCTU-NS
 Conclusion
 Mini-Project: Using GloMoSim
 Project: Develop a MAC simulator using PARSEC
Introduction to Simulation
 What is simulation?
   A simulation is the imitation of the operation of a real-world
   process or system over time.
Introduction to Simulation
 System and System Environment
   To model a system, it is necessary to understand the concept of a
   system and the system boundary.
   A system is defined as a group of objects that are joined together
   in some regular interaction or interdependence toward the
   accomplishment of some purpose.
   A system is often affected by changes occurring outside the
   system. Such changes are said to occur in the system environment.
   In modeling a system, it is necessary to decide on the boundary
   between the system and its environment.
Introduction to Simulation
 Components of a System
   An entity is an object of interest in the system.
   An attribute is a property of an entity.
   An activity represents a time period of specified length.
   The state of a system is defined to be that collection of variables
   necessary to describe the system at any time.
   An event is defined as an instantaneous occurrence that may
   change the state of the system.
 Discrete System
   A discrete system is one in which the state variables change only
   at a discrete set of points in time.
Introduction to Simulation
 Model of a System
   A model is a representation of a system for the purpose of
   studying the system.
   For most studies, it is enough to consider only those aspects of
   the system that affects the problem under investigation.
   Therefore, in most cases, a model is a simplification of the
   system.
   On the other hand, the model should be sufficiently detailed to
   permit valid conclusions to be drawn about the real system.
Introduction to Simulation
 Types of Models
   Static/Dynamic
      A static simulation model, sometimes called a Monte Carlo
      simulation, represent a system at a particular point in time.
      A dynamic simulation model represents a system as it changes
      over time.
   Deterministic/Stochastic
      Simulation models that contain no random variables are classified
      as deterministic
      Deterministic models have a known set of inputs that will result
      in a unique set of outputs.
      On the other hand, a stochastic simulation model has one or more
      random variables as inputs. (e.g., random backoff timers)
Introduction to Simulation
 Types of Models (Continue)
   Discrete/Continuous
     Like the definitions for discrete and continuous systems, discrete
     and continuous models are defined similarly.
     However, 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.
 Discrete-Event System Simulation
   Discrete-event system simulation is widely used and is the focus
   of this course.
   Discrete-event system simulation is the modeling of the systems
   in which the state variables change only at a discrete set of points
   in time.
Outline
 Introduction to Simulation
 Discrete Event Simulation
 Simulator
   CSIM (Simulation Language)
   GloMoSim
   NS-2
   NCTU-NS
 Conclusion
 Mini-Project: Using GloMoSim
 Project: Develop a MAC simulator using PARSEC
Discrete Event Simulation
 Strategies of discrete event simulation
   Activity-oriented simulation
   Event-oriented simulation
   Process-oriented simulation
Discrete Event Simulation
 Activity-oriented simulation
   The programmer defines activities which are started when certain
   conditions are satisfied.
   In many cases, this type of simulation uses a simulated clock
   which advance in constant increments of time.
   With each advance, a list of activities is scanned, and those
   which have become eligible are started.
   This type of model is used more often with simulating physical
   devices.
   Simulate Network System
      Going to be very slow to execute
      Most time increments will produce no change to the system at all
Discrete Event Simulation
 Activity-oriented simulation

                           the list of activities at time 1



     Scan                                      the list of activities at time 2



            Scan




 1    2      3     4   5         6       7        8           9
Discrete Event Simulation
 Event-oriented simulation
   The simulation programmer defines events and then writes
   routines which are invoked as each kind of event occurs
   Simulated time may pass between the events
   Usually, a priority queue will be used
Discrete Event Simulation
                                                  Array
   Event-oriented simulation
                                                          struct sensor
                                                          {
                                        Event A             int id;
                  7:28                                      int location;
                  7:25                                    };

                  7:21




                              Event B

void                   void
Process_Event_A() {}   Process_Event_B() {}
Discrete Event Simulation
 Process-oriented simulation
   The programmer defines the processes (entities, transactions, etc.)
   and the model in terms of interacting processes.
   A process is an independent program or procedure which can
   execute in parallel with other processes.
     The notion of in parallel is used with some liberty
   The processes will use the resources of the system.
     Resource-oriented
     Transaction-oriented
   Time Advance
     Hold
     Send a message to itself in the future
Discrete Event Simulation
 Process-oriented simulation
                  Process
   Process        (Entity)     Process
   (Entity)                    (Entity)



                 Resource
                 (Facility)

                  Process
                  (Entity)


    Process                    Process
    (Entity)                   (Entity)
Outline
 Introduction to Simulation
 Discrete Event Simulation
 Simulator
   CSIM (Simulation Language)
   GloMoSim
   NS-2
   NCTU-NS
 Conclusion
 Mini-Project: Using GloMoSim
 Project: Develop a MAC simulator using PARSEC
Simulation Language –
CSIM
 Mesquite Software Inc.
 CSIM 19 is the latest version of the widely-used CSIM
 simulation toolkit, which was initially developed in 1985
 at Austin's Microelectronics and Computer Technology
 Corporation (MCC).
 CSIM is a library of routines for use by C or C++
 programmers.
 Can be used to implement process-oriented, discrete-
 event simulation models of complex system
Simulators –
GloMoSim
 UCLA Parallel Computing Laboratory
   http://pcl.cs.ucla.edu/
 GloMoSim (Global Mobile system Simulator) is a
 library-based simulator for wireless networks.
 It is designed as a set of library modules, each of which
 simulates a specific wireless communication protocol in
 the protocol stack.
   The communication protocol stack for wireless networks is
   divided into a set of layers, each with its own API.
 The library has been developed using PARSEC, a C-
 based parallel simulation language
   New protocols and modules can be programmed and added to the
   library using PARSEC.
Simulators –
NS-2
 An object-oriented, discrete event network simulator
 developed at UC Berkely
 Mainly used for simulating local and wide area networks
 It is written in C++ and OTcl (Object-oriented Tcl) and
 primarily uses OTcl as command and configuration
 language.
   OTcl: Network Topology
   C++: Network Component
Simulators –
NCTU-NS
 The NCTUns network simulator is developed at
 NCTU, Taiwan. Its predecessor is the Harvard
 network simulator.
 By using a novel simulation methodology, it can
 do several tasks that traditional network
 simulators cannot easily do.
 More and more people are using it. (Use the
 Google to search it for yourself.)
Outline
 Introduction to Simulation
 Discrete Event Simulation
 Simulator
   CSIM (Simulation Language)
   GloMoSim
   NS-2
   NCTU-NS
 Conclusion
 Mini-Project: Using GloMoSim
 Project: Develop a MAC simulator using PARSEC
Conclusion
 Discrete Event Simulation
   Three approaches
   The choice is in some sense a matter of taste, as any
   model developed using one approach could have been
   implemented using the other.
 Simulation Language and Simulator
   CSIM, PARSEC
   GloMoSim, NS-2, NCTUns
References
 Jerry Banks, John S. Carson, Barry L. Nelson, David M. Nicol , "Discrete
 Event System Simulation", 4th edition, Prentice Hall, 2005, ISBN 0131293427
 Herb Schwetman, “CSIM: A C-Based, Process-oriented Simulation Language”,
 in Proceedings of the Winter Simulation Conference, 1986
 Mesquite Software Inc. (CSIM19) http://www.mesquite.com/index.htm
 Xiang Zeng, Rajive Bagrodia, and Mario Gerla, “GloMoSim: A Library for
 Parallel Simulation of Large-scale Wireless Networks”, in Proceedings of the
 12th Workshop on Parallel and Distributed Simulations -- PADS '98, May 26-
 29, 1998 in Banff, Alberta, Canada
 NS-2, http://www.isi.edu/nsnam/ns/
 Marc Greis, “Tutorial for the Network Simulator “ns””,
 http://www.isi.edu/nanam/ns/tutorial/index.html
 The ns Manual, http://www.isi.edu/nsnam/ns/ns-documentation.html
 S.Y. Wang, “NCTUns 1.0”, In the column "Software Tools for Networking",
 IEEE Network, Vol.17, No.4, July 2003.
Outline
 Introduction to Simulation
 Discrete Event Simulation
 Simulator
   CSIM (Simulation Language)
   GloMoSim
   NS-2
   NCTU-NS
 Conclusion
 Mini-Project: Using GloMoSim
 Project: Develop a MAC simulator using PARSEC
Mini-Project:
Using GloMoSim
 Download
   UCLA Parallel Computing Laboratory
   http://pcl.cs.ucla.edu/


 Install
   ~/parsec (depend on your OS)
     linux3.csie.nctu.edu.tw
           RedHat Linux 9.0 Powered by Kernel 2.4.27)
           gcc version 3.3.1
   ~/glomosim
Mini-Project:
Using GloMoSim
 Compile

   ~/glomosim/main (make)
   ~/glomosim/bin
 Related Files
   ~/glomosim/bin/config.in
   ~/glomosim/bin/app.in
   ~/glomosim/bin/glomo.stat
   ~/glomosim/bin/mobility.in
   ~/glomosim/bin/nodes.input
Mini-Project:
Using GloMoSim
 Example
   Application: 2 FTP Flows
   Routing: AODV, DSR


 Demonstrate
   How to set?
   How to observe results?
Outline
 Introduction to Simulation
 Discrete Event Simulation
 Simulator
   CSIM (Simulation Language)
   GloMoSim
   NS-2
   NCTU-NS
 Conclusion
 Mini-Project: Using GloMoSim
 Project: Develop a MAC simulator using PARSEC
Project: Develop a MAC
Simulator Using PARSEC
 Introduction to PARSEC
   PARSEC was developed by members of the UCLA Parallel
   Computing Laboratory
      Web page: http://pcl.cs.ucla.edu/
   PARSEC (for PARallel Simulation Environment for Complex
   systems) is a C-based discrete-event simulation language.
   It adopts the process interaction approach to discrete-event
   simulation.
Project: Develop a MAC
Simulator Using PARSEC
 Entity (Driver Entity)
 entity NODE(int myno) {
            ename neighbor[6];
            int i, N, count;
            receive () {}
            while (1) {
                       receive (MSG msg) {
                       }
            }
            finalize { }
 }
 entity driver(){
 }
Project: Develop a MAC
Simulator Using PARSEC
 Message
 message MSG {
         int source;
 };
 receive (MSG msg) {
 }
 send MSG{myno} to neighbor[GET_NEIGHBOR(N)];
Project: Develop a MAC
Simulator Using PARSEC
      Example
 1.    Topology

 2.    When a node receives a message, it will transmit a message to
       one of its neighbors within 10~20 time units. (Initially, each
       node can send a message to itself to start simulation.)
 3.    The neighbor is chosen randomly.
 4.    When the program terminates, each node will report how many
       messages it receives.
 5.    The maximum simulation time. 100000 time units.
Project: Develop a MAC
Simulator Using PARSEC
 Project Goal:
   Unslotted CSMA defined in IEEE 802.15.4
     IEEE standard for information technology -
     telecommunications and information exchange between
     systems - local and metropolitan area networks specific
     requirements part 15.4: wireless medium access control
     (MAC) and physical layer (PHY) specifications for low-rate
     wireless personal area networks (LR-WPANs)
Project: Develop a MAC
Simulator Using PARSEC
1.   Topology (You can assume that interference range is equal to communication range)
2.   Transmission Mechanism (http://www.eecs.berkeley.edu/~csinem/) “ZigBee/IEEE
     802.15.4 Summary” (unslotted CSMA/CA)
3.   States: {IDLE, RECEIVING, PENDING, TRANSMITTING}
        A node will not receive any packet when it is in TRANSMITTING state.
        A node can transmit a packet only when it is in IDLE state.
4.   When a node transmits a packet, the packet will be broadcasted due to broadcast
     nature in wireless environment. However, the packet will carry the neighborid
     information (The neighbor is chosen randomly). Only the neighbor whose id is equal
     to neighbored will increase its receiving count.
5.   When the program terminates, each node will report how many messages it receives
     successfully (receiving count) and how many messages it transmits (transmitting
     count). (Collision should be simulated.)
6.   After a node transmits a packet successfully or receives a packet successfully or
     discards a packet (due to NB > macMaxCSMABackoffs), it will send a packet again
     within RANDOM_INTERVAL~(RANDOM_INTERVAL + RANDOM_MIN) time
     units.
7.   The maximum simulation time. 100000000 time units.
8.   Transmission delay and propagation delay should be simulated.
Project: Develop a MAC
Simulator Using PARSEC

Mais conteúdo relacionado

Mais procurados

Introduction to Simulation
Introduction to SimulationIntroduction to Simulation
Introduction to Simulation
chimco.net
 
Discrete And Continuous Simulation
Discrete And Continuous SimulationDiscrete And Continuous Simulation
Discrete And Continuous Simulation
Nguyen Chien
 
Simulation concept, Advantages & Disadvantages
Simulation concept, Advantages & DisadvantagesSimulation concept, Advantages & Disadvantages
Simulation concept, Advantages & Disadvantages
Pankaj Verma
 
Computer modelling and simulations
Computer modelling and simulationsComputer modelling and simulations
Computer modelling and simulations
tangytangling
 

Mais procurados (20)

Introduction to Simulation
Introduction to SimulationIntroduction to Simulation
Introduction to Simulation
 
Modelling simulation (1)
Modelling simulation (1)Modelling simulation (1)
Modelling simulation (1)
 
Simulation & Modelling
Simulation & ModellingSimulation & Modelling
Simulation & Modelling
 
Types of Mathematical Model.
Types of Mathematical Model.Types of Mathematical Model.
Types of Mathematical Model.
 
Simulation Powerpoint- Lecture Notes
Simulation Powerpoint- Lecture NotesSimulation Powerpoint- Lecture Notes
Simulation Powerpoint- Lecture Notes
 
Modelling and simulation
Modelling and simulationModelling and simulation
Modelling and simulation
 
Unit 1 introduction to simulation
Unit 1 introduction to simulationUnit 1 introduction to simulation
Unit 1 introduction to simulation
 
Simulation, Modeling, it’s application, advantage & disadvantage
Simulation, Modeling, it’s application, advantage  &  disadvantageSimulation, Modeling, it’s application, advantage  &  disadvantage
Simulation, Modeling, it’s application, advantage & disadvantage
 
Introduction to simulation
Introduction to simulationIntroduction to simulation
Introduction to simulation
 
Discrete And Continuous Simulation
Discrete And Continuous SimulationDiscrete And Continuous Simulation
Discrete And Continuous Simulation
 
System simulation & modeling notes[sjbit]
System simulation & modeling notes[sjbit]System simulation & modeling notes[sjbit]
System simulation & modeling notes[sjbit]
 
Discrete event simulation
Discrete event simulationDiscrete event simulation
Discrete event simulation
 
SIMULATION
SIMULATIONSIMULATION
SIMULATION
 
Simulation concept, Advantages & Disadvantages
Simulation concept, Advantages & DisadvantagesSimulation concept, Advantages & Disadvantages
Simulation concept, Advantages & Disadvantages
 
The principles of simulation system design.pptx
The principles of simulation system design.pptxThe principles of simulation system design.pptx
The principles of simulation system design.pptx
 
All types of model(Simulation & Modelling) #ShareThisIfYouLike
All types of model(Simulation & Modelling) #ShareThisIfYouLikeAll types of model(Simulation & Modelling) #ShareThisIfYouLike
All types of model(Simulation & Modelling) #ShareThisIfYouLike
 
Computer Simulation And Modeling
Computer Simulation And ModelingComputer Simulation And Modeling
Computer Simulation And Modeling
 
Computer modelling and simulations
Computer modelling and simulationsComputer modelling and simulations
Computer modelling and simulations
 
Introduction to System, Simulation and Model
Introduction to System, Simulation and ModelIntroduction to System, Simulation and Model
Introduction to System, Simulation and Model
 
Discrete event-simulation
Discrete event-simulationDiscrete event-simulation
Discrete event-simulation
 

Destaque

Chapter3 general principles of discrete event simulation
Chapter3   general principles of discrete event simulationChapter3   general principles of discrete event simulation
Chapter3 general principles of discrete event simulation
De La Salle University-Manila
 
Introduction to Discrete-Event Simulation Using SimPy
Introduction to Discrete-Event Simulation Using SimPyIntroduction to Discrete-Event Simulation Using SimPy
Introduction to Discrete-Event Simulation Using SimPy
pycontw
 
Simulation Technology Challenges
Simulation Technology ChallengesSimulation Technology Challenges
Simulation Technology Challenges
CETES
 
An Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social SciencesAn Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social Sciences
fsmart01
 

Destaque (20)

Chapter3 general principles of discrete event simulation
Chapter3   general principles of discrete event simulationChapter3   general principles of discrete event simulation
Chapter3 general principles of discrete event simulation
 
Introduction to Discrete-Event Simulation Using SimPy
Introduction to Discrete-Event Simulation Using SimPyIntroduction to Discrete-Event Simulation Using SimPy
Introduction to Discrete-Event Simulation Using SimPy
 
8. probabilidad y variables aleatorias
8.  probabilidad y variables aleatorias8.  probabilidad y variables aleatorias
8. probabilidad y variables aleatorias
 
Ejercicio de Simulación
Ejercicio de Simulación Ejercicio de Simulación
Ejercicio de Simulación
 
Unit 5 general principles, simulation software
Unit 5 general principles, simulation softwareUnit 5 general principles, simulation software
Unit 5 general principles, simulation software
 
Chapter 02 simulation examples
Chapter 02   simulation examplesChapter 02   simulation examples
Chapter 02 simulation examples
 
Mourão Moura - input2012
Mourão Moura - input2012Mourão Moura - input2012
Mourão Moura - input2012
 
Introduction to Simulation- Predictive Analytics
Introduction to Simulation- Predictive AnalyticsIntroduction to Simulation- Predictive Analytics
Introduction to Simulation- Predictive Analytics
 
Unit 1 introduction
Unit 1 introductionUnit 1 introduction
Unit 1 introduction
 
Simulation Technology Challenges
Simulation Technology ChallengesSimulation Technology Challenges
Simulation Technology Challenges
 
The use of 3D simulation technology to improve health and safety performance ...
The use of 3D simulation technology to improve health and safety performance ...The use of 3D simulation technology to improve health and safety performance ...
The use of 3D simulation technology to improve health and safety performance ...
 
02 20110314-simulation
02 20110314-simulation02 20110314-simulation
02 20110314-simulation
 
An Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social SciencesAn Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social Sciences
 
Future Of Simulation In Healthcare Education
Future Of Simulation In Healthcare EducationFuture Of Simulation In Healthcare Education
Future Of Simulation In Healthcare Education
 
Distribuciones de probabilidad discretas
Distribuciones de probabilidad discretasDistribuciones de probabilidad discretas
Distribuciones de probabilidad discretas
 
Adm ventas i parcial
Adm ventas i parcialAdm ventas i parcial
Adm ventas i parcial
 
Retailing cruz azul
Retailing cruz azulRetailing cruz azul
Retailing cruz azul
 
Ejemplos sim manual cap 4
Ejemplos sim manual cap 4Ejemplos sim manual cap 4
Ejemplos sim manual cap 4
 
Distribuciones de probabilidad continuas
Distribuciones de probabilidad continuasDistribuciones de probabilidad continuas
Distribuciones de probabilidad continuas
 
Esri CityEngine
Esri CityEngineEsri CityEngine
Esri CityEngine
 

Semelhante a Simulation

An integrated event summarization approach for complex system management
An integrated event summarization approach for complex system managementAn integrated event summarization approach for complex system management
An integrated event summarization approach for complex system management
Venkat Projects
 
Discrete event systems comprise of discrete state spaces and event
Discrete event systems comprise of discrete state spaces and eventDiscrete event systems comprise of discrete state spaces and event
Discrete event systems comprise of discrete state spaces and event
Nitish Nagar
 
Open modeling and simulation framework for evolutive analysis
Open modeling and simulation framework for evolutive analysisOpen modeling and simulation framework for evolutive analysis
Open modeling and simulation framework for evolutive analysis
Servicio de Difusión de la Creación Intelectual (SEDICI)
 
Introduction to modeling_and_simulation
Introduction to modeling_and_simulationIntroduction to modeling_and_simulation
Introduction to modeling_and_simulation
mukmin91
 

Semelhante a Simulation (20)

Simulator
SimulatorSimulator
Simulator
 
Unit i
Unit iUnit i
Unit i
 
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
 
An integrated event summarization approach for complex system management
An integrated event summarization approach for complex system managementAn integrated event summarization approach for complex system management
An integrated event summarization approach for complex system management
 
Automatic Test Generation for Space
Automatic Test Generation for SpaceAutomatic Test Generation for Space
Automatic Test Generation for Space
 
From Simulation to Online Gaming: the need for adaptive solutions
From Simulation to Online Gaming: the need for adaptive solutions From Simulation to Online Gaming: the need for adaptive solutions
From Simulation to Online Gaming: the need for adaptive solutions
 
Discrete event systems comprise of discrete state spaces and event
Discrete event systems comprise of discrete state spaces and eventDiscrete event systems comprise of discrete state spaces and event
Discrete event systems comprise of discrete state spaces and event
 
Introduction to networks simulation
Introduction to networks simulationIntroduction to networks simulation
Introduction to networks simulation
 
Open modeling and simulation framework for evolutive analysis
Open modeling and simulation framework for evolutive analysisOpen modeling and simulation framework for evolutive analysis
Open modeling and simulation framework for evolutive analysis
 
Poster Vensim Repast
Poster Vensim RepastPoster Vensim Repast
Poster Vensim Repast
 
Introduction to modeling_and_simulation
Introduction to modeling_and_simulationIntroduction to modeling_and_simulation
Introduction to modeling_and_simulation
 
Introduction to modeling_and_simulation
Introduction to modeling_and_simulationIntroduction to modeling_and_simulation
Introduction to modeling_and_simulation
 
A Survey on Wireless Network Simulators
A Survey on Wireless Network SimulatorsA Survey on Wireless Network Simulators
A Survey on Wireless Network Simulators
 
Seminar on computer simulation and modeling The Activity Approach By:Asamene.K
Seminar on computer simulation and modeling The Activity Approach By:Asamene.KSeminar on computer simulation and modeling The Activity Approach By:Asamene.K
Seminar on computer simulation and modeling The Activity Approach By:Asamene.K
 
MODELING & SIMULATION.docx
MODELING & SIMULATION.docxMODELING & SIMULATION.docx
MODELING & SIMULATION.docx
 
Cs854 lecturenotes01
Cs854 lecturenotes01Cs854 lecturenotes01
Cs854 lecturenotes01
 
discrete-event-simulation-190410063238.pptx
discrete-event-simulation-190410063238.pptxdiscrete-event-simulation-190410063238.pptx
discrete-event-simulation-190410063238.pptx
 
PATTERNS06 - The .NET Event Model
PATTERNS06 - The .NET Event ModelPATTERNS06 - The .NET Event Model
PATTERNS06 - The .NET Event Model
 
An integrated event summarization approach for complex system management
An integrated event summarization approach for complex system managementAn integrated event summarization approach for complex system management
An integrated event summarization approach for complex system management
 
Building a usage profile for anomaly detection on computer networks
Building a usage profile for anomaly detection on computer networksBuilding a usage profile for anomaly detection on computer networks
Building a usage profile for anomaly detection on computer networks
 

Mais de Leonardo Daniel López Condoy

Mais de Leonardo Daniel López Condoy (19)

Distribucion 3 weibull
Distribucion 3   weibullDistribucion 3   weibull
Distribucion 3 weibull
 
Distribucion 4 erlang
Distribucion 4   erlangDistribucion 4   erlang
Distribucion 4 erlang
 
Distribucion 2 beta
Distribucion 2   betaDistribucion 2   beta
Distribucion 2 beta
 
Distribucion 1 gamma
Distribucion 1   gammaDistribucion 1   gamma
Distribucion 1 gamma
 
Analisis tecnico bursatil
Analisis tecnico bursatilAnalisis tecnico bursatil
Analisis tecnico bursatil
 
3 unidad 2 ejemplos de simulacion
3 unidad 2   ejemplos de simulacion3 unidad 2   ejemplos de simulacion
3 unidad 2 ejemplos de simulacion
 
2 simulacion unidad 1
2   simulacion unidad 12   simulacion unidad 1
2 simulacion unidad 1
 
1 simulacion unidad1
1 simulacion   unidad11 simulacion   unidad1
1 simulacion unidad1
 
Técnicas y administración de ventas ii (color)
Técnicas y administración de ventas ii (color)Técnicas y administración de ventas ii (color)
Técnicas y administración de ventas ii (color)
 
Teoria de colores
Teoria de coloresTeoria de colores
Teoria de colores
 
Retailing kfc
Retailing kfcRetailing kfc
Retailing kfc
 
Retail marketing espol iche bpl
Retail marketing espol iche bplRetail marketing espol iche bpl
Retail marketing espol iche bpl
 
9. distribuciones continuas
9.  distribuciones continuas9.  distribuciones continuas
9. distribuciones continuas
 
5. regresión lineal multiple
5.  regresión lineal multiple5.  regresión lineal multiple
5. regresión lineal multiple
 
4. estadística descriptiva
4.  estadística descriptiva4.  estadística descriptiva
4. estadística descriptiva
 
Tablas dinamicas de excel
Tablas dinamicas de excelTablas dinamicas de excel
Tablas dinamicas de excel
 
1. estadistica descriptiva
1.  estadistica descriptiva1.  estadistica descriptiva
1. estadistica descriptiva
 
2. estadistica descriptiva
2.  estadistica descriptiva2.  estadistica descriptiva
2. estadistica descriptiva
 
Aplicaciones de la biología
Aplicaciones de la biologíaAplicaciones de la biología
Aplicaciones de la biología
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Simulation

  • 2. Outline Introduction to Simulation Discrete Event Simulation Simulator CSIM (Simulation Language) GloMoSim NS-2 NCTU-NS Conclusion Mini-Project: Using GloMoSim Project: Develop a MAC simulator using PARSEC
  • 3. Outline Introduction to Simulation Discrete Event Simulation Simulator CSIM (Simulation Language) GloMoSim NS-2 NCTU-NS Conclusion Mini-Project: Using GloMoSim Project: Develop a MAC simulator using PARSEC
  • 4. Introduction to Simulation What is simulation? A simulation is the imitation of the operation of a real-world process or system over time.
  • 5. Introduction to Simulation System and System Environment To model a system, it is necessary to understand the concept of a system and the system boundary. A system is defined as a group of objects that are joined together in some regular interaction or interdependence toward the accomplishment of some purpose. A system is often affected by changes occurring outside the system. Such changes are said to occur in the system environment. In modeling a system, it is necessary to decide on the boundary between the system and its environment.
  • 6. Introduction to Simulation Components of a System An entity is an object of interest in the system. An attribute is a property of an entity. An activity represents a time period of specified length. The state of a system is defined to be that collection of variables necessary to describe the system at any time. An event is defined as an instantaneous occurrence that may change the state of the system. Discrete System A discrete system is one in which the state variables change only at a discrete set of points in time.
  • 7. Introduction to Simulation Model of a System A model is a representation of a system for the purpose of studying the system. For most studies, it is enough to consider only those aspects of the system that affects the problem under investigation. Therefore, in most cases, a model is a simplification of the system. On the other hand, the model should be sufficiently detailed to permit valid conclusions to be drawn about the real system.
  • 8. Introduction to Simulation Types of Models Static/Dynamic A static simulation model, sometimes called a Monte Carlo simulation, represent a system at a particular point in time. A dynamic simulation model represents a system as it changes over time. Deterministic/Stochastic Simulation models that contain no random variables are classified as deterministic Deterministic models have a known set of inputs that will result in a unique set of outputs. On the other hand, a stochastic simulation model has one or more random variables as inputs. (e.g., random backoff timers)
  • 9. Introduction to Simulation Types of Models (Continue) Discrete/Continuous Like the definitions for discrete and continuous systems, discrete and continuous models are defined similarly. However, 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. Discrete-Event System Simulation Discrete-event system simulation is widely used and is the focus of this course. Discrete-event system simulation is the modeling of the systems in which the state variables change only at a discrete set of points in time.
  • 10. Outline Introduction to Simulation Discrete Event Simulation Simulator CSIM (Simulation Language) GloMoSim NS-2 NCTU-NS Conclusion Mini-Project: Using GloMoSim Project: Develop a MAC simulator using PARSEC
  • 11. Discrete Event Simulation Strategies of discrete event simulation Activity-oriented simulation Event-oriented simulation Process-oriented simulation
  • 12. Discrete Event Simulation Activity-oriented simulation The programmer defines activities which are started when certain conditions are satisfied. In many cases, this type of simulation uses a simulated clock which advance in constant increments of time. With each advance, a list of activities is scanned, and those which have become eligible are started. This type of model is used more often with simulating physical devices. Simulate Network System Going to be very slow to execute Most time increments will produce no change to the system at all
  • 13. Discrete Event Simulation Activity-oriented simulation the list of activities at time 1 Scan the list of activities at time 2 Scan 1 2 3 4 5 6 7 8 9
  • 14. Discrete Event Simulation Event-oriented simulation The simulation programmer defines events and then writes routines which are invoked as each kind of event occurs Simulated time may pass between the events Usually, a priority queue will be used
  • 15. Discrete Event Simulation Array Event-oriented simulation struct sensor { Event A int id; 7:28 int location; 7:25 }; 7:21 Event B void void Process_Event_A() {} Process_Event_B() {}
  • 16. Discrete Event Simulation Process-oriented simulation The programmer defines the processes (entities, transactions, etc.) and the model in terms of interacting processes. A process is an independent program or procedure which can execute in parallel with other processes. The notion of in parallel is used with some liberty The processes will use the resources of the system. Resource-oriented Transaction-oriented Time Advance Hold Send a message to itself in the future
  • 17. Discrete Event Simulation Process-oriented simulation Process Process (Entity) Process (Entity) (Entity) Resource (Facility) Process (Entity) Process Process (Entity) (Entity)
  • 18. Outline Introduction to Simulation Discrete Event Simulation Simulator CSIM (Simulation Language) GloMoSim NS-2 NCTU-NS Conclusion Mini-Project: Using GloMoSim Project: Develop a MAC simulator using PARSEC
  • 19. Simulation Language – CSIM Mesquite Software Inc. CSIM 19 is the latest version of the widely-used CSIM simulation toolkit, which was initially developed in 1985 at Austin's Microelectronics and Computer Technology Corporation (MCC). CSIM is a library of routines for use by C or C++ programmers. Can be used to implement process-oriented, discrete- event simulation models of complex system
  • 20. Simulators – GloMoSim UCLA Parallel Computing Laboratory http://pcl.cs.ucla.edu/ GloMoSim (Global Mobile system Simulator) is a library-based simulator for wireless networks. It is designed as a set of library modules, each of which simulates a specific wireless communication protocol in the protocol stack. The communication protocol stack for wireless networks is divided into a set of layers, each with its own API. The library has been developed using PARSEC, a C- based parallel simulation language New protocols and modules can be programmed and added to the library using PARSEC.
  • 21. Simulators – NS-2 An object-oriented, discrete event network simulator developed at UC Berkely Mainly used for simulating local and wide area networks It is written in C++ and OTcl (Object-oriented Tcl) and primarily uses OTcl as command and configuration language. OTcl: Network Topology C++: Network Component
  • 22. Simulators – NCTU-NS The NCTUns network simulator is developed at NCTU, Taiwan. Its predecessor is the Harvard network simulator. By using a novel simulation methodology, it can do several tasks that traditional network simulators cannot easily do. More and more people are using it. (Use the Google to search it for yourself.)
  • 23. Outline Introduction to Simulation Discrete Event Simulation Simulator CSIM (Simulation Language) GloMoSim NS-2 NCTU-NS Conclusion Mini-Project: Using GloMoSim Project: Develop a MAC simulator using PARSEC
  • 24. Conclusion Discrete Event Simulation Three approaches The choice is in some sense a matter of taste, as any model developed using one approach could have been implemented using the other. Simulation Language and Simulator CSIM, PARSEC GloMoSim, NS-2, NCTUns
  • 25. References Jerry Banks, John S. Carson, Barry L. Nelson, David M. Nicol , "Discrete Event System Simulation", 4th edition, Prentice Hall, 2005, ISBN 0131293427 Herb Schwetman, “CSIM: A C-Based, Process-oriented Simulation Language”, in Proceedings of the Winter Simulation Conference, 1986 Mesquite Software Inc. (CSIM19) http://www.mesquite.com/index.htm Xiang Zeng, Rajive Bagrodia, and Mario Gerla, “GloMoSim: A Library for Parallel Simulation of Large-scale Wireless Networks”, in Proceedings of the 12th Workshop on Parallel and Distributed Simulations -- PADS '98, May 26- 29, 1998 in Banff, Alberta, Canada NS-2, http://www.isi.edu/nsnam/ns/ Marc Greis, “Tutorial for the Network Simulator “ns””, http://www.isi.edu/nanam/ns/tutorial/index.html The ns Manual, http://www.isi.edu/nsnam/ns/ns-documentation.html S.Y. Wang, “NCTUns 1.0”, In the column "Software Tools for Networking", IEEE Network, Vol.17, No.4, July 2003.
  • 26. Outline Introduction to Simulation Discrete Event Simulation Simulator CSIM (Simulation Language) GloMoSim NS-2 NCTU-NS Conclusion Mini-Project: Using GloMoSim Project: Develop a MAC simulator using PARSEC
  • 27. Mini-Project: Using GloMoSim Download UCLA Parallel Computing Laboratory http://pcl.cs.ucla.edu/ Install ~/parsec (depend on your OS) linux3.csie.nctu.edu.tw RedHat Linux 9.0 Powered by Kernel 2.4.27) gcc version 3.3.1 ~/glomosim
  • 28. Mini-Project: Using GloMoSim Compile ~/glomosim/main (make) ~/glomosim/bin Related Files ~/glomosim/bin/config.in ~/glomosim/bin/app.in ~/glomosim/bin/glomo.stat ~/glomosim/bin/mobility.in ~/glomosim/bin/nodes.input
  • 29. Mini-Project: Using GloMoSim Example Application: 2 FTP Flows Routing: AODV, DSR Demonstrate How to set? How to observe results?
  • 30. Outline Introduction to Simulation Discrete Event Simulation Simulator CSIM (Simulation Language) GloMoSim NS-2 NCTU-NS Conclusion Mini-Project: Using GloMoSim Project: Develop a MAC simulator using PARSEC
  • 31. Project: Develop a MAC Simulator Using PARSEC Introduction to PARSEC PARSEC was developed by members of the UCLA Parallel Computing Laboratory Web page: http://pcl.cs.ucla.edu/ PARSEC (for PARallel Simulation Environment for Complex systems) is a C-based discrete-event simulation language. It adopts the process interaction approach to discrete-event simulation.
  • 32. Project: Develop a MAC Simulator Using PARSEC Entity (Driver Entity) entity NODE(int myno) { ename neighbor[6]; int i, N, count; receive () {} while (1) { receive (MSG msg) { } } finalize { } } entity driver(){ }
  • 33. Project: Develop a MAC Simulator Using PARSEC Message message MSG { int source; }; receive (MSG msg) { } send MSG{myno} to neighbor[GET_NEIGHBOR(N)];
  • 34. Project: Develop a MAC Simulator Using PARSEC Example 1. Topology 2. When a node receives a message, it will transmit a message to one of its neighbors within 10~20 time units. (Initially, each node can send a message to itself to start simulation.) 3. The neighbor is chosen randomly. 4. When the program terminates, each node will report how many messages it receives. 5. The maximum simulation time. 100000 time units.
  • 35. Project: Develop a MAC Simulator Using PARSEC Project Goal: Unslotted CSMA defined in IEEE 802.15.4 IEEE standard for information technology - telecommunications and information exchange between systems - local and metropolitan area networks specific requirements part 15.4: wireless medium access control (MAC) and physical layer (PHY) specifications for low-rate wireless personal area networks (LR-WPANs)
  • 36. Project: Develop a MAC Simulator Using PARSEC 1. Topology (You can assume that interference range is equal to communication range) 2. Transmission Mechanism (http://www.eecs.berkeley.edu/~csinem/) “ZigBee/IEEE 802.15.4 Summary” (unslotted CSMA/CA) 3. States: {IDLE, RECEIVING, PENDING, TRANSMITTING} A node will not receive any packet when it is in TRANSMITTING state. A node can transmit a packet only when it is in IDLE state. 4. When a node transmits a packet, the packet will be broadcasted due to broadcast nature in wireless environment. However, the packet will carry the neighborid information (The neighbor is chosen randomly). Only the neighbor whose id is equal to neighbored will increase its receiving count. 5. When the program terminates, each node will report how many messages it receives successfully (receiving count) and how many messages it transmits (transmitting count). (Collision should be simulated.) 6. After a node transmits a packet successfully or receives a packet successfully or discards a packet (due to NB > macMaxCSMABackoffs), it will send a packet again within RANDOM_INTERVAL~(RANDOM_INTERVAL + RANDOM_MIN) time units. 7. The maximum simulation time. 100000000 time units. 8. Transmission delay and propagation delay should be simulated.
  • 37. Project: Develop a MAC Simulator Using PARSEC