Intro to LINGO's Modeling Language

One of LINGO’s most powerful features is its mathematical modeling language. LINGO's modeling language lets you express your problem in a natural manner that is very similar to standard mathematical notation. Rather than entering each term of each constraint explicitly, you can express a whole series of similar constraints in a single compact statement. This leads to models that are much easier to maintain and scale up.

Another convenient feature of LINGO's modeling language is the data section. The data section allows you to isolate your model's data from the formulation. In fact, LINGO can even read data from a separate spreadsheet, database, or text file. With data independent of the model, it’s much easier to make changes, and there’s less chance of error when you do.

The simple CompuQuick model uses scalar variables. Each variable is explicitly listed by name (e.g., STANDARD and TURBO) and each constraint is explicitly stated (e.g., TURBO <=120). In larger models, you’ll encounter the need to work with a group of several very similar constraints and variables. Using the scalar modeling approach we have illustrated to this point, you would need to undertake the repetitive task of typing in each term of each constraint. Fortunately, LINGO’s ability to handle sets of objects allows you to perform such operations much more efficiently.

We will now show you an example of how to use sets to solve a shipping problem. Hopefully, after reviewing this example, it will become clear that coupling the power of sets with LINGO's modeling language allows you to build large models in a fraction of the time required in a scalar oriented approach to modeling (see Using Sets for a detailed desciption of sets).