The AIMMS Open Solver Interface (AimmsOSI) defines an Application Program Interface layer between AIMMS on one side, and your solver on the other. It describes a complete set of functions to handle the most general communication scenarios between the AIMMS modeling system and your solver. Your implementation of the AimmsOSI should map the relevant AimmsOSI functions onto the existing data structures and callable functions of your solver.
To link a solver to AIMMS, you must provide a single dynamic link library (DLL) which allows AIMMS to call your solver through the AimmsOSI. If you have access to the sources, or if you have a library (.lib) version of the solver, you can link both the solver interface and the solver itself into a single DLL. However, if your solver is already available in the form of a DLL, and you do not want to incorporate the AIMMS specific interface into this DLL, then you can also create a separate solver interface DLL between AIMMS and your solver DLL. In fact, most commercial solvers have been linked to AIMMS by means of a separate interface DLL.
The prototypes of all the available AimmsOSI functions are provided in a single header file IAimmsOSI.h. You should include this header file in the source file corresponding to your solver-interface DLL.
Communication between AIMMS and your solver through the solver interface DLL is always initiated by AIMMS. The entire communication can be divided into three separate phases:
-
An online version of this document can be found here.
The AIMMSlinks project at COIN-OR contains publicly available links using the AimmsOSI. Currently the AIMMSlinks project contains links to the LP/MIP solver CBC and the NLP solver IPOPT.
Name |
Description |
When AIMMS loads your solver interface DLL, AIMMS will interrogate the DLL for the name of the associated solver and its capabilities. Through a call to the function RegisterAsSolver, AIMMS will interrogate your solver for its name and the model types that it can handle. Through the function GetInitialInfo, AIMMS will retrieve further information about the solver such as:
The information that AIMMS retrieves during this phase is used to... more | |
AIMMS maintains a number of general solver options that can (and should) be used by any solver that is linked to AIMMS. You do not have to inform AIMMS which of these options are applicable to your solver. These option settings will be passed to your solver automatically along with the values of your own solver-specific options. If your solver has a number of specific options, and you want to be able to control these options from within AIMMS, you must register these solver-specific options with AIMMS. In AIMMS, all options are categorized using a tree-like hierarchy. If you link... more | |
Obviously the most interesting part of the AimmsOSI is the phase in which AIMMS requests the solver to solve a specific model. This phase typically consists of the following sequence:
| |
Besides the functions that are described briefly in the preceding sections, there are a number of general support functions. The function GetVersion, when called by AIMMS, should return the version number of the solver. This number will then be used in the About AIMMS menu option. With the functions AllocateMemory and FreeMemory the solver can allocate and free memory from the AIMMS memory manager. With the function PassMessage warning and error messages can be passed to the AIMMS message window. The function GetRowColumnName can be used to retrieve the name associated with a row (constraint) or a column (variable).... more |