The document introduces discrete-event simulation using SimPy. It discusses what simulation is, when to use simulation, different categories of simulation including discrete-event simulation, and different world views for discrete-event simulation including activity-oriented and event-oriented views. It provides examples of using discrete-event simulation for queueing systems, factory workflows, and traffic simulations.
Robotics is the field of engineering that involves programming machines, called robots, to replicate human behaviors. Robots are used in many industries and can perform hazardous tasks faster and more accurately than humans. The main components of robots include their structure, power source, sensors, and actuators. In the future, robots may become even more autonomous and some may attain intelligence similar to or exceeding human levels.
1. A pentagonal prism standing on its base with one side perpendicular to VP is cut by a section plane inclined at 40° to HP through the midpoint of the axis.
2. The FV, TV, and side view show the projected shape of the section, while the true shape of the section is an irregular pentagon.
3. The development of the remaining solid is shown, formed of five rectangles representing the lateral faces.
1) The document provides an introduction to industrial automation, including definitions, basic elements, types, and reasons for automating manufacturing processes.
2) It describes the three main types of automation systems - fixed, programmable, and flexible - and how they relate to product variety and production quantity.
3) Key factors that influence whether to automate including production volume needed, product complexity, and changeover flexibility requirements. Automation can increase productivity, quality, and worker safety.
This document contains questions and answers related to various topics in engineering drawing such as scales, curves, orthographic projections, projections of planes and solids, sections of solids, development of surfaces, and isometric projections. Some key topics covered include defining representative fraction and length of scale, types of scales, methods of drawing conic sections, differences between first angle and third angle projections, locating traces of a straight line, classifying auxiliary planes, and drawing isometric projections of basic geometric solids.
Robotics is the field of engineering that involves programming machines, called robots, to replicate human behaviors. Robots are used in many industries and can perform hazardous tasks faster and more accurately than humans. The main components of robots include their structure, power source, sensors, and actuators. In the future, robots may become even more autonomous and some may attain intelligence similar to or exceeding human levels.
1. A pentagonal prism standing on its base with one side perpendicular to VP is cut by a section plane inclined at 40° to HP through the midpoint of the axis.
2. The FV, TV, and side view show the projected shape of the section, while the true shape of the section is an irregular pentagon.
3. The development of the remaining solid is shown, formed of five rectangles representing the lateral faces.
1) The document provides an introduction to industrial automation, including definitions, basic elements, types, and reasons for automating manufacturing processes.
2) It describes the three main types of automation systems - fixed, programmable, and flexible - and how they relate to product variety and production quantity.
3) Key factors that influence whether to automate including production volume needed, product complexity, and changeover flexibility requirements. Automation can increase productivity, quality, and worker safety.
This document contains questions and answers related to various topics in engineering drawing such as scales, curves, orthographic projections, projections of planes and solids, sections of solids, development of surfaces, and isometric projections. Some key topics covered include defining representative fraction and length of scale, types of scales, methods of drawing conic sections, differences between first angle and third angle projections, locating traces of a straight line, classifying auxiliary planes, and drawing isometric projections of basic geometric solids.
This document discusses key concepts in discrete event simulation including system models, event lists, time-advance algorithms, and world views. It describes discrete event simulation as modeling systems where state changes occur at discrete points in time. A time-advance algorithm uses an event list to advance the simulation clock to the time of the next scheduled event. The main world views are event scheduling, process-interaction, and activity scanning.
This document provides an overview of simulation and discrete event simulation. It discusses different types of models including static/dynamic, deterministic/stochastic, and discrete/continuous. It also describes three approaches to discrete event simulation: activity-oriented, event-oriented, and process-oriented. The document outlines several popular simulators including CSIM, GloMoSim, NS-2, and NCTU-NS. It concludes with references for further reading on simulation and these simulators. Mini-projects and projects are proposed for using GloMoSim and developing a MAC simulator using PARSEC, respectively.
S6 l04 analytical and numerical methods of structural analysisShaikh Mohsin
This document provides an overview of analytical and numerical methods for structural analysis. It begins by explaining the process of structural analysis from the real object to the design model. It then discusses analytical methods like mechanics of materials and numerical methods like the finite element method. The document provides examples comparing analytical and numerical solutions. In summary, it outlines the appropriate uses of both methods and emphasizes the importance of understanding the underlying mechanics rather than solely relying on software tools.
Unit 5 general principles, simulation softwareraksharao
This document discusses concepts and algorithms in discrete-event simulation. It describes key concepts like events, activities, and the event scheduling algorithm. The event scheduling algorithm involves removing the imminent event from the future event list, advancing the clock, executing the event to update the system state, and generating future events. It also discusses world views like event scheduling and activity scanning. The document provides an example of simulating a single-channel queue and how simulation can be implemented in Java and GPSS.
This document provides an overview of discrete-event system simulation. It discusses what simulation is, when it is appropriate to use, its advantages and disadvantages. It also covers components of a system like entities, attributes, events. Different types of models are described - static vs dynamic and deterministic vs stochastic. Various application areas of simulation are listed like manufacturing, logistics, military etc.
Simulation is used to create models that represent real world systems and allow experimenting with different strategies without impacting the actual system. Models simplify real systems for analysis while maintaining key behaviors and results. Successful simulation models are easy to understand, represent the system accurately, produce fast results, and allow control and updating. Simulators are used when real experimentation is unsafe, too expensive, or when systems are still in development. Common uses of simulation include modeling systems in fields like military, education, healthcare, and engineering.
The document discusses using simulation to model queuing problems with random numbers. It describes queuing systems as having arrivals, a waiting line, service, and departure components. A single queue-single service point queuing structure is examined, with first-come, first-served queue discipline and random inter-arrival and service times. An example problem simulates 10 customer arrivals at a retail store using random numbers to estimate average waiting time and server idle time percentage. The solution shows calculating arrival and service time probabilities, simulating customer service, and finding total 4 minutes of waiting time and 12 minutes of idle time over 53 minutes.
The information in this slide is very useful for me to do the assignment regarding the simulation in which we have to report together with the presentation...
This document outlines steps to create an ATM simulation program in Python, including functions for withdrawing money, depositing money, combining withdrawals and deposits with conditional statements, and updating balances. The program would prompt the user for a password with each transaction and output messages for incorrect pins, successful transactions, or invalid options selected.
ETOS discrete event simulation framework focused on easier team cooperationJiriFiser
This document describes the ETOS discrete event simulation framework. ETOS was created to address limitations in the SimPy framework, such as its lack of support for nested coroutines and separation of roles. ETOS uses a SIM-DSL to declaratively describe simulation parameters and object lifetimes, while procedural Python code represents actions. It separates the simulation into actors, transactions representing actor tasks, and entities for individual transaction steps. This allows clearer separation of specifier, implementor, and editor roles in building simulations.
Hairs project from the body's surface and come in a variety of lengths, widths, and growth rates. They serve protective, sensory, and social functions. Hair growth occurs in cycles of anagen, catagen, telogen, and exogen phases. Common types of hair loss include alopecia areata (patchy bald spots), androgenetic alopecia (male or female pattern baldness), and postpartum alopecia. Hair loss can be caused by physical or emotional stress, diet, hormones, medical conditions, or hair manipulation. Treatments include corticosteroids, minoxidil, finasteride, behavior modification, and hair implants.
Hairs project from the body's surface and come in a variety of lengths, widths, and growth rates. They serve protective, sensory, and social functions. Hair growth occurs in cycles of anagen, catagen, telogen, and exogen phases. Common types of hair loss include alopecia areata (patchy bald spots), androgenetic alopecia (male or female pattern baldness), and postpartum alopecia. Hair loss can be caused by physical or emotional stress, diet, hormones, medical conditions, or hair manipulation. Treatments include medications, lifestyle changes, and hair transplants. More research seeks to fully cure types of alopecia.
The document discusses histopathological approaches to diagnosing alopecia. It describes two main approaches - transverse sectioning and vertical sectioning. Transverse sectioning allows visualization of all hair follicles and quantitative analysis, while vertical sectioning is better for assessing interface changes and subcutaneous pathology. The author proposes a multiteam clinicopathological approach using both sectioning techniques on multiple biopsy specimens for optimal diagnosis. Special processing techniques are recommended depending on whether the alopecia is scarring or non-scarring.
This seminar presentation discusses androgenetic alopecia, a common form of hair loss affecting both men and women. It is caused by androgens miniaturizing hair follicles, shortening the hair cycle and reducing hair shaft length. In men, hair loss typically starts at the temples and crown and may progress to baldness, while in women the hair thinning is usually more diffuse. The presentation covers the epidemiology, pathophysiology involving the hair growth cycle and follicles, clinical features, histopathology, and medical treatment options including minoxidil and finasteride for men. Counseling is an important part of managing patients with androgenetic alopecia.
This document discusses queuing analysis and its applications. Queuing theory models systems with queues and servers that process items. It is useful for analyzing network and system performance when load or design changes are expected. The document outlines different analysis methods and key metrics like arrival rate, service time, waiting time, number of items, and utilization. It also covers important assumptions like Poisson arrivals, service time distributions, Little's Law, and example applications like database servers and multi-processor systems.
If the system is not busy, you can access it immediately, but if it is busy you must schedule access. You can then come back at the scheduled time and log in by clicking the access URL without needing email confirmation.
The document discusses queuing systems and networks. It describes how queuing networks can model concurrent systems with nodes that include queues and servers. Key concepts discussed include arrival and service rates, stable systems where arrival equals departure rates, and Little's Law relating queue length, arrival rate, and wait time. The document also introduces Flux, a programming language for building high-performance concurrent servers by combining sequential components with defined flows and atomicity.
This document provides an overview of queuing systems and their analysis. It discusses key concepts like arrival and service processes, performance measures, steady-state analysis using Little's Law, and birth-death processes. An example M/M/1 queue is analyzed to find the steady-state probabilities and performance metrics like expected number in the system and average wait times. The methodology of setting up balance equations, solving for the steady-state distribution, and applying it to derive performance measures is demonstrated.
Discrete event simulation allows users to model real-world systems over time through imitation. It generates artificial histories to draw inferences about system behavior and operating characteristics without disrupting the real system. Simulation is useful when analytical solutions are not possible due to complex, random factors or when experimentation and testing are needed. Key advantages include exploring changes safely, compressing or expanding time, and gaining insights into variable interactions. Common applications include manufacturing, transportation, healthcare, and business processes.
Approach to a case of diffuse hair loss in females
. Anagen effluvium-
(a)Dystrophic
(b)Loose anagen hair
2. Telogen effluvium –
(a)acute telogen effluvium
(b)Chronic telogen effluvium
3. Female pattern hair loss
Primary CTE –represents a primary disorder and is a diagnosis of exclusion.
Secondary CTE- secondary to variety of systemic disorders.
Iron deficiency
Other deficiency –protein calorie malnutrition ,zinc deficiency
Thyroid diseases
Metabolic diseases-chronic liver or renal failure, advanced malignancy, pancreatic disease and upper GI disorder with malabsorption
SLE and other connective tissue disorders.
HIV infection
Drug induced
This chapter introduces simulation as a technique for modeling real-world systems using computers. Simulation allows testing of complex models that may be too difficult to solve analytically. It involves creating a model of a system that runs on a computer and imitates the system's operations over time. The chapter discusses different types of simulation models and their applications in areas like manufacturing, healthcare, transportation and more. It also covers advantages like flexibility to model complex systems and ability to experiment without impacting the real system.
Strategy for Social Media MK Plan by Slidesgo.pptxjshwyi
A simulation imitates real-world processes or systems using models. There are three main types of simulation: discrete event simulation which models processes over time like factory operations; dynamic simulation which models processes over space like machine kinematics; and process simulation which models interactions between systems like in-manufacture product modelling. Simulation works by creating a visual model of a process in simulation software. It has advantages like reducing financial risk by allowing repeated testing without real-world costs and examining long-term impacts. Simulation is used to evaluate changes to systems and predict new system performance as an alternative to costly real-world testing.
This document discusses key concepts in discrete event simulation including system models, event lists, time-advance algorithms, and world views. It describes discrete event simulation as modeling systems where state changes occur at discrete points in time. A time-advance algorithm uses an event list to advance the simulation clock to the time of the next scheduled event. The main world views are event scheduling, process-interaction, and activity scanning.
This document provides an overview of simulation and discrete event simulation. It discusses different types of models including static/dynamic, deterministic/stochastic, and discrete/continuous. It also describes three approaches to discrete event simulation: activity-oriented, event-oriented, and process-oriented. The document outlines several popular simulators including CSIM, GloMoSim, NS-2, and NCTU-NS. It concludes with references for further reading on simulation and these simulators. Mini-projects and projects are proposed for using GloMoSim and developing a MAC simulator using PARSEC, respectively.
S6 l04 analytical and numerical methods of structural analysisShaikh Mohsin
This document provides an overview of analytical and numerical methods for structural analysis. It begins by explaining the process of structural analysis from the real object to the design model. It then discusses analytical methods like mechanics of materials and numerical methods like the finite element method. The document provides examples comparing analytical and numerical solutions. In summary, it outlines the appropriate uses of both methods and emphasizes the importance of understanding the underlying mechanics rather than solely relying on software tools.
Unit 5 general principles, simulation softwareraksharao
This document discusses concepts and algorithms in discrete-event simulation. It describes key concepts like events, activities, and the event scheduling algorithm. The event scheduling algorithm involves removing the imminent event from the future event list, advancing the clock, executing the event to update the system state, and generating future events. It also discusses world views like event scheduling and activity scanning. The document provides an example of simulating a single-channel queue and how simulation can be implemented in Java and GPSS.
This document provides an overview of discrete-event system simulation. It discusses what simulation is, when it is appropriate to use, its advantages and disadvantages. It also covers components of a system like entities, attributes, events. Different types of models are described - static vs dynamic and deterministic vs stochastic. Various application areas of simulation are listed like manufacturing, logistics, military etc.
Simulation is used to create models that represent real world systems and allow experimenting with different strategies without impacting the actual system. Models simplify real systems for analysis while maintaining key behaviors and results. Successful simulation models are easy to understand, represent the system accurately, produce fast results, and allow control and updating. Simulators are used when real experimentation is unsafe, too expensive, or when systems are still in development. Common uses of simulation include modeling systems in fields like military, education, healthcare, and engineering.
The document discusses using simulation to model queuing problems with random numbers. It describes queuing systems as having arrivals, a waiting line, service, and departure components. A single queue-single service point queuing structure is examined, with first-come, first-served queue discipline and random inter-arrival and service times. An example problem simulates 10 customer arrivals at a retail store using random numbers to estimate average waiting time and server idle time percentage. The solution shows calculating arrival and service time probabilities, simulating customer service, and finding total 4 minutes of waiting time and 12 minutes of idle time over 53 minutes.
The information in this slide is very useful for me to do the assignment regarding the simulation in which we have to report together with the presentation...
This document outlines steps to create an ATM simulation program in Python, including functions for withdrawing money, depositing money, combining withdrawals and deposits with conditional statements, and updating balances. The program would prompt the user for a password with each transaction and output messages for incorrect pins, successful transactions, or invalid options selected.
ETOS discrete event simulation framework focused on easier team cooperationJiriFiser
This document describes the ETOS discrete event simulation framework. ETOS was created to address limitations in the SimPy framework, such as its lack of support for nested coroutines and separation of roles. ETOS uses a SIM-DSL to declaratively describe simulation parameters and object lifetimes, while procedural Python code represents actions. It separates the simulation into actors, transactions representing actor tasks, and entities for individual transaction steps. This allows clearer separation of specifier, implementor, and editor roles in building simulations.
Hairs project from the body's surface and come in a variety of lengths, widths, and growth rates. They serve protective, sensory, and social functions. Hair growth occurs in cycles of anagen, catagen, telogen, and exogen phases. Common types of hair loss include alopecia areata (patchy bald spots), androgenetic alopecia (male or female pattern baldness), and postpartum alopecia. Hair loss can be caused by physical or emotional stress, diet, hormones, medical conditions, or hair manipulation. Treatments include corticosteroids, minoxidil, finasteride, behavior modification, and hair implants.
Hairs project from the body's surface and come in a variety of lengths, widths, and growth rates. They serve protective, sensory, and social functions. Hair growth occurs in cycles of anagen, catagen, telogen, and exogen phases. Common types of hair loss include alopecia areata (patchy bald spots), androgenetic alopecia (male or female pattern baldness), and postpartum alopecia. Hair loss can be caused by physical or emotional stress, diet, hormones, medical conditions, or hair manipulation. Treatments include medications, lifestyle changes, and hair transplants. More research seeks to fully cure types of alopecia.
The document discusses histopathological approaches to diagnosing alopecia. It describes two main approaches - transverse sectioning and vertical sectioning. Transverse sectioning allows visualization of all hair follicles and quantitative analysis, while vertical sectioning is better for assessing interface changes and subcutaneous pathology. The author proposes a multiteam clinicopathological approach using both sectioning techniques on multiple biopsy specimens for optimal diagnosis. Special processing techniques are recommended depending on whether the alopecia is scarring or non-scarring.
This seminar presentation discusses androgenetic alopecia, a common form of hair loss affecting both men and women. It is caused by androgens miniaturizing hair follicles, shortening the hair cycle and reducing hair shaft length. In men, hair loss typically starts at the temples and crown and may progress to baldness, while in women the hair thinning is usually more diffuse. The presentation covers the epidemiology, pathophysiology involving the hair growth cycle and follicles, clinical features, histopathology, and medical treatment options including minoxidil and finasteride for men. Counseling is an important part of managing patients with androgenetic alopecia.
This document discusses queuing analysis and its applications. Queuing theory models systems with queues and servers that process items. It is useful for analyzing network and system performance when load or design changes are expected. The document outlines different analysis methods and key metrics like arrival rate, service time, waiting time, number of items, and utilization. It also covers important assumptions like Poisson arrivals, service time distributions, Little's Law, and example applications like database servers and multi-processor systems.
If the system is not busy, you can access it immediately, but if it is busy you must schedule access. You can then come back at the scheduled time and log in by clicking the access URL without needing email confirmation.
The document discusses queuing systems and networks. It describes how queuing networks can model concurrent systems with nodes that include queues and servers. Key concepts discussed include arrival and service rates, stable systems where arrival equals departure rates, and Little's Law relating queue length, arrival rate, and wait time. The document also introduces Flux, a programming language for building high-performance concurrent servers by combining sequential components with defined flows and atomicity.
This document provides an overview of queuing systems and their analysis. It discusses key concepts like arrival and service processes, performance measures, steady-state analysis using Little's Law, and birth-death processes. An example M/M/1 queue is analyzed to find the steady-state probabilities and performance metrics like expected number in the system and average wait times. The methodology of setting up balance equations, solving for the steady-state distribution, and applying it to derive performance measures is demonstrated.
Discrete event simulation allows users to model real-world systems over time through imitation. It generates artificial histories to draw inferences about system behavior and operating characteristics without disrupting the real system. Simulation is useful when analytical solutions are not possible due to complex, random factors or when experimentation and testing are needed. Key advantages include exploring changes safely, compressing or expanding time, and gaining insights into variable interactions. Common applications include manufacturing, transportation, healthcare, and business processes.
Approach to a case of diffuse hair loss in females
. Anagen effluvium-
(a)Dystrophic
(b)Loose anagen hair
2. Telogen effluvium –
(a)acute telogen effluvium
(b)Chronic telogen effluvium
3. Female pattern hair loss
Primary CTE –represents a primary disorder and is a diagnosis of exclusion.
Secondary CTE- secondary to variety of systemic disorders.
Iron deficiency
Other deficiency –protein calorie malnutrition ,zinc deficiency
Thyroid diseases
Metabolic diseases-chronic liver or renal failure, advanced malignancy, pancreatic disease and upper GI disorder with malabsorption
SLE and other connective tissue disorders.
HIV infection
Drug induced
This chapter introduces simulation as a technique for modeling real-world systems using computers. Simulation allows testing of complex models that may be too difficult to solve analytically. It involves creating a model of a system that runs on a computer and imitates the system's operations over time. The chapter discusses different types of simulation models and their applications in areas like manufacturing, healthcare, transportation and more. It also covers advantages like flexibility to model complex systems and ability to experiment without impacting the real system.
Strategy for Social Media MK Plan by Slidesgo.pptxjshwyi
A simulation imitates real-world processes or systems using models. There are three main types of simulation: discrete event simulation which models processes over time like factory operations; dynamic simulation which models processes over space like machine kinematics; and process simulation which models interactions between systems like in-manufacture product modelling. Simulation works by creating a visual model of a process in simulation software. It has advantages like reducing financial risk by allowing repeated testing without real-world costs and examining long-term impacts. Simulation is used to evaluate changes to systems and predict new system performance as an alternative to costly real-world testing.
The document discusses simulation theory and the Monte Carlo method of simulation. It defines simulation as imitating reality and explains that simulation is used to understand complex systems when real experimentation is not possible or analytical solutions are unknown. It describes the Monte Carlo method as using probability distributions and random numbers to simulate random systems. The key steps are: (1) obtaining variable probabilities from data, (2) converting to cumulative probabilities, (3) generating random numbers, (4) mapping random numbers to probability intervals to determine outcomes, and (5) repeating simulations. An example demonstrates using cumulative probabilities and random numbers to simulate daily cake demand for a bakery.
Unleashing Real-World Simulations: A Python Tutorial by Avjinder KalerAvjinder (Avi) Kaler
Simulation, a key tool in understanding complex systems, offers a dynamic representation to analyze and enhance resource allocation, preventing issues like congestion and delays.
This document provides an introduction to computer simulation. It discusses how simulation can be used to model real systems on a computer in order to understand system behavior and evaluate alternatives. It describes different types of models including iconic, symbolic, deterministic, stochastic, static, dynamic, continuous and discrete models. Monte Carlo simulation is introduced as a technique that uses random numbers. The document outlines the steps in a simulation study and provides examples of systems and their components that can be modeled using simulation.
This document provides an introduction and overview of simulation. It discusses what a simulation is and the key components of modeling a system, including entities, attributes, activities, states, and events. It also describes discrete event simulation and the main strategies of activity-oriented, event-oriented, and process-oriented simulation. Finally, it briefly introduces some common network simulators used for wireless networks, including NS-2, GloMoSim, and QualNet.
This document provides notes for an introduction to simulation course. It defines key terms like system, entities, events, and different types of models. It explains that simulation is useful for evaluating systems that would be too complex, expensive or dangerous to experiment on directly. The document outlines the goals of the course as understanding simulation concepts, mathematics, programming and implementing simulation projects. It also discusses different approaches to representing time in a simulation, like next-event time advance and fixed-increment time advance.
Advantages and disadvantages of SimulationTilakpoudel2
This document discusses simulation and modeling. It notes that simulation involves imitating real world processes or systems using models. The main advantages discussed are that simulation allows learning about systems without having the real system, experimenting with systems that may be too slow, fast, complex, or dangerous to observe directly, and enabling management to foresee issues. Some disadvantages are that model building requires training, results can be difficult to interpret, and simulation can be time-consuming and expensive. The document concludes by giving examples of simulation uses in business, engineering, medicine, and education.
O2DESUltra - a new appoach to acceleration simulation-opimization using machi...Nutchanon Ninyawee
The document describes an internship at iHPC in Singapore focused on using machine learning and simulation optimization. It introduces the intern, Nutchanon Ninyawee, and his background. It describes the O2DES simulation library and the intern's work developing O2DESUltra which adds machine learning capabilities. It discusses using O2DESUltra on benchmark problems and exploring applying it to a real-world aviation scheduling competition on the Tianchi platform.
Operating companies or professionals need to foresee the results of their decisions and steps, a representative model provides chance to simulate and see the results of their actions.
Introduction to simulation and modeling will describe what is simulation, what is system and what is model. It will give a brief overview of simulation and modeling in computer science.
Velocity 2015: Building Self-Healing SystemsSOASTA
This document discusses building self-healing distributed systems. It begins with introducing the speakers and outlining the agenda, which covers both theory and practical examples of self-healing systems. In the theory section, it defines what makes a system distributed, challenges they face, and how enabling systems to heal themselves can provide benefits like improved uptime but also risks that must be mitigated. The methodology of identifying problems, designing automated solutions, executing manually, then automating and adjusting is presented. In the practice section, three examples are demonstrated: triggering a full garbage collection when JVM heap usage exceeds a threshold, automatically restarting an application server when beacon uploads fail, and opening a support case when customer file uploads break.
Velocity 2015 building self healing systems (slide share version)SOASTA
This document discusses building self-healing systems. It begins with introducing the speakers and outlining the agenda, which covers both theory and practical examples of self-healing systems. In the theory section, it discusses challenges of distributed systems and how self-healing can help mitigate failures. It also covers risks, methodology, and testing requirements for self-healing systems. In the practice section, it demonstrates three examples of automating self-healing responses using a demo application and tools like AWS, and discusses watching and adjusting the solutions.
- The document provides an overview of the simulation and modelling process, which begins with defining a system and problem to address. This results in a project description.
- The project description is then refined into a conceptual model using formalisms like equations, diagrams, and code. This conceptual model captures the system's structure and behavior precisely.
- The conceptual model is then transformed into a simulation model - an executable computer program. This simulation model is augmented with additional code to support tasks like data collection, forming the final simulation program.
- Key steps in the process include defining the system and problem, developing a conceptual model, transforming this into a simulation model, and adding supporting code to create the simulation program used for experimentation
This document provides an overview of Simultaneous Localization and Mapping (SLAM). It discusses the basic theories behind SLAM, including what SLAM is, where it is used, and how it works. It also covers visual-inertial SLAM (VI-SLAM) in more detail, discussing the sensors, models, calibration, and the frontend and backend processing.
This document discusses simulation modeling and its applications. It begins with definitions of simulation as operating a model of a system over time to study its behavior. Simulation is used to evaluate system performance under different configurations before implementation. The key advantages are exploring "what if" scenarios without disrupting real systems and testing new designs. Common applications include manufacturing, construction, military, logistics and transportation. The document outlines the steps in a simulation study and discusses when simulation is appropriate versus not. It concludes with references on modeling and simulation.
1) The document describes a simple simulation model of a single drill press processing blank parts. Parts arrive and either get processed immediately if the drill press is idle or wait in a FIFO queue.
2) The goal is to calculate performance measures like total production, average and maximum wait times, utilization over a 20 minute simulation.
3) Queueing theory cannot be directly used to calculate these measures because the model assumptions do not match reality and it only provides long-run averages rather than the desired 20 minute period results.
This document is the manual for version 1.8 of the SimPy simulation library. It provides an introduction and overview of key concepts in SimPy including processes, how time elapses in a process, starting and stopping processes, asynchronous interruptions, signaling events, and defining and using resource objects. It also includes information on the SimPy website and supported Python version.
This document is the manual for version 1.8 of the SimPy simulation library. It provides an introduction and overview of key concepts in SimPy including processes, how time elapses in a process, starting and stopping processes, asynchronous interruptions, signaling events, and defining and using resource objects. It also includes information on the SimPy website and supported Python version.
This document discusses process simulation software used in chemical engineering. It begins with definitions of simulation and discusses the history and advantages of simulation. It then reviews common simulation software programs including Aspen Plus, Aspen HYSYS, ProMax, ChemCAD, and PRO/II. These programs are widely used in chemical engineering applications such as petroleum processing, refining, petrochemicals, and more. The document concludes that simulation is a powerful tool that allows testing of scenarios without costly real-world experimentation. Aspen Plus and HYSYS are among the most commonly used simulation programs.
Similar to Introduction to Discrete-Event Simulation Using SimPy (20)
Using Python, the author has developed a program that learns about protocol formats, with the main goal in being useful for Deep Packet Inspection. Deep Packet Inspection is a process mainly used in network security to ensure integrity of network data sent across the network. Deep Packet Inspection is used to pre-empt and prevent malicious data from being transmitted over a network in order to ensure the security of the organization.
http://tw.pycon.org/2015apac/en/lightning_en
This document discusses Python and FreeBSD. It begins with an introduction to FreeBSD, highlighting some of the companies and websites that use it. It then discusses the python@FreeBSD mailing list and resources for using Python on FreeBSD, including installing Python via ports or packages. The document provides guidance on running Python applications and developing Python projects on FreeBSD using tools like virtualenv, ZFS, and jails. It also covers creating Python ports and submitting them to be included in the FreeBSD ports collection.
The document discusses using the zenity command line tool to create graphical interfaces in Python scripts. It introduces UCLTIP, which allows calling command line programs like zenity from Python classes and methods. This provides a simple way to add basic GUIs to scripts without relying on full GUI frameworks. The vsgui module is also mentioned as providing a wrapper that adds syntax sugar for using zenity in Python scripts, such as allowing progress bars to be updated.
This document discusses CyberLink's Koan engine, which is a Python-based UI framework that allows for rapid development of cross-platform applications. The Koan engine provides layout, controls, and rendering capabilities to applications like PowerDVD, PowerCinema, PhotoDirector, and others. It uses Python for its simplicity and flexibility for development, along with C++ for performance critical components, to deliver responsive and smooth user experiences across different operating systems and graphics APIs.
PyKinect: Body Iteration Application Development Using Pythonpycontw
This document summarizes the Kinect for Windows SDK and PyKinect library. It provides an overview of how Kinect works and its hardware specifications. It then discusses the differences between the Kinect for Xbox 360 and Kinect for Windows. The document outlines how to set up and use the Kinect SDK and PyKinect library to access Kinect sensor data like skeleton tracking and depth/video frames in Python. Code examples are provided to get skeleton data and draw skeleton positions.
Azure is a cloud computing platform that allows users to build, deploy and manage applications and services through Microsoft-managed data centers. The document describes how to create a Python project in Azure by first creating a project, adding an Azure cloud service project, and then publishing the project to Azure. It also provides code samples for using the Azure table storage service from Python by initializing a table service instance, creating a table, adding an entity, and querying entities.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive functioning. Exercise boosts blood flow, releases endorphins, and promotes changes in the brain which help enhance one's emotional well-being and mental clarity.
This document discusses Trend Micro STAF (TMSTAF), an automation framework for testing at Trend Micro. TMSTAF is based on STAF, which was created at IBM and open-sourced in 2001. TMSTAF allows for automated testing through test cases written in Python syntax. It features configurable testware, logging, reporting, and integration with build/release processes. The document compares TMSTAF to manual QA testing and outlines how TMSTAF can improve test case creation, environment setup, script development, and quality verification.
PyCon 2012 presented information about Grid job management using Python. The document discussed the Large Hadron Collider (LHC) experiment, the Worldwide LHC Computing Grid (WLCG) which provides computing infrastructure for LHC experiments, and grid computing in general. It then summarized how the Academia Sinica Grid Computing Center (ASGC) uses Python for various tasks like job management, monitoring, and integration of grid and cloud computing as part of its role as a WLCG Tier 1 center and for regional e-science collaborations. Specific Python-based systems discussed included PanDA, GRAB, DIRAC, AliEn, and DIANE.
Small Python Tools for Software Release Engineeringpycontw
The document discusses using Python scripts to automate the provisioning of temporary virtual machines from templates for tasks like software testing using the XenAPI to control XenServer virtualization. It provides code examples for creating a VM from a template, starting it, copying files in, running scripts, and then destroying the VM after use in order to automate volatile computing resources on demand. The scripts allow for non-interactive use by command line options to select templates, preload files, and initialize scripts.
This document discusses the author's background with Python and web development. It mentions that the author started using Python around 2005 and has experience with PHP frameworks like Symfony and CodeIgniter. It also lists the technologies used to build a volunteer matching platform including Django, PostgreSQL, MongoDB, and other Python libraries deployed on AWS.
Panoramic Video in Environmental Monitoring Software Development and Applica...pycontw
This document summarizes a presentation on using panoramic video from a Ladybug3 360-degree spherical camera for environmental monitoring applications. The presentation covers using Python and APIs to access and process Ladybug video, applying techniques like SIFT and OpenCV to match images and derive flow fields, and discusses challenges with GPS data accuracy and developing a method for correcting panoramic image orientation. The goal is to allow analyzing related views across videos for tasks like measuring landslide sizes over time.
那些年 Python 攻佔了 GIS / The Year Python Takes Over GISpycontw
This document discusses the rise of Python in geospatial applications. It explains that Python is increasingly being used for geographic information systems (GIS) due to its ease of use, readable code, large community, and ability to interact with C and Java libraries. It then provides examples of how Python is being used with various geospatial libraries and software, including for visualization, analysis, and web mapping. Python is playing a growing role in both desktop and web-based GIS tools.
Python has been used for web development since the early days of the World Wide Web. It is well suited for building web applications and services due to its batteries included philosophy, large standard library, and support for frameworks like Django and Flask. Python can be used alongside other technologies like HTML, CSS, JavaScript, and databases to create full-featured, robust websites and web applications.
Large-scale Array-oriented Computing with Pythonpycontw
The document discusses the origins and history of large-scale array-oriented computing with Python. It describes how NumPy emerged from earlier Python scientific computing packages like Numeric and Numarray. NumPy provides fast operations on multi-dimensional arrays through vectorization and has become a fundamental tool for scientific computing in Python. The document also outlines ideas for future improvements to NumPy and scientific Python packages through projects like Blaze which aim to provide out-of-core and distributed computing capabilities.
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
Introduction to Discrete-Event Simulation Using SimPy
1. Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang Introduction to Discrete-Event Simulation
jjhuang
Using SimPy
What is
Simulation and
When to Use it?
What is
Discrete-Event
Chun-Chieh Huang
Simulation?
jjhuang
Example to
Illustrate World
Views DSP and Algorithm Design Department
Introduction to Metanoia Communications Inc.
SimPy <jiunjie.huang@gmail.com>
SimPy Example
References June 9, 2012
2. Outline
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang
1 What is Simulation and When to Use it?
jjhuang
What is
Simulation and
2 What is Discrete-Event Simulation?
When to Use it?
What is
Discrete-Event 3 Example to Illustrate World Views
Simulation?
Example to
Illustrate World
Views 4 Introduction to SimPy
Introduction to
SimPy
SimPy Example 5 SimPy Example
References
3. What is Simulation and When to Use it?
Introduction to
Discrete-Event
Simulation
Using SimPy Simulation
Chun-Chieh a computer program that creates a virtual environment
Huang
jjhuang in order to study physical problems
What is
Simulation and
When to Use it?
What is
Discrete-Event
Simulation?
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
4. What is Simulation and When to Use it?
Introduction to
Discrete-Event
Simulation
Using SimPy Simulation
Chun-Chieh a computer program that creates a virtual environment
Huang
jjhuang in order to study physical problems
What is
When to use simulation
Simulation and
When to Use it?
hard to do real experiment,
e.g. battle field, or banking system
What is
Discrete-Event
Simulation?
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
5. What is Simulation and When to Use it?
Introduction to
Discrete-Event
Simulation
Using SimPy Simulation
Chun-Chieh a computer program that creates a virtual environment
Huang
jjhuang in order to study physical problems
What is
When to use simulation
Simulation and
When to Use it?
hard to do real experiment,
e.g. battle field, or banking system
What is
Discrete-Event cheaper to do simulation,
Simulation?
e.g. RTL simulation for IC design,
Example to
Illustrate World or highway/freeway route planning
Views
Introduction to
SimPy
SimPy Example
References
6. What is Simulation and When to Use it?
Introduction to
Discrete-Event
Simulation
Using SimPy Simulation
Chun-Chieh a computer program that creates a virtual environment
Huang
jjhuang in order to study physical problems
What is
When to use simulation
Simulation and
When to Use it?
hard to do real experiment,
e.g. battle field, or banking system
What is
Discrete-Event cheaper to do simulation,
Simulation?
e.g. RTL simulation for IC design,
Example to
Illustrate World or highway/freeway route planning
Views
analyzing bottleneck of current workflow
Introduction to
SimPy
SimPy Example
References
7. What is Simulation and When to Use it?
Introduction to
Discrete-Event
Simulation
Using SimPy Simulation
Chun-Chieh a computer program that creates a virtual environment
Huang
jjhuang in order to study physical problems
What is
When to use simulation
Simulation and
When to Use it?
hard to do real experiment,
e.g. battle field, or banking system
What is
Discrete-Event cheaper to do simulation,
Simulation?
e.g. RTL simulation for IC design,
Example to
Illustrate World or highway/freeway route planning
Views
analyzing bottleneck of current workflow
Introduction to
SimPy When not to use simulation
SimPy Example more expensive to do simulation,
References e.g. simple harmonic motion
8. What is Simulation and When to Use it?
Introduction to
Discrete-Event
Simulation
Using SimPy Simulation
Chun-Chieh a computer program that creates a virtual environment
Huang
jjhuang in order to study physical problems
What is
When to use simulation
Simulation and
When to Use it?
hard to do real experiment,
e.g. battle field, or banking system
What is
Discrete-Event cheaper to do simulation,
Simulation?
e.g. RTL simulation for IC design,
Example to
Illustrate World or highway/freeway route planning
Views
analyzing bottleneck of current workflow
Introduction to
SimPy When not to use simulation
SimPy Example more expensive to do simulation,
References e.g. simple harmonic motion
problems that can be analyzed by pencil and paper
9. Categories of Simulation
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Continuous or discrete
Huang
jjhuang
state variable is continuous, e.g. weather systems
state variable is discrete, e.g. number of customers
What is
Simulation and
When to Use it?
What is
Discrete-Event
Simulation?
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
10. Categories of Simulation
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Continuous or discrete
Huang
jjhuang
state variable is continuous, e.g. weather systems
state variable is discrete, e.g. number of customers
What is
Simulation and Static or dynamic
When to Use it?
Static: represents a system at a particular point of time
What is
Discrete-Event representation of time is unnecessary [1]
Simulation? sometimes called Monte-Carlo simulation [2]
Example to Dynamic: represents systems as they change over time
Illustrate World
Views e.g. banking system from 9:00 AM to 5:00 PM
Introduction to
SimPy
SimPy Example
References
11. Categories of Simulation
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Continuous or discrete
Huang
jjhuang
state variable is continuous, e.g. weather systems
state variable is discrete, e.g. number of customers
What is
Simulation and Static or dynamic
When to Use it?
Static: represents a system at a particular point of time
What is
Discrete-Event representation of time is unnecessary [1]
Simulation? sometimes called Monte-Carlo simulation [2]
Example to Dynamic: represents systems as they change over time
Illustrate World
Views e.g. banking system from 9:00 AM to 5:00 PM
Introduction to
SimPy
Deterministic or stochastic
SimPy Example Deterministic: contains no random variable
References Stochastic: has one or more random variables
12. What is Discrete-Event Simulation?
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang
jjhuang Discrete-Event Simulation is
Discrete
What is
Simulation and Dynamic
When to Use it?
Stochastic
What is
Discrete-Event Simulation for queueing in a post office is DES
Simulation?
Example to
Mostly, but not limited to, queueing systems
Illustrate World
Views
factory work flow
Introduction to
freeway traffic simulation
SimPy network traffic simulation
SimPy Example
References
13. Discrete-Event Simulation World Views
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Activity-oriented
Huang
jjhuang
fixed increment of time
time-consuming
What is
Simulation and
When to Use it?
What is
Discrete-Event
Simulation?
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
14. Discrete-Event Simulation World Views
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Activity-oriented
Huang
jjhuang
fixed increment of time
time-consuming
What is
Simulation and Event-oriented
When to Use it?
on each event, generate next event and
What is
Discrete-Event put into event queue and sort
Simulation?
simulation time advances to next closest event
Example to faster than activity-oriented
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
15. Discrete-Event Simulation World Views
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Activity-oriented
Huang
jjhuang
fixed increment of time
time-consuming
What is
Simulation and Event-oriented
When to Use it?
on each event, generate next event and
What is
Discrete-Event put into event queue and sort
Simulation?
simulation time advances to next closest event
Example to faster than activity-oriented
Illustrate World
Views
Process-oriented
Introduction to
SimPy abstract one object into a process
SimPy Example
easier to maintain in the end
References
16. Discrete-Event Simulation World Views
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Activity-oriented
Huang
jjhuang
fixed increment of time
time-consuming
What is
Simulation and Event-oriented
When to Use it?
on each event, generate next event and
What is
Discrete-Event put into event queue and sort
Simulation?
simulation time advances to next closest event
Example to faster than activity-oriented
Illustrate World
Views
Process-oriented
Introduction to
SimPy abstract one object into a process
SimPy Example
easier to maintain in the end
References
SimPy belongs here!
17. Example to Illustrate World Views
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang
jjhuang
What is
Simulation and Simulating a post office with only one clerk
When to Use it?
Customers come in at random time
What is
Discrete-Event and wait if the clerk is already serving
Simulation?
Example to Clerk serves each customer for a random period of time
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
18. Discrete-Event Simulation World Views
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh Activity-oriented
Huang
jjhuang fixed increment of time
What is
time-consuming
Simulation and
When to Use it?
Event-oriented
What is on each event, generate next event and
Discrete-Event
Simulation?
put into event queue and sort
Example to
simulation time advances to next closest event
Illustrate World faster than activity-oriented
Views
Introduction to
Process-oriented
SimPy
abstract one object into a process
SimPy Example easier to maintain in the end
References
19. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
4
Simulation and
When to Use it?
Simulation starts at 2.0!
What is
Discrete-Event 3
Simulation? Gen 1st arr at 2.6
Example to
Illustrate World 2
Views Check events: 1st arr at 2.6, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
20. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 1st arr at 2.6, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
21. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 1st arr at 2.6, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
22. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 1st arr at 2.6, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
23. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 1st arr at 2.6, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
24. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 1st arr at 2.6, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
25. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 1st arr at 2.6, process now
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
26. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
4
Simulation and
When to Use it?
First arrival!
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
27. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang Calculate service time, end at 4.0
What is
4
Simulation and
When to Use it?
Calculate next arrival at 3.5
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
28. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 2nd arrival at 3.5, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
29. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 2nd arrival at 3.5, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
30. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 2nd arrival at 3.5, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
31. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 2nd arrival at 3.5, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
32. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 2nd arrival at 3.5, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
33. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 2nd arrival at 3.5, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
34. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 2nd arrival at 3.5, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
35. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 2nd arrival at 3.5, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
36. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: 2nd arrival at 3.5, process now
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
37. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
4
Simulation and
When to Use it?
Second arrival!
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
38. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
4
Simulation and
When to Use it?
Calculate next arrival at ...
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
39. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: service end at 4.0, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
40. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: service end at 4.0, no action
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
41. Activity-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views Check events: service end at 4.0, no action...
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
42. Discrete-Event Simulation World Views
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh Activity-oriented
Huang
jjhuang fixed increment of time
time-consuming
What is
Simulation and
When to Use it? Event-oriented
What is on each event, generate next event and
Discrete-Event
Simulation? put into event queue and sort
Example to
simulation time advances to next closest event
Illustrate World faster than activity-oriented
Views
Introduction to Process-oriented
SimPy
abstract one object into a process
SimPy Example
easier to maintain in the end
References
43. Event-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
2.6: 1st arr
Chun-Chieh
Huang 5
jjhuang
What is
4
Simulation and
When to Use it?
Simulation starts!
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
44. Event-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
2.6: 1st arr
Chun-Chieh
Huang 5
jjhuang
What is
4
Simulation and
When to Use it?
First arrival!
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
45. Event-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
3.5: 2nd arr 4.0: 1st arr end
Chun-Chieh
Huang 5
jjhuang Calculate service time, end at 4.0
What is
4
Simulation and
When to Use it?
Calculate next arrival at 3.5
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
46. Event-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
3.5: 2nd arr 4.0: 1st arr end
Chun-Chieh
Huang 5
jjhuang
What is
4
Simulation and
When to Use it?
Second arrival!
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
47. Event-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
4.0: 1st arr end
Chun-Chieh
Huang 5
jjhuang
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
48. Event-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
4.0: 1st arr end
Chun-Chieh
Huang 5
jjhuang End service of 1st arrival.
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
49. Discrete-Event Simulation World Views
Introduction to
Discrete-Event
Simulation
Using SimPy
Activity-oriented
Chun-Chieh
Huang fixed increment of time
jjhuang
time-consuming
What is Event-oriented
Simulation and
When to Use it? on each event, generate next event and
What is put into event queue and sort
Discrete-Event
Simulation? simulation time advances to next closest event
Example to
faster than activity-oriented
Illustrate World
Views Process-oriented
Introduction to abstract one object into a process
SimPy
Arrival process for customers, or A
SimPy Example
Clerk process, or S
References
easier to maintain in the end
50. Process-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang
jjhuang
Arrival is an infinite loop of the following
What is Calculate next arrival time
Simulation and
When to Use it? Sleep until next arrival
What is Add customer into queue
Discrete-Event
Simulation? Clerk is an infinite loop of the following
Example to Sleep until waken up by customers
Illustrate World
Views Serve the customer on waken up
Introduction to until there is no customer in line
SimPy
SimPy Example
References
51. Process-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang A: Gen 1st arr at 2.6
What is
4
Simulation and
When to Use it?
Simulation starts!
What is
Discrete-Event 3
Simulation? S:
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
52. Process-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang A: Add customer to queue
What is
4
Simulation and
When to Use it?
First arrival!
What is
Discrete-Event 3
Simulation? S:
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
53. Process-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang A: Calc next arr at 3.5
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation? S:
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
54. Process-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang A:
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation?
S: Serv, calc serv T at 4.0
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
55. Process-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang A: Add customer to queue
What is
4
Simulation and
When to Use it?
Second arrival!
What is
Discrete-Event 3
Simulation? S:
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
56. Process-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang A: Calc next arr at ...
What is
4
Simulation and
When to Use it?
Calc next arrival at ...
What is
Discrete-Event 3
Simulation? S:
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
57. Process-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang A:
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation? S: 1st arr end serv. Call next.
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
58. Process-Oriented Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation 6
Using SimPy
Chun-Chieh
Huang 5
jjhuang A:
What is
Simulation and
4
When to Use it?
What is
Discrete-Event 3
Simulation? S: Serv 2nd arr. Calc end time at ...
Example to
Illustrate World 2
Views
Introduction to
SimPy 1
SimPy Example
References
0
0 1 2 3 4 5 6 7 8 9
59. Implementing Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh Use your own C/C++ implementation
Huang
jjhuang takes time to write simulation engine and algorithm code
hard to debug when both are not verified
What is
Simulation and not very convincing
When to Use it?
What is
Discrete-Event
Simulation?
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
60. Implementing Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh Use your own C/C++ implementation
Huang
jjhuang takes time to write simulation engine and algorithm code
hard to debug when both are not verified
What is
Simulation and not very convincing
When to Use it?
What is
Use generalized simulation library, or language
Discrete-Event
Simulation?
SIMULA programming language
C++SIM or JavaSIM [3]
Example to
Illustrate World SimEvents in Simulink/MATLAB
Views
SimPy [4]
Introduction to
SimPy
SimPy Example
References
61. Implementing Discrete-Event Simulation
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh Use your own C/C++ implementation
Huang
jjhuang takes time to write simulation engine and algorithm code
hard to debug when both are not verified
What is
Simulation and not very convincing
When to Use it?
What is
Use generalized simulation library, or language
Discrete-Event
Simulation?
SIMULA programming language
C++SIM or JavaSIM [3]
Example to
Illustrate World SimEvents in Simulink/MATLAB
Views
SimPy [4]
Introduction to
SimPy Use special purpose simulation packages
SimPy Example ns-3 for network simulation [5]
References
62. Introduction to SimPy
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh Uses Python for modeling
Huang
jjhuang Python is a scripting language like MATLAB, but faster!
Python is free!
What is
Simulation and Python is very easy to write and beautiful!
When to Use it?
What is
Discrete-Event
Simulation?
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
63. Introduction to SimPy
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh Uses Python for modeling
Huang
jjhuang Python is a scripting language like MATLAB, but faster!
Python is free!
What is
Simulation and Python is very easy to write and beautiful!
When to Use it?
What is
Process-oriented Discrete-Event Simulation Language
Discrete-Event is easier to write model
Simulation?
provides proven event manager implementation
Example to
Illustrate World lets you focus on algorithm code
Views
Introduction to
SimPy
SimPy Example
References
64. Introduction to SimPy
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh Uses Python for modeling
Huang
jjhuang Python is a scripting language like MATLAB, but faster!
Python is free!
What is
Simulation and Python is very easy to write and beautiful!
When to Use it?
What is
Process-oriented Discrete-Event Simulation Language
Discrete-Event is easier to write model
Simulation?
provides proven event manager implementation
Example to
Illustrate World lets you focus on algorithm code
Views
Introduction to
Uses coroutine to suspend/resume process
SimPy guarantees order of execution
SimPy Example cannot run on parallel machine for a single simulation
References
65. SimPy Terminology: Classes
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang
jjhuang
Process
What is simulates an entity which evolves in time, e.g.
Simulation and
When to Use it? a clerk that serves customers
What is
refered to as thread in [6]
Discrete-Event
Simulation?
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
66. SimPy Terminology: Classes
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang
jjhuang
Process
What is simulates an entity which evolves in time, e.g.
Simulation and
When to Use it? a clerk that serves customers
What is
refered to as thread in [6]
Discrete-Event
Simulation? Resource
Example to simulates something to be requested and
Illustrate World
Views queued if not available now
Introduction to
e.g. a wash machine
SimPy
SimPy Example
References
67. SimPy Terimnology: Functions
Introduction to
Discrete-Event
Simulation activate() used to mark a thread as runnable when it is first
Using SimPy
created
Chun-Chieh
Huang
jjhuang
What is
Simulation and
When to Use it?
What is
Discrete-Event
Simulation?
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
68. SimPy Terimnology: Functions
Introduction to
Discrete-Event
Simulation activate() used to mark a thread as runnable when it is first
Using SimPy
created
Chun-Chieh
Huang
jjhuang simulate() starts the simulation
What is
Simulation and
When to Use it?
What is
Discrete-Event
Simulation?
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
69. SimPy Terimnology: Functions
Introduction to
Discrete-Event
Simulation activate() used to mark a thread as runnable when it is first
Using SimPy
created
Chun-Chieh
Huang
jjhuang simulate() starts the simulation
What is
yield hold put current thread into suspension for a certain
Simulation and
When to Use it?
amount of time
What is
Discrete-Event
Simulation?
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
70. SimPy Terimnology: Functions
Introduction to
Discrete-Event
Simulation activate() used to mark a thread as runnable when it is first
Using SimPy
created
Chun-Chieh
Huang
jjhuang simulate() starts the simulation
What is
yield hold put current thread into suspension for a certain
Simulation and
When to Use it?
amount of time
What is yield passivate put current thread into suspension and
Discrete-Event
Simulation? wait until awakened by some other thread
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
71. SimPy Terimnology: Functions
Introduction to
Discrete-Event
Simulation activate() used to mark a thread as runnable when it is first
Using SimPy
created
Chun-Chieh
Huang
jjhuang simulate() starts the simulation
What is
yield hold put current thread into suspension for a certain
Simulation and
When to Use it?
amount of time
What is yield passivate put current thread into suspension and
Discrete-Event
Simulation? wait until awakened by some other thread
Example to
Illustrate World
reactivate() awakes a previously-passivated thread
Views
Introduction to
SimPy
SimPy Example
References
72. SimPy Terimnology: Functions
Introduction to
Discrete-Event
Simulation activate() used to mark a thread as runnable when it is first
Using SimPy
created
Chun-Chieh
Huang
jjhuang simulate() starts the simulation
What is
yield hold put current thread into suspension for a certain
Simulation and
When to Use it?
amount of time
What is yield passivate put current thread into suspension and
Discrete-Event
Simulation? wait until awakened by some other thread
Example to
Illustrate World
reactivate() awakes a previously-passivated thread
Views
cancel() cancels all the events associated with a
Introduction to
SimPy previously-passivated thread
SimPy Example
References
73. SimPy Terimnology: Functions
Introduction to
Discrete-Event
Simulation activate() used to mark a thread as runnable when it is first
Using SimPy
created
Chun-Chieh
Huang
jjhuang simulate() starts the simulation
What is
yield hold put current thread into suspension for a certain
Simulation and
When to Use it?
amount of time
What is yield passivate put current thread into suspension and
Discrete-Event
Simulation? wait until awakened by some other thread
Example to
Illustrate World
reactivate() awakes a previously-passivated thread
Views
cancel() cancels all the events associated with a
Introduction to
SimPy previously-passivated thread
SimPy Example
yield request requests for a given resource
References
yield release used to indicate that current thread no longer need
the given resource
74. SimPy Example
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh Scenario
Huang
jjhuang A post office with only one clerk.
Customer arrival is a poisson process,
What is
Simulation and i.e. inter-arrival time is exponential distribution.
When to Use it?
Service time is also a poisson process.
What is
Discrete-Event Classical M /M /1 problem in queueing theory
Simulation?
Process
Example to
Illustrate World Arrival
Views
Clerk
Introduction to
SimPy Queue is managed by ourselves
SimPy Example So that we can extend to M /M /m later, i.e. m clerks
References
75. Arrival Pseudo Code
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang
jjhuang
What is
Simulation and Arrival is an infinite loop of the following
When to Use it?
Calculate next arrival time
What is
Discrete-Event Sleep until next arrival
Simulation?
Add customer into queue
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
76. Arrival Process
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang
1 class A r r i v a l C l a s s ( Process ) :
jjhuang
2 " " " An a r r i v a l maintenance c l a s s " " "
3 ArrivalRate = 1/1.0 # r e c i p r o c a l o f mean i n t e r a r r i v a l t i m e
What is 4 def _ _ i n i t _ _ ( s e l f , name ) :
Simulation and 5 Process . _ _ i n i t _ _ ( s e l f )
When to Use it? 6 s e l f . name = name
7
What is 8 def Run ( s e l f ) :
Discrete-Event 9 while True :
Simulation? 10 I n t e r A r r i v a l T i m e = G. Rnd . e x p o v a r i a t e ( A r r i v a l C l a s s . A r r i v a l R a t e )
11 y i e l d hold , s e l f , I n t e r A r r i v a l T i m e
Example to
12 C = Customer ( )
Illustrate World
13 C l e r k C l a s s . Queue . append (C) # a customer a r r i v e s
Views
14 G. NumCustomers += 1
Introduction to 15 i f ClerkClass . I d l e != [ ] : # I s t h e r e any c l e r k i d l e ?
SimPy 16 r e a c t i v a t e ( C l e r k C l a s s . I d l e [ 0 ] ) # Yes , wake him / her up
SimPy Example
References
77. Clerk Pseudo Code
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang
jjhuang
What is
Simulation and Clerk is an infinite loop of the following
When to Use it?
Sleep until waken up by customers
What is
Discrete-Event Serve the customer on waken up
Simulation?
until there is no customer in line
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References
78. Clerk Process
Introduction to
Discrete-Event 1 class C l e r k C l a s s ( Process ) :
Simulation 2 " " " A s e r v e r process , o r c l e r k i n t h e p o s t o f f i c e " " "
Using SimPy 3 ServiceRate = 1 / 1 . 2 # r e c i p r o c a l o f mean s e r v i c e t i m e
4 MaxQueueLength = 0
Chun-Chieh 5 Queue = [ ] # customer queue
Huang 6 Idle = [ ] # idle clerk l i s t
jjhuang 7 Busy = [ ] # busy c l e r k l i s t
8 NumDone = 0 # No . o f customers being s e r v i c e d
What is 9 def _ _ i n i t _ _ ( s e l f ) :
Simulation and 10 Process . _ _ i n i t _ _ ( s e l f )
When to Use it? 11 C l e r k C l a s s . I d l e . append ( s e l f ) # I n i t i a l l y idle
12 def Run ( s e l f ) :
What is 13 while True :
Discrete-Event 14 y i e l d passivate , s e l f # w a i t u n t i l awaken by customers
Simulation? 15 C l e r k C l a s s . I d l e . remove ( s e l f )
16 C l e r k C l a s s . Busy . append ( s e l f ) # going t o be busy
Example to 17 while C l e r k C l a s s . Queue ! = [ ] :
Illustrate World 18 i f l e n ( C l e r k C l a s s . Queue ) > C l e r k C l a s s . MaxQueueLength :
Views 19 C l e r k C l a s s . MaxQueueLength = l e n ( C l e r k C l a s s . Queue )
20 C = C l e r k C l a s s . Queue . pop ( ) # c a l l n e x t customer i n l i n e
Introduction to
21 # S t a r t s e r v i c e t h e customer
SimPy
22 ServiceTime = G. Rnd . e x p o v a r i a t e ( C l e r k C l a s s . ServiceRate )
SimPy Example 23 y i e l d hold , s e l f , ServiceTime # s t a r t t o serve
24 C . endService ( ) # end o f s e r v i c e
References 25 G. T o t a l W a i t i n g T i m e += now ( ) − C . A r r i v a l T i m e
26 C l e r k C l a s s . NumDone += 1
27 del C # customer i s gone
28 C l e r k C l a s s . Busy . remove ( s e l f )
29 C l e r k C l a s s . I d l e . append ( s e l f )
79. Simulation Main Loop
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang 1 i f DEBUG:
jjhuang 2 from SimPy . S i m u l a t i o n T r a c e import ∗
3 else :
What is 4 from SimPy . S i m u l a t i o n import ∗
Simulation and 5
When to Use it? 6 def main ( ) :
7 initialize () # I n i t i a l i z e s simulator
What is 8 A = A r r i v a l C l a s s ( name= " A r r i v a l " )
Discrete-Event 9 a c t i v a t e ( A , A . Run ( ) ) # Activate a r r i v a l
Simulation? 10
11 S = C l e r k C l a s s ( name= " C l e r k " )
Example to 12 a c t i v a t e ( S , S . Run ( ) ) # Activate clerk
Illustrate World 13
Views 14 s i m u l a t e ( u n t i l =MaxSimTime ) # S t a r t to simulate !
15
Introduction to 16 i f __name__ == ’ __main__ ’ :
SimPy 17 main ( )
SimPy Example
References
80. Concluding Remarks
Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang
jjhuang
What is Simulation is a powerful tool to study physical problems at
Simulation and
When to Use it? cheaper cost.
What is
Discrete-Event
SimPy provides process-oriendted DES framework
Simulation? to write simulation easily and reasonably fast.
Example to
Illustrate World And SimPy is free!
Views
Introduction to
SimPy
SimPy Example
References
81. References
Introduction to
Discrete-Event
Simulation
Using SimPy [1] R. E. Nance, “A history of discrete event simulation
Chun-Chieh programming languages,” in The second ACM SIGPLAN
Huang
jjhuang conference on History of programming languages, ser.
HOPL-II. New York, NY, USA: ACM, 1993, pp. 149–175.
What is
Simulation and [Online]. Available: http://doi.acm.org/10.1145/154766.155368
When to Use it?
What is [2] J. Banks, J. S. Carson, B. L. Nelson, and D. M. Nicol,
Discrete-Event
Simulation? Discrete-Event System Simulation (5th Edition). Prentice
Example to Hall, 2009.
Illustrate World
Views [3] C++SIM and JavaSim, “http://javasim.codehaus.org/.”
Introduction to
SimPy [4] S. S. Package, “http://simpy.sourceforge.net/.”
SimPy Example
[5] ns-3 Network Simulator, “http://www.nsnam.org/.”
References
[6] N. Matloff, “A discrete-event simulation course based on the
simpy language,” Davis, 2006.
82. Introduction to
Discrete-Event
Simulation
Using SimPy
Chun-Chieh
Huang
jjhuang
What is
Simulation and
When to Use it?
What is
Discrete-Event
Simulation?
Q&A
Example to
Illustrate World
Views
Introduction to
SimPy
SimPy Example
References