Commit f5c88fd2 authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Fixed the compilation of IpOpt for the OSX 10.9 platform.

parent 2b135e3b
......@@ -12,25 +12,33 @@ obtain.obtain('IpOpt v3.11.8', 'Ipopt-3.11.8', 'http://www.coin-or.org/download/
## presence of cmake.
compile_test = not os.path.exists('.' + os.sep + 'build' + os.sep + 'include' + os.sep + 'Ipopt')
if not os.path.exists('.' + os.sep + 'build' + os.sep + 'include' + os.sep + 'coin/IpIpoptNLP.hpp'):
if os.name == 'nt':
print '<<WARNING>> no automatic installation for this package'
else:
print '<<INSTALL>> configure and build Nlopt v2.4.1'
path = os.getcwd()
third = path + os.sep + 'Ipopt-3.11.8' + os.sep + 'ThirdParty' + os.sep
os.chdir(third + 'Blas')
ret = os.system('./get.Blas')
os.chdir(third + 'Lapack')
ret = os.system('./get.Lapack')
os.chdir(third + 'ASL')
ret = os.system('./get.ASL')
os.chdir(third + 'Mumps')
ret = os.system('./get.Mumps')
os.chdir(path)
obtain.configure_build('Ipopt-3.11.8', '--enable-dependency-linking')
#end
if os.path.exists('.' + os.sep + 'Ipopt-3.11.8.tgz') :
print '<<ERROR>> The IpOpt package is already downloaded or installed'
print '<<ERROR>> If the plugins using IpOpt do not compile, check this installation'
else:
print '<<INSTALL>> IpOpt already installed'
if not os.path.exists('.' + os.sep + 'build' + os.sep + 'include' + os.sep + 'coin/IpIpoptNLP.hpp'):
if os.name == 'nt':
print '<<WARNING>> no automatic installation for this package'
else:
print '<<INSTALL>> configure and build Nlopt v2.4.1'
path = os.getcwd()
third = path + os.sep + 'Ipopt-3.11.8' + os.sep + 'ThirdParty' + os.sep
os.chdir(third + 'Blas')
ret = os.system('./get.Blas')
os.chdir(third + 'Lapack')
ret = os.system('./get.Lapack')
os.chdir(third + 'ASL')
ret = os.system('./get.ASL')
os.chdir(third + 'Mumps')
ret = os.system('./get.Mumps')
os.chdir(path)
obtain.configure_build('Ipopt-3.11.8', '--enable-dependency-linking')
#end
else:
print '<<INSTALL>> IpOpt already installed'
#end
#end
......@@ -18,7 +18,7 @@
*
* See htpp://stackoverflow.com/questions/11886288/
*/
#if TODO
#if defined(TODO)
//__cplusplus >= 201103L
#include <memory>
......
......@@ -110,7 +110,7 @@ class altaNLP : public Ipopt::TNLP
// Compute the difference vector and add its
// components to the obj_value
vec _y = _di - (*_f)(x);
vec _y = _di - _f->value(x);
for(int i=0; i<_f->dimY(); ++i)
{
obj_value += pow(_y[i], 2);
......@@ -149,7 +149,7 @@ class altaNLP : public Ipopt::TNLP
// Compute the difference vector and add its
// components to the obj_value
vec _y = (*_f)(x) - _di;
vec _y = _f->value(x) - _di;
// Get the jacobian of the function at position x_i for the current
// set of parameters (set prior to function call)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment