Skip to content

Batch by Name of Entity

LegacyHow this worked in the previous version

When processing multiple entity names simultaneously and require batches segregated by the entity name. When the batch size changes based on the entity name.

Batch by Name of Entity

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

  • Batching - Batch by Name of Entity
  • Open Your Model: Open your model or create a new blank model.

  • Insert the Model Object into Your Model

  • Locate the model object Batch by Name of Entity and select the insert button.

  • 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.

  • Connect to Your Model

  • Connect from **your **model to Stage for Batching1.

Batch by Name of Entity

  • Connect from Batch by Name of Entity1 to the remainder of your model.

Batch by Name of Entity

  • Define Values

  • Enter the name of the entity(s) to be batched in the Default Value field of the Scenario Parameters dialog. Enter one entity name per scenario parameter as shown below:

Batch by Name of Entity

  • Change the s_BatchSize# scenario parameters to match your desired batch sizes.

Batch by Name of Entity

  • Completion: The model object is now integrated into your model, you should now be able to save and then simulate the model.
  • a_Batch: This holds the batch size for each entity type when it leaves the Stage For Batching1
  • v_EntityNameCnt#: Counters which track the number of each entity type entering “Stage For Batching1” until each count has reached its designated batch size.
  • s_BatchSize#: The target batch size for each entity type.

  • s_EntityName#: The names of each entity.

How Do I Add More Entity Types to the Batch?

Section titled “How Do I Add More Entity Types to the Batch?”

If you need to add more entity types to batch:

  • Create a s_BatchSize# scenario parameter for each new batch size

Batch by Name of Entity

  • Create a s_EntityName# scenario parameter for each additional entity name

  • Create a v_EntityNameCnt# variable for each new type.

  • Add a new “Else / {…}” block of action logic in Stage For Batching1 for each new entity type

For a fast way to make these edits, copy and paste the block of text, then highlight the newly pasted section and use the replace in selection button to change all the numbers from 3 to 4 in one action.