Академический Документы
Профессиональный Документы
Культура Документы
I would like to make an additional server active whenever the current servers have a certain number of entities
waiting. In other words, there are multiple servers and if any server with capacity reaches a maximum input
buffer level, I want to open a new server.
Categories:
Buffering, Decision Logic -- Processing
Key Concepts:
AssociatedStationLoad, Active Symbol, Add-On Process, Assign Step, Condition Based, Contents, Current Capacity,
Decide Step, InProcess, InputBuffer, Load, Monitor, NodeList, On Exited, Processing, Status Label
Assumption:
Assume that capacity can be added instantaneously with no set-up/transition time.
Technical Approach:
We want the maximum number of entities in a servers input buffer to be six. When a seventh entity arrives, a
new server should come on-line or be activated. There are monitors that watch all the Server Input Buffers and
when the seventh entity arrives, an event is fired that triggers a process to change the server capacities. When the
server has completed processing, capacity is reduced to zero again until it is needed in the future.
o For the first assignment, set the State Variable Name to a6.CurrentCapacity and the New Value
to (Input@a6.AssociatedStationLoad > 0 || ((a1.Capacity > 0) && (a2.Capacity > 0) &&
(a3.Capacity > 0) && (a4.Capacity > 0) && (a5.Capacity > 0)))
o Add another assignment: State Variable Name is a5.CurrentCapacity and New Value is
(Input@a5.AssociatedStationLoad > 0 || ((a1.Capacity > 0) && (a2.Capacity > 0) && (a3.Capacity
> 0) && (a4.Capacity > 0)))
o Similarly, add: State Variable Name a4.CurrentCapacity with New Value
(Input@a4.AssociatedStationLoad > 0 || ((a1.Capacity > 0) && (a2.Capacity > 0) && (a3.Capacity
> 0)))
o And finally: State Variable Name a3.CurrentCapacity and New Value
(Input@a3.AssociatedStationLoad > 0 || ((a1.Capacity > 0) && (a2.Capacity > 0)))
These expressions are checking 2 things: (1) If it is processing an Entity, an Entity is waiting to be
processed, or an Entity is routing to be processed, then let it remain operating OR (2) all the Servers
before that one are working. Because we used a logical expression it will return a 1 if true, and a 0 if false
which is what we want to set our Capacities to.
Note: It is important that these expressions are in this exact order - descending order. Otherwise, the
logic will not evaluate correctly.
Now that the Process has been created, we have to trigger it this is done back in the Monitor Element.
From the Definitions window, set the On Change Detected Process to UpdateServerCapacities for each
Monitor element. Therefore, once the Monitor is triggered (i.e. when the seventh Entity arrives) it will
fire this process, which checks all of the conditions and then sets the capacities accordingly.
Decreasing Capacities:
From within the Facility window, create a process in a3s Exited Add-On Process Trigger
From the Processes window, place a Decide step in this new process. Set Decide Type to ConditionBased
and Expression to Input@a3.AssociatedStationLoad == 0.
On the True segment, place an Assign step. Set the State Variable Name to a3.CurrentCapacity and leave
the New Value 0.0.
This process will check to see if there are any entities processing, waiting to be processed, and routing to
the server for processing. If there are not, then it assigns the Servers capacity to 0.
Repeat this for Servers a4, a5, and a6.