1 / 10

Day 4

Day 4. Section 7 - Simulation Control User Interface Forms Efficiency Monitoring User-Defined Distributions Interrupting and Suspending Processes Exercise 7 Section 8 - Process Activation Externally Activated Processes Exercise 8. F. Section 8 - Process Activation.

kitty
Download Presentation

Day 4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Day 4 • Section 7 - Simulation Control • User Interface Forms • Efficiency • Monitoring • User-Defined Distributions • Interrupting and Suspending Processes • Exercise 7 • Section 8 - Process Activation • Externally Activated Processes • Exercise 8 F —————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— 8-1

  2. Section 8 - Process Activation Part 1 - Externally Activated Processes —————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— 8-2

  3. Externally Activated Processes • We have activated all processes internally according to some rule • Activated the process by giving it a name and a time Processes include SHIP Activate a SHIP now • Frequently we want to activate processes at arbitrary times Have a given schedule (Official Airline Guide) Show results of large simulations graphically Testing • We want to activate processes externally as well as internally. —————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— 8-3

  4. Externally Activated Processes (continued) • Do it about the same as an internally activated event except activation data goes in a file, not a routine Preamble External processes include STORM External process unit is 10 End ''Preamble • In another routine Open unit 10 for input, name = “WEATHER.DAT” • New routine Process STORM <statements> End ''STORM • Data file for activation STORM 23.35 * STORM 29.2 * STORM 45.6 * —————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— 8-4

  5. Externally Activated Processes (continued) Process STORM Define .LATITUDE, .LONGITUDE, .DURATION as real variables Read .LATITUDE, .LONGITUDE and .DURATION <statements> End ''STORM STORM 23.35 55.6 140.0 5 * STORM 29.2 58.3 160.0 0.7 * STORM 45.6 52.1 154.0 2 * —————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— 8-5

  6. Externally Activated Processes (continued) • Time phrase can be shown in one of three ways • Decimal days: STORM 23.35 * • Days, hours and minutes: STORM 23 8 30 * • Calendar days, hours and minutes: STORM 1/24/2005 8 30 * • In the last case, we have to tell SIMSCRIPT II.5 what the date of the "zeroth" day is: Call origin.r (1, 1, 2005) —————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— 8-6

  7. Exercise 8 Port Problem, One Last Time(!) C:\Program Files\Simscript3\models\ProblemD —————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— 8-7

  8. Pacific Port Problem Reprise • As a final addition to the Pacific Port Problem, consider the fact that weather conditions occasionally serve to disrupt shipping operations. Storms occur at arbitrary times and prevent all ships (both old and new) from leaving the harbor and delay the new ships at sea. The durations of the storms are to be supplied with their scheduling data in an external data file. • Produce the same performance measures as before. • In order to make the simulation model more user-friendly for the Harbor Master, modify the user interface form (PROBLEM D) so that the RUN.LENGTH, NBR.DOCKS, NBR.TUGS, and NBR.NEW.SHIPS can be easily modified when the simulation is executed. SELECT PROBLEMD —————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— 8-8

  9. WEATHER.DAT Storm 1/2/2005 8 00 10 * Storm 1/25/2005 9 00 1 * Storm 2/13/2005 10 00 5 * Storm 6/26/2005 12 00 2 * Storm 7/5/2005 14 00 1 * Storm 7/14/2005 18 34 2 * Storm 12/12/2005 07 41 3 * —————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— 8-9

  10. NOTES • To identify the new ships and the old ships as well as the ships that are "at sea", give the ships attributes such as: EVERY SHIP has a SHIP.TYPE and a SHIP.STATUS and belongs to a FLEET • File the new ships in a FLEET when they are generated so that the STORM process routine can find the ships and interrupt them. • You must assign the status attribute of each ship in the appropriate place in order not to interrupt ships that are not in the event set!! • Write a STORM process routine that searches the set FLEET and interrupts the appropriate ships. —————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— 8-10

More Related