computer simulation modeling
play

Computer Simulation Modeling Jonathan Thaler Department of - PowerPoint PPT Presentation

Computer Simulation Modeling Jonathan Thaler Department of Computer Science 1 / 61 Modeling Modeling Modeling is the process of abstraction of a simulation model from the part of the real world it is representing. However, there are an


  1. Computer Simulation Modeling Jonathan Thaler Department of Computer Science 1 / 61

  2. Modeling Modeling Modeling is the process of abstraction of a simulation model from the part of the real world it is representing. However, there are an infinite number of models that could be selected within a given range. The art of modeling is to choose the right model for a given purpose by including only the necessary details and to make the right simplifications . The goal is to build the simplest model possible to meet the objectives of the simulation study. 2 / 61

  3. Modeling Figure: Simulation modeling process. 3 / 61

  4. Modeling 1. Objectives : know the model purpose to create an appropriate simplification. 2. Inputs and Outputs : inputs define the experimental factors which can be adjusted, the output are statistics giving answers. 3. Scope and Level of Detail : defines the boundaries of what to include and what to leave out (more importantly!). 4. Assumptions : incorporate uncertainties about the real world. 5. Simplifications : for reducing complexity are necessary. 4 / 61

  5. Modeling Model Correspondence and Validity The degree of correspondence between the computer model and the real world depends on the degree to which the model contains assumptions that are correct, the simplifications maintain the accuracy of the model, and the model design and computer code are free of errors . 5 / 61

  6. Modeling 1. Understanding the problem situation. 2. Determining the modelling and general project objectives. 3. Identifying the model outputs (responses). 4. Identifying the model inputs (experimental factors). 5. Determining the model content (scope and level of detail), identifying any assumptions and simplifications. Figure: Modeling Framework 6 / 61

  7. Modeling Model Simplification Model simplification involves reducing the scope and level of detail in a model. Reduced Scope: removing components and interconnections that have little effect on model accuracy. Reduced Level of Detail: representing more simply components and interconnections while maintaining a satisfactory level of model accuracy. The most effective approach is to start with the simplest model possible and to gradually add to its scope and level of detail. 7 / 61

  8. Modeling Simplifications Excluding Components and Details omit components which have little effect on accuracy, e.g. birth and death dynamics and public transport in Covasim. Aggregation of Model Components : representing an operation as black box using a time-delay; grouping of entitites e.g. dynamic scaling in Covasim by aggregating infected. Replacing Components with Random Variables : sample from a random distribution instead of fully modeling for certain emergent properties e.g. making contact in Covasim. Excluding Infrequent Events e.g. birth and death dynamics in Covasim. 8 / 61

  9. Modeling How to build Agent-Based Models 1 1 From The Big Book of Simulation Modeling by Andrei Borshchev. 9 / 61

  10. Agent-Based Modeling Agent-Based Modeling Identify which objects of the real system are important for solving the problem and create those same objects in the model. Think of the behaviour in the model. Is supposed to be easier than SD or DES. No need to assume a highly abstract top-down view such as in SD; or to always think in terms of processes as in DES. 10 / 61

  11. Agent-Based Modeling To build an ABM, the following questions need to be answered: 1. Which objects in the real system are important? These will be agents . 2. Are there any persistent relationships between the real objects? These will make up the connections between the agents. 3. Is space important? E.g. are the agents situated in 2D, 3D, discrete,... 4. Identify important events in agents’ life. They may be triggered from outside or internally by the agent’s behaviour. 11 / 61

  12. Agent-Based Modeling 5. Define the agents’ behaviour: 1. Does the agent just react to the external events ? Use message handling and function calls. 2. Does the agent have a notion of state ? Use a statechart . 3. Does the agent have internal timing ? Use events or timeout transitions . 4. Is there any process inside the agents? Draw a process flowchart . 5. Are there continuous-time dynamics ? Use SD inside the agent. 12 / 61

  13. Agent-Based Modeling 6. Do agents communicate ? Use message sequence diagrams to design communication / timing patterns. 7. What information does the agent keep? This will be the memory / state of the agent. Use variables and statechart states. 8. Is there any information / dynamics, external to all agents and shared by all agents? This is the environment . 9. What output are you looking for? Define the statistics at individual an aggregate level. 13 / 61

  14. Field Service Example 14 / 61

  15. Field Service Example Problem Statement A fleet of equiement units (in this example: wind turbines) are distributed geographically within a certain area. Each equipment unit generates revenue while it is working. However, it sometimes breaks down and needs to be repaired or replaced. Maintenance is due every maintenance period. Late maintenance, as well as advanced age, increase the probability of failure. The service system consists of a number of service crews that are based in a single central, or ”home” location. When a service or maintenance request is received by the service system, one of the crews takes it, drives to the equipment in question, and performs the required work. During the failure examination, it may turn out that the equipment cannot be repaired, in which case it is replaced. If already due, any currently scheduled maintenance is done after the repair, within the same visit. (The service crew also replace aged equipment even if it is still working, subject to the replacement policy). Having finished the work, the service crew may take another request and drive to the next unit location, or, if there are no requests, return home. 15 / 61

  16. Field Service Example The goal is to find the number of service crews and the replacement policy, that results in maximum profit for the equipment fleet. 16 / 61

  17. Field Service Example Phase 1: Who are the agents? What objects in the real system do we observe and are interested in. 17 / 61

  18. Who are the Agents? Figure: Agents in the field service model. 18 / 61

  19. Equipment Unit Agent Figure: Refining the states of the Equipment Unit Agent. 19 / 61

  20. Equipment Unit Agent Figure: Transitions of Equipment Unit Agent. 20 / 61

  21. Equipment Unit Agent Figure: Transition triggers of Equipment Unit Agent. 21 / 61

  22. Service Crew Agent Figure: Initial states of the Service Crew Agent. 22 / 61

  23. Service Crew Agent Figure: Refined states and transitions of the Service Crew Agent. 23 / 61

  24. Service Crew Agent Figure: Refined states, transitions and triggers of the Service Crew Agent. 24 / 61

  25. Service Crew Agent Figure: Refined states, transitions and triggers of the Service Crew Agent. A composite state is a group of states that have some common behaviour - for example, the same reactions to events, or common timeouts. 25 / 61

  26. Field Service Example Agent Communication Use message sequence diagrams to design communication / timing patterns. 26 / 61

  27. Agent Communication Communication instances of the equipment units and service crews: 1. Service crew arrival : a message from a service crew to an equipment unit. 2. Finished : a message from an equipment unit to the service crew. 3. Check if there are requests : A message from a ”central dispatcher” to all service crews. 27 / 61

  28. Agent Communication Figure: Message sequence diagram, version 1. It is unclear who initiates the sequence. 28 / 61

  29. Agent Communication Figure: Message sequence diagram, version 2. 29 / 61

  30. Agent Communication Figure: Message sequence diagram with two service crews. Dispatcher event notification to the service crews happens conceptually simultaneously , but ordered . Therefore only one the first crew answering the call will take the maintenance / repair task. 30 / 61

  31. Agent Communication Communication of the equipment unit with the agent service crew. To establish a temporary link between agents, you can either call the agent’s function connectTo() or simply remember a reference to another agent in a variable . The advantage of a variable is that we can explicitly specify the type of another agent and can identify the kind of relation in case there are many (like best friend, parent, colleagues). Don’t forget to delete the reference (set the variable to null ) when the releation- ship ceases to exist. 31 / 61

  32. Agent Communication 32 / 61

  33. Field Service Example Global Parts Information, external to all agents and shared by all agents. 33 / 61

  34. Environment Assumptions & Simplifications Uniform randomly distributed equipment units. No road map, driving in straight. Service crew drives on average 500 miles in 24 hours. 34 / 61

  35. Queue and Dispatcher Another global part is the request queue and its dispatcher. Nature of the Dispatcher Is the dispatcher passive or active? Does it have state or timing? It simply inserts a message in a queue and immediately broadcasts the notification to all service crews. Stimulus and immediate response without any state or timing. A simple function call suffices. 35 / 61

  36. Queue and Dispatcher Figure: The queue of service requests and the service dispatcher. 36 / 61

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend