Need for Families of SetsOne limitation of Aspen SCM Planning’s approach to LP modelling is that the value of each set can only be established once, i.e. there is only a single internal index for each set. This matters because the natural formulation of an LP model often involves having two loops over the same set.For instance in the transportation problem we referred to the variable x_{ij} as the amount of material from source i used at destination j. In practice some sources may also be destinations and we might prefer to have a single set of locations which indexes the x variables twice independently. Aspen SCM Planning does not permit this: we must have distinct sets for each independent subscript of a decision variable or constraint. In a multitimeperiod model we may have decision variables yt as the increment of capacity added in time period t. Then our constraint for time period t will typically be of the form: u_{t} – Σ_{t' < t} y_{t'} ≤ CAP_{0} for all t where u_{t} is the production in time period t and CAP_{0} is the initial capacity. This constraint says that the current production must be less than or equal to the initial capacity plus the sum of incremental capacities added in all the preceding time periods. Viewed from the perspective of the columns, the decision variable for the increment of capacity added in time period t must appear in the constraint for each subsequent time period. When the matrix is generated, GEN loops over the time periods for the y_{t} decision variables. It sets the internal index for the set TIME (or whatever we are calling it). There is no further internal index which can be set for TIME which would allow us to perform an independent loop in order to get entries in the rows for each subsequent time period. We are therefore forced to define another set, say TIM2 (best not to have one name wholly contained in another) which happens to have the same elements as TIME. We could define the generic column for y indexed by TIME and the generic row by TIM2. But then we would have to define the u variable as indexed by TIM2 as it has the same index as the generic row. So as the nonstandard behaviour is associated with the y variable, it seems more natural to define the generic column for the u variables and the generic row as indexed by TIME and the generic column for the y variables as indexed by TIM2. Where we have more than one set with similar members we could keep them completely separate. But there are occasions when it is useful to be able to tie them together. For instance, in this model we might have another constraint which relates the y_{t} variable directly to the u_{t} variable, e.g. incremental capacity added in a time period must be less than 10% of production in that time period: y_{t} – 0.1 u_{t} ≤ 0 for all t Here we would like y_{t} to be indexed by TIME. But it isn’t; it’s indexed by TIM2. We could write the constraint as: Σ_{t'} IFSAME_{t't} y_{t'} – 0.1 u_{t} ≤ 0 for all t where IFSAME_{t't} = 1 if t' = t and 0 otherwise. This would work with independent sets TIME and TIM2. Families of Sets and the “Nomatch” FlagFortunately, Aspen SCM Planning provides a mechanism to handle relationships in which we want two sets with identical members sometimes to be connected and sometimes to be disconnected. It is through the concept of families of sets.When you define a set you can specify among its attributes that it is the subset of some other set. Although you can specify any set, whether it is actually a superset of the current one, SCM Planning has some rules which it checks when you run CHECK SUBSET (or CHECK ALL):
Suppose that the sets TIME and TIM2 from the multitimeperiod example are put into the same family, e.g. by declaring TIM2 to be a subset of TIME. Then in implementing the constraint y_{t} – 0.1 u_{t} ≤ 0 for all t we do not need to worry that the generic column for y_{t} is indexed by TIM2 when the generic row is indexed by TIME. The fact that TIM2 and TIME are in the same family means that by default when GEN establishes the value of the set TIM2 this also establishes TIME at the same value. In other words, when GEN loops over the set TIM2 and sets its internal index, GEN also sets the internal index of TIME to the same value. The “nomatch” flag * allows this rule to be overridden. In the constraint u_{t} – Σ_{t' < t} y_{t'} ≤ CAP_{0} for all t we want the loop over TIME for the generic row to be independent of the loop over TIM2 for the generic column for yt. We do this by specifying that the index of the generic row is *TIME rather than TIME. When GEN loops over TIM2 for the y_{t} variables, this does not set the internal index of TIME for the generic row. There is then a separate loop over TIME for the generic row. We need to arrange the coefficient of yt’ in the row for period t so that it is 1 for t' < t (i.e. TIM2 < TIME) and 0 otherwise. You might wonder what happens with the u_{t} term in this generic row. The generic column for u_{t} has the index TIME while the generic row has the index *TIME. Does this mean that there will be a second loop over TIME for the generic row independent of the loop over TIME for the generic column ut? The answer is “No”: there is only one internal index of the set TIME and this is set when generating the columns so there is no second loop over TIME when generating the rows. Family RuleThe Family Rule states thatWhen the value of a set is established for a column or a row, this automatically establishes all other sets in the same family at the same value, except:
Exception 1 means that in our transportation example if we declare SOURCE to be a subset of DEST we do not need to use a Nomatch marker in defining the generic column for our x_{ij} variables:
When Exception 1 has been invoked and there are other sets in the same family, it is the value of the final independent set which is adopted by the other sets in the same family. Thus with x_{ij}, other sets in the same family as SOURCE and DEST would take the value adopted by DEST. When a multidimensional incidence table is evaluated for a generic column, this establishes the values of all its indexing sets. Some of those sets may index generic rows rather than columns (e.g. in multitimeperiod models; see Representing Multiple Terms for a Decision Variable in a Constraint). If those sets are in the same family as sets which index the generic column, there is no need to specify a nomatch flag on the generic row as the row index will take its required value based on the column index and the incidence table. Family Rule with Proper SubsetsWhere a set in a family is a proper subset of another over which GEN is looping, it is possible that the Family Rule will require the set to be established at some value which is not in the set. In this case the entry is suppressed. This behaviour is entirely natural and is usually not even noticed.Suppose that we had a loop over columns for the supply of material from elements of the set SOURCE. We might also have some constraint which applied to destinations. Then where a source was also a destination we would have an entry in the matrix, but there would be no such entry where a source was not a destination. Where tables have to be evaluated for nonexistent members of a set, GEN regards the value as 0 (for numeric tables) or blank (for character tables).

Aspen SCM > SCM Planning >