-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
Note that the AIMMS installation includes links to CBC and IPOPT and therefore only in rare cases you should consider building the link to CBC or IPOPT yourself.
For example, you need to build the AIMMS link to IPOPT if you want to use parallel solver sessions with IPOPT. In that case you have to set the capability flag
AOSI_CAPAB_THREAD_SAFE
in the function GetInitialInfo to indicate that IPOPT is thread safe and can be used to solve in parallel. Note that you should then use a linear solver that is thread safe (unfortunately MUMPS is not)!
You can download AIMMSlinks via git by typing
git clone -b releases/1.1.0 https://github.com/coin-or/AIMMSlinks.git
Alternatively you can obtain the source code from the tarball directory, and download a file of the form AIMMSlinks-x.y.z.tgz or AIMMSlinks-x.y.z.zip.
Note that to use Ipopt in AIMMS you also need to download the Ipopt DLL binaries as explained below!
- Install an AIMMS system.
- Build the AIMMS-IPOPT link.
- Build the AIMMS-CBC link.
The installation instructions assume that you are using the included Microsoft Visual Studio projects, for version 10 or higher. The projects only support building the solver interfaces to IPOPT and CBC on Windows 32 and 64 bits.
While it is possible to build a link to a solver without having an AIMMS system available, an AIMMS system will be needed to use them.
You can download AIMMS here. You should have a valid AIMMS license to be able to use AIMMS after installation. If you do not have a valid AIMMS license, you can request a one-time Free AIMMS Trial License or use a Free AIMMS Academic License.
The Trial License is a 30-day unrestricted trial license.
The main steps to build the AIMMS-IPOPT link are:
a. Download and install IPOPT. b. Build the AIMMS-IPOPT dll. c. Add IPOPT to your AIMMS system. d. Test IPOPT in AIMMS.
Download the IPOPT DLL binaries, e.g., Ipopt-3.11.0-Win32-Win64-dll.7z.
The IPOPT dll is built using the third party components BLAS and LAPACK. The IPOPT dll includes the public domain solver MUMPS which makes use of the matrix ordering algorithms implemented in METIS.
Using the "library loader" a Pardiso DLL or a DLL with HSL subroutines (which the user has to compile) can be loaded at runtime. The third party software for Pardiso and HSL is released under different licenses than IPOPT. For this reason that code is not distributed together with the IPOPT packages and therefore you have to go through the hassle of obtaining it yourself.
See the prerequisites for IPOPT for more information on these third party components. Keep in mind that it is YOUR RESPONSIBILITY to ensure that your downloading and usage of the third party components conforms with their licenses. See here for more information on downloading external code.
Unpack the zip file in the IpoptAimms directory. After unpacking the zip file the directory structure of the IpoptAimms directory should be:
- IpoptAimms
- include
- coin
- lib
- win32/x64
- debug
- release
- MSVisualStudio
- v10
- src
By default the AIMMS-IPOPT link gives you the possibility to choose, through the option 'Linear solver selection', between the linear solvers MUMPS, MA27 (HSL) and Pardiso where MUMPS is the default selection. If you select a linear solver that is not available then the solve will fail. To add other linear solvers you should configure the AimmsIpoptConfig.h file in the src directory.
Build the code using Microsoft Visual Studio Interactive Development Environment (IDE) version 10 or higher by opening the project file libAimmsIpopt.vcproj inside the IpoptAimms\MSVisualStudio\v10 directory.
-
Copy the libAimmsIpopt.dll file to the Solvers directory of your AIMMS installation.
-
Copy the IPOPT dll in IpoptAimms\lib, e.g. IpoptAimms\lib\win32\release\IpOpt-vc10.dll, to the Solvers directory of your AIMMS installation.
-
After starting up AIMMS, add IPOPT to the Solvers Configuration:
- Open the Solver Configuration dialog box (under Settings).
- Click Add.
- At the Solver DLL field, select the 'libAimmsIpopt.dll' file using the File Selection dialog box.
- Click OK to accept the new solver.
- Set IPOPT as the default NLP solver, and click OK to close the Solver Configuration dialog box.
Please note that the debug and release versions of the IPOPT dll are not binary compatible, because the MSVC compiler unfortunately treats std::string objects slightly differently in both configurations. Using a debug version of libAimmsIpopt.dll in combination with a release version of the IPOPT dll (and vice versa) will therefore probably lead to stack corruption, runtime errors, or other hard-to-explain crashes.
After adding IPOPT to the solver configuration, you can test IPOPT by using some of the AIMMS examples.
- Example Two Level Decision Problem (NLP):
- Open the TwoLevel.prj project.
- Click Open Demo Page.
- Open the progress window by pressing CTRL+P.
- Click Solve Submodels for Given Tax. The progress window should contain the following information (amongst others):
SOLVER : IPOPT
Best Solution : 972.9803698
Program Status : Locally optimal
Solver Status : Normal completion
The main steps to build the AIMMS-CBC link are:
a. Download and install CBC. b. Build the AIMMS-CBC dll. c. Add CBC to your AIMMS system. d. Test CBC in AIMMS.
Obtain the CBC source code via subversion inside the CbcAimms directory by using, e.g.,
svn co https://projects.coin-or.org/svn/Cbc/stable/2.9 coin-Cbc
Alternatively one can obtain the source code from the directory,
http://www.coin-or.org/download/source/Cbc/
and downloading a file of the form Cbc-X.Y.Z.zip, e.g., Cbc-2.9.4.zip. Unzip this file to a directory coin-Cbc inside the CbcAimms directory. Please read the INSTALL file inside the CbcAimms directory before deciding which Cbc version to use. (For installation instructions for CBC see also https://github.com/coin-or/Cbc.)
After obtaining the CBC source code the directory structure of the CbcAimms directory should be:
- CbcAimms
- coin-Cbc
- BuildTools
- Cbc
- Cgl
- Clp
- CoinUtils
- Data
- doxydoc
- Osi
- ThirdParty
- MSVisualStudio
- v10
- src
Open the solution file Cbc.sln in the CbcAimms\coin-Cbc\Cbc\MSVisualStudio\v10 directory using Microsoft Visual Studio Interactive Development Environment (IDE) version 10 or higher, and build the following CBC components: cbc, libCbc, libCgl, libClp, libCoinUtils, libOsi, libOsiClp. Note: if you build the component cbc then automatically all other components are build.
Build the code using Microsoft Visual Studio Interactive Development Environment (IDE) version 10 or higher by opening the project file libAimmsCbc.vcproj inside the CbcAimms\MSVisualStudio\v10 directory.
-
Copy the libAimmsCbc.dll file to the Solvers directory of your AIMMS installation.
-
After starting up AIMMS, add CBC to the Solvers Configuration:
- Open the Solver Configuration dialog box (under Settings).
- Click Add.
- At the Solver DLL field, select the 'libAimmsCbc.dll' file using the File Selection dialog box.
- Click OK to accept the new solver.
- Set CBC as the default LP and MIP solver, and click OK to close the Solver Configuration dialog box.
After adding CBC to the solver configuration, you can test CBC by using some of the AIMMS examples.
- Example Farm Planning (LP):
- Open the FarmPlanning.prj project.
- Click Open Demo Page.
- Open progress window by pressing CTRL+P.
- Click Optimize. The progress window should contain the following information (amongst others):
SOLVER : CBC
Best Solution : 49949.98588
Program Status : Optimal
Solver Status : Normal completion
- Example Diet Problem (MIP):
- Open the DietProblem.prj project.
- Click Open Demo Page.
- Open progress window by pressing CTRL+P.
- Click Solve. The progress window should contain the following information (amongst others):
SOLVER : CBC
Best Solution : 24.6
Program Status : Optimal
Solver Status : Normal completion