Programming LINGO - Summary

There are many instances where you will need to solve a model multiple times and/or use the results of one model as input into another.  The programming capabilities in LINGO allow you to automate these classes of problems.  The three examples presented in this chapter introduce the programming constructs available in LINGO.

In addition to the three examples presented in this chapter, several more examples of solving models in a loop may be found in the samples folder of your LINGO installation.  These additional examples include:

Loopdea.lg4 – A Data Envelopment Analysis model with a loop over each of the decision-making units to compute their individual efficiency scores.

Loopts.lg4 – A traveling salesman model that loops to append subtour breaking constraints to the formulation, continuing until a complete tour of the cities is generated.

Loopttt.lg4 – A looping model that implements a game of ticktacktoe.  

Finally, in addition to all the control structures and functions discussed in this chapter, all of the functions and operators listed in Chapter 7, LINGO's Operators and Functions, are also available for use in your calc section scripts, with the only exception being the variable domain functions.  Variable domain functions are restricted for use in model section only.