Send
General Action Statement
The Send statement moves a specified number of a particular Entity to a designated Location. Use the Send statement to simulate a model based on demand rather than Entity arrivals. Entities must be waiting at a Location with an If Send Routing Rule.
Syntax
Send <expression> <entity name> TO <destination>{,<priority>}
Syntax Examples
Send 2 EntA TO Loc2
Send 1 Grp_A TO Grp_A_Processing, 10
Parameters
<expression>
The amount of a particular Entity to send. Negative values generate an error message.
<entity name>
The Entity type to send. You may substitute Ent() for an Entity name.
<destination>
The Location name where the Entities travel to. You may substitute Loc() for the Location name.
{,<priority>}
An optional statement part that defines the priority the requesting Entity is in regards to how quickly it receives the requested Entities. This value must be a number between 1 and 999. Requesting Entities with a higher number in the priority field receive their requests before those with a lower number. If the priority field is left blank for all requesting Entities, they receive their requested Entities on a first come, first served basis.
Parameter Examples
Suppose a model simulates a restaurant serving hamburgers. Rather than having Hamburger Entities arrive in your model at specified times, you want the Hamburger Entities to wait in the freezer until customers come in to request them. To achieve this result, connect the Freezer Location where the Hamburgers are waiting to the Stove Location using a Route with the If Send Routing Rule. This rule causes the Hamburgers to wait in the Freezer until a Send statement is executed for them somewhere else in the model. Define the statement...
Send Hamburger To Stove
...in the FrontDesk Location Logic. This way, every time a Customer Entity enters the FrontDesk Location to order a Hamburger, a Hamburger Entity moves from the Freezer to the Stove and starts cooking.
Now, let's say that your Hamburger restaurant expands, so instead of having a single FrontDesk Location where Customers order, you have multiple Cash Register Locations: Register1, Register2, and Register3. You noticed that Register1 is always the busiest, so you want to make sure that Hamburgers are always prepared for the Customers at Register1 first. To achieve this result, define the statement...
Send Hamburger To Stove, 2
...in the Register1 Logic, and the statement...
Send Hamburger To Stove, 1
...in the Register2 and Register3 Logic. The priority field value ensures that when multiple Register Locations are requesting Hamburger Entities to be sent to the Stove Location, the requests of Register1 are fulfilled first.
Remarks
If multiple Send statements are executed that trigger the sending of Entities to the same Location, the order in which the Entities are ultimately sent could vary depending on the available capacity of that destination Location. When the destination Location has available capacity, the order in which the Entities are sent is the order the Send statements are executed. However, if the destination Location does not have available capacity, those Entities queue up based upon their current Location's Queuing for Output rule (default is No Queuing). Then, when capacity at the destination Location becomes available, it uses its own Selecting Incoming Entities rule (default is Oldest By Priority) to choose the next Entity that routes to it. So if the sending Location Queuing for Output rule is No Queuing and the destination Location Selecting Incoming Entity rule is Oldest by Priority, the Entities route to the destination Location based upon the order in which they enter the Location output queue and not the original send statement order.