[SciPy-user] Nonlinear Constraint Optimization.
pearu at cens.ioc.ee
Thu Jan 10 08:31:03 CST 2002
On Thu, 10 Jan 2002, H Jansen wrote:
> Solving a system with Omuses/HQP involves writing a class (that inherits
> from Omuses_Problem or HQP_Problem) with a set of differential (or
> difference) equations in C++, linking them with the library; the
> solution process is initialized/controled with Tcl scripts.
> Wouldn't it be wonderful if this all could be done from within a Python
> environment? To that end, the following Python interfaces should be
> 1. One to meschach, and the partially implemented C++ interface,
> meschach++, may work as a start;
> 2. One to the Hqp_Program class;
> 3. One to the Hqp_SeqProgram class;
> 4. One to the Omuses_Program class;
> I've tried to make a start with meschach using SWIG which is geared
> towards C, creating functions that can be wrapped by shadow classes in
> Python. However, the boost.python library also provides an "interface
> builder" which provides a tighter coupling between C/C++ and Python.
> After a while, I had to give up, because I feel I'm lacking the
> experience to make the correct decisions. Preferably, I would team up
> with other people that may be interested and join into a shared project
> in which we can share ideas and build things quicker.
> Are there people interested? I'm open to all ideas.
If the supporting library for solving the problem in the subject is in
C++ then I would recommend boost.python for exposing C++ to Python. Though
to get started with boost.python might seem difficult (I am not sure if it
is easier with other C++/Python binding tools) but not impossible (I
started with many concers about C++ that just fade away with using g++
compiler), with the right design decision of the interface, it will be
very small and easy to maintain.
Using SWIG for wrapping C++ classes is not very good idea, I think.
I have this good experience with interfacing GiNaC C++ library to
Python that provides classes for doing symbolic algebra computations.
(I suggest getting it from CVS as the tar balls are very outdated, in
case you are interested in the approach).
More information about the SciPy-user