Mathematical Modeling Language
AIMMS Mathematical Modeling Language Highlights
For a full description of the AIMMS Mathematical Modeling Language see the Language Reference.
The multidimensional modeling language in AIMMS offers a powerful yet intuitive index notation enabling you to capture the complexity of problems as they occur in real life situations. In fact, AIMMS models are so easily readable, that they can be understood by both domain and modeling experts, and thus can often serve as a common format for both to agree on the functionality required for a certain optimization application. In addition, the modeling language allows you to express very complex calculations in a compact manner without the need to worry about memory management or sparse data storage considerations.
Besides a common model storage in the form of flat ASCII files, AIMMS also offers a graphical Model Explorer in which all identifier declarations in your model are made visible as nodes in a model tree. You can add directory-like section nodes to this tree, and store the identifier declarations of your model in any section you like, independent of the order in which the identifiers are used in your model. The model tree is an indispensable tool that will help you to impose a clear and logical structure to the contents of your model. In its turn, this will help to lower the costs associated with the model maintenance and transfer.
All identifier declarations are attribute-based, and can be entered through special graphical attribute windows. Attribute-based declarations limit the amount of syntax that you need to learn, and allows AIMMS to offer special wizards for entering appropriate attribute values.
AIMMS provides you with a powerful combination of automatically updated multidimensional definitions and procedural execution. Definitions allow you to globally specify unique relationships between entities in your model without having to worry about the order of execution. Procedures, on the other hand, provide you with full control over the precise order in which particular computations have to be performed, through the use of the AIMMS modeling language’s extensive collection of flow control statements.
One of the outstanding features of AIMMS is its capability of specifying and solving mathematical programming (e.g. linear, nonlinear and mixed complementarity) models. Using the same compact and rich notation available for procedural statements, symbolic constraints can be formulated in a simple and concise manner. With only a single statement, an optimization model can be transferred to, and solved by, world class solvers such as CPLEX, CONOPT, GUROBI or Knitro.
Selected AIMMS advanced modeling language features include:
a rich set of mathematical, statistical and financial functions,
support for time-based modeling through calendars and horizons,
support for units of measurement,
support for calling external functions from within the modeling language,
support for modules and namespaces to better facilitate the development of an AIMMS model by multiple developers,
support for building advanced optimization algorithms.
AIMMS offers extensive support for time-based modeling through special calendar and horizon sets. Calendars represent fixed-length periods (time slots) in real time, and provide support for such issues as time zones and daylight saving time. Horizons represent abstract model periods, which can be linked to one or more time slots in a calendar. Using calendars and horizons, AIMMS allows you to implement rolling horizon models with automatic (dis)aggregation in a simple manner.
AIMMS is unique in its rigorous treatment of units of measurements throughout the modeling language. AIMMS supports both SI and custom units of measurement. With each identifier in your model AIMMS allows you to associate a unit of measurement. When you supply units of measurement for your model, this enables AIMMS to perform an extensive unit consistency analysis of all expressions in the model, which can help you detect modeling errors in an early stage. When the specified units of measurement also contain sensible scale factors, AIMMS can use these to provide excellent unit-based solver scaling. Through unit conventions, end-users around the globe can work with the same model using different units of measurement (e.g. metric or Anglo-American units).
AIMMS allows calls to external procedures and functions from within the modeling language, to support the external implementation of tasks that are not easily executed within AIMMS itself. External procedures can be called from within any AIMMS procedure, and allow multidimensional identifiers in your model to be passed as (dense) array arguments. You can even call external functions from within constraints of a nonlinear optimization model, where either the external function can provide (exact) derivative information, or AIMMS can estimate the required derivates by a numerical differencing scheme.
For most applications a simple solve (generating and solving a single instance at once) is sufficient. However, for advanced applications, you may need a finer-grained level of control, e.g.
to work with multiple, differing, instances of a single symbolic mathematical program,
manipulate the individual rows and columns and the coefficient matrix of a mathematical program instance, for example to efficiently implement a column generation scheme,
work with a repository of solutions associated with a mathematical program instance, for instance as a means to store multiple starting solutions or, within a solver callback, to setup and update a collection of incumbents of a mixed integer model, or
start multiple solver sessions for a mathematical program instance, either locally or remotely.
For this AIMMS offers the GMP library, a set of procedures that allows you to gain fine-grained control over the generation, manipulation and solution of a mathematical program instance, and allows you to manage a collection of solutions and solver sessions associated with such mathematical program instances.
With every mathematical program declared as part of your model, the GMP library allows you to associate
one or more Generated Math Program instances (GMPs), and with each GMP
a conceptual matrix of coefficients that can be manipulated,
a repository of initial, intermediate or final solutions, and
a pool of local or remote solver sessions.
The AIMMS GMP library also supports the activation of parallel solver sessions, allowing an application to solve multiple mathematical programs in parallel on one computer. For advanced optimization applications in which multiple independent mathematical programs can be solved simultaneously, this may dramatically increase the application performance on multi-processor computer or multi-core processors.
Outer approximation is a well-known basic approach to solve mixed integer nonlinear programming (MINLP) models. The underlying algorithm is an interplay between two solvers, namely one for solving mixed integer linear programming models and one for solving nonlinear programming models.
Even though there is a standard outer approximation algorithm, you as a user of the algorithm may want to customize the individual algorithmic steps in order to achieve such goals as
obtaining better performance,
obtaining a better solution,
storing multiple integer solutions found by the algorithm,
being able to use different nonlinear programming or mixed integer programmingsolvers during the algorithm in order to increase the chance to obtain feasible solutions, or even
being able to modify the submodels in a problem-specific manner in between algorithm steps.
For this reason the Outer Approximation Algorithm in AIMMS is provided as an open procedure written – and hence customizable – in the AIMMS modeling language (a white box solver) instead of the usual closed implementation (a black box solver).
AIMMS supports the evaluation of second order function derivatives (Hessians) which can be used by CONOPT, Knitro and IPOPT to solve certain classes of nonlinear programming models much more efficiently than would be possible with Jacobian information alone. The AIMMS implementation of the Hessian computation is extremely efficient, with reported speed ups of up to a factor 10 compared to some implementations by others.
AIMMS offers a powerful presolve procedure for nonlinear programs and mixed integer nonlinear programs, analogous to the presolve procedures employed by linear programming and mixed integer programming solvers. The AIMMS nonlinear presolve procedure applies techniques like inversion of nonlinear expressions, solving the variables in the pre-triangular part of the matrix, and tightening the bounds of variables based on the linear and nonlinear constraints.
With the presolver, nonlinear problems may be solved faster and the solution may be better. The solver may even find a feasible solution for problems declared infeasible without the presolve, and in other cases provide proof that it really is infeasible.
A multistart algorithm for nonlinear programming problems is also available in AIMMS. This algorithm randomly generates starting points, groups these into clusters, calls a nonlinear programming solver for each cluster and reports back the best feasible solution as its final solution. The algorithm can also report all feasible solutions found. The AIMMS multistart algorithm is a user-customizable procedure within the GMP library, allowing modelers to adapt the algorithm to their own needs.
The multistart algorithm may increase the chance of finding a good final solution. Multistart increases the total solving time, but this may be limited by using multiple threads for parallel solver sessions to solve problems with different starting points in parallel.
AIMMS offers support for generating a stochastic LP/MIP recourse model from any given deterministic model, without the need to reformulate the deterministic model. By only supplying additional attributes for selected parameters, variables and constraints, AIMMS can generate both a deterministic and recourse model from the same formulation. Various user adaptable templates for generating a scenario tree and the corresponding stochastic input data for the recourse model are available in the form of a system module which can be imported into any AIMMS application. To solve the recourse model, AIMMS will generate and solve the corresponding deterministic equivalent, or use a stochastic Benders' decomposition algorithm.
The complete stochastic programming support setup within AIMMS allows you to solve mathematical models with uncertainty to optimality and create robust solutions without changing the actual structure of the models. AIMMS includes a module to visualize stochastic scenario trees.
Robust optimization is a rather new modeling methodology for decision under uncertainty. Robust optimization is designed to meet some major challenges associated with uncertainty-affected optimization problems:
- to operate under lack of full information on the nature of uncertainty,
- to model the problem in a form that can be solved efficiently, and
- to provide guarantees about the performance of the solution.
Robustness of decisions is defined in terms of the best performance in the worst case possible state-of-the-world (min-max optimization).
From any existing deterministic linear program (LP) or mixed integer program (MIP), AIMMS is able to automatically create a robust optimization model as well, without the need for you to reformulate any of the constraint definitions.
For a challenging MIP problem, with a certain structure, Benders’ decomposition can be a good alternative approach to solve the problem efficiently. The Benders’ decomposition module in AIMMS implements an algorithm that can be easily applied to MIP (and LP) problems without the need of coding the Benders’ decomposition algorithm yourself.