<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello Herb,<br>
    <br>
    Thank you for pointing out these issues.<br>
    I don't get this error on my windows machine. <br>
    It looks like the error occurs somewhere between lines 528-530 of
    'cyipopt.pyx'. Currently I don't see why the code should throw this
    kind of error. Maybe it has to do with the numpy version? (I use
    numpy 1.6.0)<br>
    <br>
    I will try to setup a linux machine with ipopt and see if I can
    reproduce the problem.<br>
    <br>
    Thanks,<br>
    Amit<br>
    <br>
    On 28/09/2011 17:07, Herb Schilling wrote:
    <blockquote cite="mid:BFCC61D4-65EE-4CC8-AD87-0E77FC5272B2@nasa.gov"
      type="cite">Hello Amit,
      <div><br>
        <div>
          <div>On Sep 27, 2011, at 4:27 PM, Amit Aides wrote:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">
            <div>Hello,<br>
              <br>
              I have written a new python wrapper for Ipopt. It is
              called cyipopt and <br>
              can be downloaded from:<br>
              <a moz-do-not-send="true"
                href="http://code.google.com/p/cyipopt/">http://code.google.com/p/cyipopt/</a><br>
              <br>
              It is similar to pyipopt. Likewise it makes use of the
              Ipopt C <br>
              interface. But it uses a different calling convention,
              more similar to <br>
              the Matlab interface. I include two examples under the
              folder 'test'. <br>
              One is the classic hs071 problem and the other one is a
              translation of <br>
              the lasso example from the Matlab interface. The
              matplotlib package is <br>
              needed for running the lasso example.<br>
              <br>
              Another difference is that it is written using Cython,
              which makes it <br>
              much easier to develop and maintain. It also enables the
              implementation <br>
              of some convenience features, e.g. if no jacobian/hessian
              structure <br>
              callbacks are defined than the jacobian/hessian are
              assumed to be dense. <br>
              Other convenience examples are:<br>
              1) It figures out the number of non zero values by calling
              the structure <br>
              callbacks.<br>
              2) Missing boundaries (on the optimization variables and
              constraints) <br>
              are set to infinity.<br>
              It is also possible to add support for scipy.sparse
              matrices if needed.<br>
              <br>
              I have tested cyipopt on Win 7 32/64 bit. I will be happy
              to know if <br>
              someone is able to use it on linux machines.<br>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>Thanks for writing this and sharing it with the mailing
            list.&nbsp;</div>
          <div><br>
          </div>
          <div>I tried it on Red Hat Linux and :</div>
          <div><br>
          </div>
          <div>1. I had to edit the setup.py file to make the
            installation work. Here are the parts I had to change. Some
            of this is specific to my computer, obviously! The one thing
            I would recommend is that you use forward slashes for path
            delimiters. From&nbsp;<a moz-do-not-send="true"
              href="http://docs.python.org/distutils/setupscript.html">http://docs.python.org/distutils/setupscript.html</a>&nbsp;</div>
          <div><br>
          </div>
        </div>
      </div>
      <blockquote class="webkit-indent-blockquote" style="margin: 0 0 0
        40px; border: none; padding: 0px;">
        <blockquote class="webkit-indent-blockquote" style="margin: 0 0
          0 40px; border: none; padding: 0px;">
          <div>
            <div>
              <div><b>Note that any pathnames (files or directories)
                  supplied in the setup script
                  should be written using the Unix convention, i.e.
                  slash-separated. The
                  Distutils will take care of converting this
                  platform-neutral representation into
                  whatever is appropriate on your current platform
                  before actually using the
                  pathname. This makes your setup script portable across
                  operating systems, which
                  of course is one of the major goals of the Distutils.
                  In</b></div>
            </div>
          </div>
        </blockquote>
      </blockquote>
      <div>
        <div>
          <div><br>
          </div>
          <div>
            <div>PACKAGE_NAME = 'ipopt'</div>
            <div>IPOPT_ICLUDE_DIR=r'/home/hschilli/local/include/coin'</div>
            <div>IPOPT_LIB='ipopt'</div>
            <div>IPOPT_LIB_DIR=r'/home/hschilli/local/lib/coin'</div>
            <div>IPOPT_DLL='libipopt.so'</div>
            <div><br>
            </div>
            <div>
              <div>&nbsp; &nbsp; ext_modules = [</div>
              <div>&nbsp; &nbsp; &nbsp; &nbsp; Extension(</div>
              <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PACKAGE_NAME + '.' + 'cyipopt',</div>
              <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [r'src/cyipopt.pyx'],</div>
              <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include_dirs=[IPOPT_ICLUDE_DIR,
                np.get_include()],</div>
              <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
libraries=[IPOPT_LIB,'coinhsl','coinlapack','coinblas','coinmumps','coinmetis'],</div>
              <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                library_dirs=[IPOPT_LIB_DIR,'/home/hschilli/local/lib/coin/ThirdParty']</div>
              <div>&nbsp; &nbsp; &nbsp; &nbsp; )</div>
              <div>&nbsp; &nbsp; ],</div>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
          </div>
          <div><br>
          </div>
          <div>2. The lasso example worked fine. But the other example
            generated this output. I haven't had time to look into what
            the problem is there.&nbsp;</div>
          <div><br>
          </div>
          <div>
            <div>(devenv)[659]cyipopt(dev) &gt; python
              test/examplehs071.py&nbsp;</div>
            <div><br>
            </div>
            <div>******************************************************************************</div>
            <div>This program contains Ipopt, a library for large-scale
              nonlinear optimization.</div>
            <div>&nbsp;Ipopt is released as open source code under the
              Eclipse Public License (EPL).</div>
            <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;For more information visit <a
                moz-do-not-send="true"
                href="http://projects.coin-or.org/Ipopt">http://projects.coin-or.org/Ipopt</a></div>
            <div>******************************************************************************</div>
            <div><br>
            </div>
            <div>This is Ipopt version 3.9.2, running with linear solver
              ma27.</div>
            <div><br>
            </div>
            <div>Exception ValueError: 'The truth value of an array with
              more than one element is ambiguous. Use a.any() or
              a.all()' in 'ipopt.cyipopt.jacobian_cb' ignored</div>
            <div>Exception of type: ERROR_IN_TNLP_DERIVATIVE_TEST in
              file "IpTNLPAdapter.cpp" at line 2526:</div>
            <div>&nbsp;Exception message: retval evaluated false: In TNLP
              derivative test: Jacobian structure could not be
              evaluated.</div>
            <div><br>
            </div>
            <div>EXIT: Some uncaught Ipopt exception encountered.</div>
            <div>Solution of the primal variables: x=array([ 1., &nbsp;5.,
              &nbsp;5., &nbsp;1.])</div>
            <div><br>
            </div>
            <div>Solution of the dual variables: lambda=array([ 0.,
              &nbsp;0.])</div>
            <div><br>
            </div>
            <div>Objective=0.0</div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
          </div>
          <div><br>
          </div>
          <br>
          <blockquote type="cite">
            <div><br>
              I will appreciate any feedback: bugs, feature requests
              etc.<br>
              <br>
              Thank you,<br>
              Amit Aides<br>
              <br>
              _______________________________________________<br>
              Ipopt mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a><br>
              <a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/ipopt">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
            </div>
          </blockquote>
        </div>
        <br>
        <div>
          <div style="font-family: Helvetica; font-size: 12px; ">-----------------------</div>
          <div style="font-family: Helvetica; font-size: 12px; ">Herb
            Schilling</div>
          <div style="font-family: Helvetica; font-size: 12px; "><span
              class="Apple-style-span" style="font-family: Helvetica;
              font-size: 12px; "><a moz-do-not-send="true"
                href="mailto:hschilling@nasa.gov">hschilling@nasa.gov</a></span></div>
          <div style="font-family: Helvetica; font-size: 12px; "><br
              class="khtml-block-placeholder">
          </div>
          <span class="Apple-style-span" style="font-family: Helvetica;
            font-size: 12px; "><br class="Apple-interchange-newline">
          </span>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Ipopt mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/ipopt">http://list.coin-or.org/mailman/listinfo/ipopt</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>