Wrapper class for the NLSSOL nonlinear least squares library. More...
Public Member Functions | |
NLSSOLLeastSq (Model &model) | |
standard constructor | |
NLSSOLLeastSq (NoDBBaseConstructor, Model &model) | |
alternate constructor | |
~NLSSOLLeastSq () | |
destructor | |
void | minimize_residuals () |
Used within the least squares branch for minimizing the sum of squares residuals. Redefines the run virtual function for the least squares branch. | |
Static Private Member Functions | |
static void | least_sq_eval (int &mode, int &m, int &n, int &nrowfj, double *x, double *f, double *gradf, int &nstate) |
Evaluator for NLSSOL: computes the values and first derivatives of the least squares terms (passed by function pointer to NLSSOL). | |
Static Private Attributes | |
static NLSSOLLeastSq * | nlssolInstance |
pointer to the active object instance used within the static evaluator functions in order to avoid the need for static data |
Wrapper class for the NLSSOL nonlinear least squares library.
The NLSSOLLeastSq class provides a wrapper for NLSSOL, a Fortran 77 sequential quadratic programming library from Stanford University marketed by Stanford Business Associates. It uses a function pointer approach for which passed functions must be either global functions or static member functions. Any nonstatic attribute used within static member functions must be either local to that function or accessed through a static pointer.
The user input mappings are as follows: max_function_evaluations
is implemented directly in NLSSOLLeastSq's evaluator functions since there is no NLSSOL parameter equivalent, and max_iterations
, convergence_tolerance
, output
verbosity, verify_level
, function_precision
, and linesearch_tolerance
are mapped into NLSSOL's "Major Iteration Limit", "Optimality Tolerance", "Major
Print Level" (verbose:
Major Print Level = 20; quiet:
Major Print Level = 10), "Verify Level", "Function Precision", and "Linesearch Tolerance" parameters, respectively, using NLSSOL's npoptn() subroutine (as wrapped by npoptn2() from the npoptn_wrapper.f file). Refer to [Gill, P.E., Murray, W., Saunders, M.A., and Wright, M.H., 1986] for information on NLSSOL's optional input parameters and the npoptn() subroutine.
NLSSOLLeastSq | ( | Model & | model | ) |
standard constructor
This is the primary constructor. It accepts a Model reference.
References Minimizer::constraintTol, Iterator::convergenceTol, Iterator::fdGradStepSize, ProblemDescDB::get_int(), ProblemDescDB::get_real(), Iterator::gradientType, Iterator::maxIterations, Iterator::outputLevel, Iterator::probDescDB, SOLBase::set_options(), Minimizer::speculativeFlag, and Minimizer::vendorNumericalGradFlag.
NLSSOLLeastSq | ( | NoDBBaseConstructor | , |
Model & | model | ||
) |
alternate constructor
This is an alternate constructor which accepts a Model but does not have a supporting method specification from the ProblemDescDB.
References Minimizer::constraintTol, Iterator::convergenceTol, Iterator::fdGradStepSize, Iterator::gradientType, Iterator::maxIterations, Iterator::outputLevel, SOLBase::set_options(), Minimizer::speculativeFlag, and Minimizer::vendorNumericalGradFlag.