Summary

In summary, keep in mind that LINGO recognizes two types of sets—primitive and derived.

Primitive sets are the fundamental objects in a model and can't be broken down into smaller components. Primitive sets can be defined using either an explicit or implicit list. When using an explicit list, you enter each member individually in the set member list. With an implicit list, you enter the initial and terminal set members and LINGO generates all the intermediate members.

Derived sets, on the other hand, are created from other component sets. These component sets are referred to as the parents of the derived set, and may be either primitive or derived. A derived set can be either sparse or dense. Dense sets contain all combinations of the parent set members (sometimes this is also referred to as the Cartesian product or cross of the parent sets). Sparse sets contain only a subset of the cross of the parent sets, and may be defined by two methods--explicit listing or membership filter. The explicit listing method involves listing the members of the sparse set. The membership filter method allows you to specify the sparse set members compactly through the use of a logical condition that all members must satisfy. The relationships amongst the various set types are illustrated in the graph below.

 

Chart2

 

LINGO Set Types

At this point, you are probably thinking that set definition is, at best, somewhat complicated. We will be presenting you with plenty more examples in subsequent sections that should help to illustrate the concepts introduced in this section, and demonstrate that set definition is nowhere near as difficult as it may seem. For now, however, we will turn our attention to how data is input into a model. Then, we will examine a group of functions that are designed to operate on set members. Once we have accomplished this, we will be able to bring together all we have learned in order to begin building some interesting and relevant examples of set-based modeling.