Using Each and All

In some cases, you have a choice in how to apply the group during model running or expansion:

  • Each – Each member defined in the group will be expanded while running the model.
  • All – All the group members are locked into one ‘node’.

For columns that support Each and All, the selection is available under the Apply to: column in the drop down list of values:

Each

When “Each” is selected as the method to apply the group, each member defined in the group will be expanded while running the model. For example, you have a group of 100 DCs. When this group is used to define a Site Sourcing Policy, the same sourcing policy is applied to all 100 DCs when the model is run or expanded.

“Each” is the default method for applying groups.

All

When “All” is selected as the method to apply the group, all the group members are locked into one ‘node’. This group type is typically used when applying constraints in the constraints tables.

For example, assume you have 20 potential distribution centers and only 10 can be open and operating. You define a group with the 20 distribution centers as members. You then define a Site Constraint to open only 10 of the possible sites. Use the group of distribution centers you created and select “All” as the method to apply.

In Simulation, there may be 100 "Frozen" products that require a "Frozen" mode of transportation. Define a group of the 100 products and use that group name in the Product Name field of the Transportation Policies table, using "All" as the method. This allows all 100 products to be routed together.

In addition, this function is also used for Product substitution.

Controlling Each and All in the model database

While you can set Each vs. All within the Supply Chain Guru X user interface, these values actually populate columns that are not directly exposed in the interface. If you need to control these values outside the Supply Chain Guru X user interface, you will need to populate the related columns in the model database.

For every column that allows you to select Each or All, there is a corresponding "CollectionBasis" column in the database table. The values in the collection basis columns are defined as follows:

  • If the value set in the UI is "Each", the value in the collection basis column is "Group"
  • If the value set in the UI is "All", the value in the collection basis column is "Set"

For example, in the Flow Constraints table, assume the following column values (this is a subset of the columns in Flow Constraints):

Expression Period Source Destination Product
EachDC (ALL_Periods) (All) All DCs (Each) (ALL_Customers) (All) Finished Goods (All)

In the model database, the AggregateFlowConstraints table would have the columns that hold the actual Period, Source and other column values:

ExpressionName PeriodName SourceSite DestinationSite ProductName
EachDC (ALL_Periods) All DCs (ALL_Customers) Finished Goods

The table also has the corresponding CollectionBasis columns and values based on this record definition:

CollectionBasisPeriodName CollectionBasisSourceSite CollectionBasisDestinationSite CollectionBasisProductName
Set Group Set Set

If you want to define a value with the associated "Each" or "All" values, you must break it into the two component columns - the group or filter name in the regular column and the Group or Set designation in the associated collection basis column.

Last modified: Wednesday May 15, 2024

Is this useful?