The MPL model file is divided into two main parts; the definition and the model. In the definition part you define various items that are then used throughout the model. The model part, on the other hand, contains the actual model formulation. Each part is further divided into sections, which are as follows:
The Definition PartTITLE - The problem name. INDEX - Dimensions of the problem. DATA - Scalars, datavectors and files. DECISION VARIABLES - Vector variables. CONSTRAINTS - Vector constraints. MACRO - Macros for repetitive parts.The Model Part
MODEL MAX or MIN - The objective function. SUBJECT TO - The constraints. BOUNDS - Simple upper and lower bounds. FREE - Free variables. INTEGER - Integer variables. BINARY - Binary (0/1) variables. END
The objective function and the constraints are required; all other sections are optional. Either of the keywords MAX or MIN in the objective function is required; the others are optional. The keywords TITLE, INDEX, DATA, DECISION VARIABLES, CONSTRAINTS, MACRO, BOUNDS, FREE, INTEGER, and BINARY are used only when the model contains their respective sections. The keywords MODEL, SUBJECT TO and END are used to aid readability.