Installing IPOPT in Windows PDF
Installing IPOPT in Windows PDF
V0.1, 26.03.2013
Next you have to state where MinGW should be installed. It is important that the path you choose does not contain any
space or special characters. In the scope of this document it is assumed that MinGW is installed to C:\MinGW. If your
installation location differs from this you have to adapt all paths stated below accordingly.
1 / 13
V0.1, 26.03.2013
I recommend to create shortcuts in the start menu, so you may just use the default setting.
and
Concluding, you should see an overview of your installation settings similar to that one:
After clicking Install some command line windows pop up in which the file downloads are processed. Depending on
the speed of your internet connection this may take a few minutes.
2 / 13
V0.1, 26.03.2013
3 / 13
V0.1, 26.03.2013
As the installation directory choose one that is different to that of MinGW. It is important that the path you choose does
not contain any space or special characters. In the scope of this document it is assumed that TDM-GCC is installed to
C:\MinGW64. If your installation location differs from this you have to adapt all paths stated below accordingly.
Finally, you have to choose the components that should be installed. Either select c++, fortran and openmp manually
from the gcc category or simply install all packages.
or
4 / 13
V0.1, 26.03.2013
/mingw
-v
to check whether you are using the correct compiler. The output should be similar to:
5 / 13
V0.1, 26.03.2013
If you want to use Ipopt from AMPL type (not necessary for the MATLAB interface):
cd ThirdParty/ASL/; ./get.ASL; cd ../..
6 / 13
V0.1, 26.03.2013
Proceed with obtaining MUMPS and METIS (or get another solver):
cd ThirdParty/Mumps; ./get.Mumps; cd ../Metis; ./get.Metis; cd ../..
7 / 13
V0.1, 26.03.2013
Files\MATLAB\R2012b.
Open a Windows command line, for example by pressing Windows key + R and open cmd or use the shortcut in the start
menu. Change to the drives root by typing:
cd \
You can change to another drive by entering its letter followed by a colon, e.g.:
E:
Enter
dir /X
So, the wanted short path name is C:\PROGRA~1\MATLAB\R2012b. Depending on the location where you have MATLAB
installed you have to adapt this method accordingly. In case MATLAB is located in a sub-folder that contains space
characters as well, e.g. C:\Program Files (x86)\The MathWorks\MATLAB\R2012b, you have to get the short path name
for each of them. You can navigate into a directory by entering:
cd "Program Files (x86)"
For the last example you should end up with something like C:\PROGRA~2\THEMAT~1\MATLAB\R2012b.
Now close the Windows command line and convert the path to UNIX style:
/c/Progra~1/MATLAB/R2012b
8 / 13
V0.1, 26.03.2013
Now enter
make
9 / 13
V0.1, 26.03.2013
At the end, it should say that the tests have been passed (without ASL the AMPL test cannot be performed):
Finally, type
make install
10 / 13
V0.1, 26.03.2013
Click Make options file and wait until it says that the file has been created:
11 / 13
V0.1, 26.03.2013
During that process MATLAB may show some warnings/errors but anyway, we can build the mex file:
To finish, enter
make install
Now you should have a file named ipopt.mexw32 or ipopt.mexw64, respectively, in the src folder.
12 / 13
V0.1, 26.03.2013
Open a new MATLAB instance, change into that path and run one of the included m-files:
Sources
http://www.coin-or.org/Ipopt/documentation/
https://projects.coin-or.org/Ipopt/wiki/MatlabInterface
http://list.coin-or.org/pipermail/ipopt/2013-March/003276.html
13 / 13
V0.1, 26.03.2013