Dynamic control of Storage queueing discipline
Greetings. I am unaware of any method of directly controlling whether a Storage is FIFO or uses a Label to prioritize (e.g. switching a Storage from one discipline to the other during a run) via Visual Logic. I am pessimistic that such a method exists because none of the 18 Properties of a Storage accessible to a VL Set statement seem to pertain to which discipline to use (but I am undertaking an investigation of this possibility). Hence, I suggest the following approach: (1) Create the Storage and set it to prioritize incoming work items by Label X. (2) Create an Information Store Y and arrange that if it equals 1, the Storage should prioritize by label X, but if it equals 2, the Storage should use FIFO discipline. Y can then be changed by VL as desired to specify or switch the discipline the Storage will use. (3) When work items enter the model, set their label Arrived to the current simulation time. (4) Just before work items arrive at the Storage, they should execute VL which checks the value of Y. (4a) If Y = 1, set X to the urgency the work item should have, which is presumably in some other Label of the work item. (4b) If Y = 2, set X to 100000-Arrived (where 100000 represents a number longer than the simulation running time in time units used). Then, the earlier a work item arrived, the larger Y will be, as desired for mimicking FIFO discipline. (For LIFO, set X to Arrived without the subtraction.) Hope this helps!
__________________
E. Williams, PMC
|