Why Use Sets?
Sets are the foundation of LINGO’s modeling language—the fundamental building block of the program’s most powerful capabilities. With an understanding of sets, you can write a series of similar constraints in a single statement and express long, complex formulas concisely. This allows you to express your largest models very quickly and easily. In larger models, you’ll encounter the need to express a group of several very similar calculations or constraints. Fortunately, LINGO’s ability to handle sets of information allows you to perform such operations efficiently.
For example, preparing a warehouse-shipping model for 100 warehouses would be tedious if you had to write each constraint explicitly (e.g., "Warehouse 1 must ship no more than its present inventory, Warehouse 2 must ship no more than its present inventory, Warehouse 3 must ship no more than its present inventory…", and so on). LINGO allows you to express formulas in the form easiest for you to read and understand (e.g., "Each warehouse must ship no more than its present inventory").