In AIMMS it is possible to define a set via a union of some of its subsets.
As an example:
Set Locations {
Definition: Factories + Warehouses + Stores;
}
Set Factories {
SubsetOf : Locations;
}
Set Warehouses {
SubsetOf : Locations;
}
Set Stores {
SubsetOf Locations;
}
This is a powerful feature in AIMMS and it seems very logical to use, but to implement this, we are faced with several exceptions to the normal flow.
Because:
- For an ordinary subset it is not allowed to add elements to it that are not present in the super set. But if AIMMS would not allow that in the given example, then it becomes impossible to fill any of the sets with elements. So, if AIMMS recognizes this construction it introduces an exception that is should allow that the subset (temporarily) contains elements that are not in the superset. Only after the definition of Locations has been re-evaluated the expected subset relation is corrected.
- AIMMS works with dependencies between identifiers. When assigning to an identifier, the code first makes sure that all identifiers on which the identifier depends are made ‘up-to-date’. So for an ordinary subset, before assigning to it, first the definition of its super set is evaluated. If this mechanism would be applied here, then we end up in a circular dependency: Factories depends on Locations, and Locations (via its definition) depends on Factories. So again, AIMMS adds an exception in this dependency structure: if it encounters the above construction of sets then Factories will not depend on Locations.
Now, why am I sharing this? That is because this feature of AIMMS has never been described in any of the documentation (at least I cannot find it), and we don't have a proper name for it.
And, to be really honest: this concept did result in some bug reports lately, and every time that I have to write a release note for it, I feel that I first need to describe this feature. It would be so much easier if I could just mention the feature by name and perhaps refer to some place in the documentation.
So… does anyone have a suggestion on how we should name this feature?