Finite-difference nonlinear interior-point method with line-search

Example of using finite-difference NIPS algorithm on a NLF1.
   #include <iostream>
   #include <fstream>

   #include "NLF.h"
   #include "Constraint.h"
   #include "BoundConstraint.h"
   #include "CompoundConstraint.h"
   #include "OptFDNIPS.h"
   #include "tstfcn.h"

   using NEWMAT::ColumnVector;
   using namespace OPTPP;

   void update_model(int, int, ColumnVector) {}

   int main ()
     int ndim =  2;
     ColumnVector lower(ndim), upper(ndim);

     //  Create a bound constraint 
     lower    = -2.0; upper    =  2.0;
     Constraint bc = new BoundConstraint(ndim, lower, upper);
     CompoundConstraint* cc = new CompoundConstraint(bc);

     static char *status_file = {"tstfdnips.out"};

     //  Create a constrained nonlinear problem object
     NLF1 nips(ndim,rosen, init_rosen, cc);

     //  Build a finite-difference NIPS object and optimize
     OptFDNIPS objfcn(&nips, update_model);

     objfcn.setOutputFile(status_file, 0);

     // Set convergence tolerance 

     //  Set maximum allowable iterations for FDNIPS algorithm 

     //  Use a backtracking linesearch method to determine acceptable step 

     // Use the Argaez-Tapia merit function as a globalization strategy

     objfcn.printStatus("Solution from fdnips");


Next Section: Constrained minimization | Back to Solvers Page

Last revised September 14, 2006 .

Bug Reports    OPT++ Developers    Copyright Information    GNU Lesser General Public License
Documentation, generated by , last revised August 30, 2006.