ALGENCAN 1.0 Octave interface
Note that this interface corresponds to an old
version of ALGENCAN! Click here to
download the ALGENCAN latest version (including all the
interfaces).
-
algencanma.m
- This file contains an example of a "main program" that sets the
problem data and calls the optimization solver (GENCAN for
bound-constrainted problems and ALGENCAN for general nonlinear
programming problems).
-
toyprob.m
- This file contains the definition (objective function, constraints,
initial point, bounds on the variables, etc.) of a very easy problem.
This is the file that the user should modify to solve his/her own
problem.
-
octavewrapper.c
- This is the file responsible for the interface between Octave and
C/C++.
-
octavewrapper.h
- octavewrapper header file.
-
cfortran.h
- This is the file responsible for the interface between C/C++
and Fortran.
- Makefile
- This (optionaly) file can be used to easily compile the codes
using the make command.
Quick start
| 1) | Copy the 6 files above.
| | 2) | Compile typing
make or, manually, typing
g77 -O4 -c -fPIC -xf77-cpp-input algencan.f
g++ -O4 -c -fPIC -Df2cFortran -mieee-fp -I$OCTINCDIR \
-I$OCTINCDIR/octave octavewrapper.c
gcc -O4 -shared -loctinterp -loctave -lcruft -L$OCTLIBDIR \
algencan.o octavewrapper.o -o algencan.oct
|
| 3) | Run typing octave < algencanma.m.
Alternatively, within Octave, type
source("algencanma.m"). (Note that
algencanma.m is not a function but
a "script" or "main program"; so typing just
algencanma.m within Octave will not work.)
|
| 4) | If everything was ok, the output in the
screen should be very similar to the content of the file algencan.out
that comes with ALGENCAN. |
| 5) |
Modify the toyprob.m file to solve your own problem. |
| Obs1: |
To use this interface you need to have downloaded
ALGENCAN 1.0. |
| Obs2: |
It is assumed that (i) Octave is installed; and that (ii) the
environment variables OCTINCDIR and
OCTLIBDIR point to the directories
containing the include and the library files needed for developing
Octave extensions, respectively (for example, /usr/include/octave-2.9.9
and /usr/lib/octave-2.9.9, respectively).
|
Additional information
1) Would you like to use this ALGENCAN interface in a Mac OS environment? Click here for details.
|