ContentsIndexHome
PreviousUpNext
Ordinals

Using ordinals instead of labels allows the SDK to skip string comparisons for the labels and thus results in better performance. Using ordinals however, does require you to fully understand the way AIMMS uses these ordinals, in order to avoid certain pitfalls.

All elements in a root set are ordered by AIMMS in a consecutive manner according to their data entry order. The AIMMS Language Reference discusses several of the intricacies on Set Element Ordering in the Execution Efficiency Cookbook chapter. As a guideline, the use of ordinals is safe if you explicitly insert the set elements into your model in the correct order, and do not change the set assignment afterwards. Emptying the set during the run, and refilling it with a new collection of elements, may result in an unexpected element order due the data entry order employed by AIMMS. 

The SDK does not honor to the order by attribute of a Set, i.e. the natural order of AIMMS is always in effect, even if the AIMMS model specified a certain Set order. 

The pitfalls example shows some rather unexpected results due to these element ordering intricacies.