Hold an Entity Until All Created Entities Are Offloaded

When you’re in a situation where you have entities (Ex: Aircraft or a truck), that you want to stay at a process (Loading/Off-loading dock) until the entities created (Ex: Pallets/Goods) are offloaded from it.

Hold an Entity Until All Created Entities Are Offloaded model image

Where to Find the Model Object

The following model object can be found in the model objects directory:

  • Flow Control \ Hold an Entity Until All Created Entities Are Offloaded

Difficulty Level

  • Ease of Use: Moderate
  • Ease of Modification: Moderate

How to Use the Model Object

  1. Open Your Model: Open your model or create a new blank model.
  2. Insert the Model Object into Your Model
    1. Locate the model object Hold an Entity Until All Created Entities Are Offloaded and select the insert button.
    2. Move the cursor to the point of insertion and left mouse-click. The upper left corner of the model object will be inserted at the location of the mouse-click.
  3. Connect to Your Model
    1. Connect all the routes leaving the Unload# to where the items will go.from Hold an Entity Until All Created Entities Are Offloaded to your model
    2. Connect the route leaving the Check out to where the main entities (ex: truck/aircraft) will go.from Hold an Entity Until All Created Entities Are Offloaded to your model 1
  4. Update Objects
    1. Click on the arrival arrow and change the pattern to your situation.

      Arrival Pattern is set as a Daily pattern. You must enter your arrival times.change arrival in Hold an Entity Until

    2. Select and delete any docks that you don’t need or add as required.

      You must erase the unnecessary docks, or add more if required. See Advance Topics below for more information.

      If you erase any docks, you must change the v_gate number.change var value in Hold an Entity Until

    3. In the Assign Dock change the distribution to the number of pallets or items that you will be unloading from the Entities (ex: truck/aircraft).change dist in Hold an Entity Until
    4. Rename Item2 to your desired name or remove Item2 and add your own.

      Incase Item2 is removed every input route (to unload activities) ‘create’ field must be changed to show the new entity.

    5. Change time values in each of the Unload#.change time val in Hold an Entity Until
    6. Change the transfer times. The routes going too and from the docks.change trasnfer time in Hold an Entity Until All
  5. Define Values: Define the initial value variable v_gate, in the Initial Value box change number to the number of docks you will be using.change var value in Hold an Entity Until
  6. Completion: The model object is now integrated into your model, you should now be able to save and then simulate the model.

Controls Usage

Attributes:

  1. a_pal: Do not change. This is the number of Pallets/Goods or items that you will be unloading.

Variables:

  1. v_gate: User input required. This is the gate that allows the trucks/aircraft to enter into the Assign dock.
  2. v_gate#: Do not change. These are the gates that allow the trucks to leave the docks after all of the Items have been unloaded.

Advance Topics

How Do I Build This Model Object from Start?

  1. Add a new variable (v_gate6) to the model.
  2. Following the pattern of the first five docks add two processes (Ex: Dock six & unload6).
  3. Connect the incoming route of the process (Dock six) from the incoming route of the above dock (Dock five) as is done between dock three and dock four.
  4. Connect the first process (Dock six) to the second process (Unload6) that was added.
  5. Make the incoming route to first process (Dock six) conditional and copy the condition from above appropriately.
  6. Add action logic to first process (Dock six) and to the route that connects it to the second process (Unload6) changing the create & quantity appropriately.

How Do I Build This Model Object from Start?

Declare attributes & variables as suggested on the right hand side under the notes. Insert two storage as done above. Add two processes for every unloading dock you want, one for docking the entity (Ex: Aircraft/Trucks) and the other for unloading of sub entities (Ex: Pallets/Goods), from the docking stations there will be two routes one will exit the main entity (Ex: Truck/Aircraft) to where ever its required further and the other will be a ‘create’ route that will lead to the unload process (Mentioned above). Once the objects have been added you will need to code in the action logic.

At the start where your entity will enter into the second storage of the unloading process (Ex: Assign dock), you will need to use a ‘wait’ statement with a variable to hold extra entities from going forward into the model if all the docks specified are full (In the above example we are using 5 docks) you will decrement the same variable as every time so that the wait statements reaches the point where it no longer sends entities forward when all the docks are full. Use an attribute (Ex: A_pal) in the last storage (Of two) to assign the number of sub entities (Pallets/Goods) needed to be delivered by each entity (Aircraft/Truck) coming in, you can use whatever distribution you want here or hard-code the number of offloads for each entity (Aircraft/Truck).

Next using the numbered gate variable (Ex: V_gate1, v_gate2 etc) assign the value of the attribute (Ex: A_pal) to the variable (Ex: V_gate1 = a_pal) so that we can set the quantity of sub entities (Pallets/Goods) that need to be off-loaded. In the docking station use the variable (Ex: V_gate1) with a ‘while do’ statement to have the entity (Truck/Aircraft) wait in the off-loading dock, set the time you want the entity to wait after the offloading before exiting. Use a ‘create’ route with quantity set as the attribute (Ex: A_pal) make a connection the second process (Unload1) in the action logic decrement the numbered gate (Ex: V_gate1) so that the original entity (Aircraft/Truck) can leave the dock process. From the exiting route of the dock (From where the original entity will exit) decrement the original gate (Ex: V_gate) so that a new entity (Aircraft/Truck) can enter a dock.

Do the above paragraph multiple times to add multiple docks.

Was this article helpful?

Related Articles

Go to Top