home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Demos / Extend 3.0 Demo / Extend Demo / Extend Demo.rsrc / HELP_261_ ModL System & Global Variables < prev    next >
Encoding:
Text File  |  1994-07-14  |  3.8 KB  |  64 lines

  1. System, Global, and System Global variables are valid in any block in a model.
  2.  
  3. • System variables give you information about the state of the simulation. These variables are declared by Extend and can be viewed or modified by any block. You can read or write to these variables, but you should be very careful when writing to any of them.
  4.  
  5. • Global variables are useful for passing information between your blocks.
  6.  
  7. • System global variables begin with "Sys", are used in the Discrete Event library, and should only be used in the same context as they are used in that library. You may use the System Global variables to create your own discrete event blocks.
  8.  
  9. The System Variables are (in alphabetical order):
  10. • AnimationOn
  11. Tells the state of the Show Animation command from the Run menu. If it is checked, AnimationOn is 1, otherwise it is 0.
  12.  
  13. • CurrentSim
  14. Current simulation number. Its value starts at 0 and increments each step up to NumSims-1.  It only has a non-zero value if you set the "Number of runs" option in the Simulation Setup dialog to a value greater than 1. Use this variable in batch or Monte-Carlo simulations to select new input data sets and store data from multiple simulations into an array.
  15.  
  16. • CurrentStep
  17. The integer current step number during a simulation.  In a continuous simulation, its value starts at 0 and increments each step up to and including NumSteps-1.   In a discrete event simulation, the value starts at 0 and increments with each event. It is useful as an array subscript.
  18.  
  19. • CurrentSense
  20. Used by sensitivity analysis to change parameter values. It will have the same value as CurrentSim unless the user changes it to alter the mode of sensitivity analysis.
  21.  
  22. • CurrentTime
  23. The current simulation time during a simulation. In a continuous simulation, its value starts at StartTime and increments at DeltaTime for each step in the simulation. In a discrete event simulation, the Executive block in the Discrete Event library changes the CurrentTime system variable only when processing an event.
  24.  
  25. • DeltaTime
  26. The time increment per step, as initialized in the Simulation Setup dialog. It has no meaning in a discrete event simulation.
  27.  
  28. • EndTime
  29. The ending time of a simulation, set in the Simulation Setup dialog.
  30.  
  31. • MovieOn
  32. Tells the state of the Show Movies command from the Run menu. If it is checked, MovieOn is 1, otherwise it is 0.
  33.  
  34. • NumSims
  35. Number of times the simulation will be repeated. This variable can be used in the script to determine the total number of simulations run, as entered in the Simulation Setup dialog.
  36.  
  37. • NumSteps
  38. The total number of steps that will be executed during a continuous simulation. NumSteps is the number of steps entered in the Simulation Setup dialog. It has no meaning in a discrete event simulation.
  39.  
  40. • RandomSeed
  41. Sequence number used to initialize the random numbers generator; it is set in the Simulation Setup dialog. When debugging a simulation, it is sometimes necessary to force the random number generator to produce a repeatable sequence of pseudo-random numbers.
  42.  
  43. • SimDelay
  44. Simulation order. 0 is Left to right, 2 is Flow order.
  45.  
  46. • SimMode
  47. This variable can be used in the script to determine whether the user chose the Autostep Fast, Autostep Slow, or Manual simulation mode in the Simulation dialog box.  It equals 0 for Manual, 1 for Autostep Fast, or 2 for Autostep Slow, as specified in the Simulation Setup dialog.
  48.  
  49. • StartTime
  50. The starting time of a simulation at step zero, set in the Simulation Setup dialog.
  51.  
  52. The Global Variables are (in alphabetical order):
  53. • Global0...Global19 // real
  54.  
  55. • GlobalInt0...GlobalInt9 // integer
  56.  
  57. • GlobalStr0...GlobalStr9 // string
  58.  
  59. The System Global Variables are (in alphabetical order):
  60. • SysGlobal0...SysGlobal9 // real
  61.  
  62. • SysGlobalInt0...SysGlobalInt19 // integer
  63.  
  64. • SysGlobalStr0...SysGlobalStr9 // string