![]() |
YANE-Framework 1.1.0
|
Wrapper class for the SQP routine e04wdc from NAGC.
Public Member Functions | |
virtual double | abortTime () |
Function which returns the current abort time, after which the optimization would be stopped. | |
virtual void | calcMin (double *x0, double *fx, double *lb, double *ub, double *rpar=0, int *ipar=0) |
Function which solves the minimization problem. | |
virtual yane::MinProg::NLP * | clone () |
Function to clone the object with the current configuration. | |
virtual void | getLagrangeParameters (double *lambda) |
Function which returns the Lagrange parameters of the nonlinear contraints regarding to the calculated optimal solution. | |
virtual void | getRestrictionJacobi (double *jac) |
Function which returns the Jacobian of the Restriction. | |
virtual void | init (int n, yane::MinProg::T_FUNC func, yane::MinProg::T_FUNC rest=0, int nrest=0, int nrest_eq=0, yane::MinProg::T_FUNC df=0, yane::MinProg::T_FUNC dg=0) |
Function to initialize the minimization problem. | |
virtual yane::MinProg::T_MEMMODEL | memoryModel () const |
Function to specify the memorymodel (by-line or by-column) | |
Nag_E04State * | nagState () |
Function to get access to options of the NAG routine. | |
virtual void | setAbortTime (double time) |
Function to set abort time, after which the optimization will be stopped. | |
virtual void | setAccuracy (double acc) |
Function to set the accuracy of the optimization routine. | |
virtual void | setMaxIterations (int num) |
Function to set the maximum number of iterations for the optimization routine. | |
void | setNAGMemoryFactor (double factor) |
Function to set the maximal size of available memeory for the NagC routine. | |
SqpNagC () | |
Default-Constructor. | |
SqpNagC (int n, yane::MinProg::T_FUNC func, yane::MinProg::T_FUNC rest=0, int nrest=0, int nrest_eq=0, yane::MinProg::T_FUNC df=0, yane::MinProg::T_FUNC dg=0) | |
Constructor. | |
virtual | ~SqpNagC () |
Destructor. | |
Public Attributes | |
T_FUNCTIONSTRUCT * | func_params |
Structure containing the dynamic of the system. | |
T_RESTRICTIONSTRUCT * | restr_params |
Structure containing the restrictions of the system. | |
Protected Attributes | |
double | _aborttime |
Saves the maximal allowed runtime for the optimization. | |
yane::Utils::RTClock * | _clock |
Internal clock (time measurement for aborttime) | |
int | _dimension |
Dimension of the optimization variable. | |
int | _dimension_rest |
Number of constriants. | |
int | _dimension_resteq |
Number of equality constraints. | |
T_FUNC | _function |
Function pointer of the objective function. | |
T_FUNC | _function_diff |
Function pointer of the gradient of the objective function. | |
T_FUNC | _restrictions |
Function pointer of the constraints. | |
T_FUNC | _restrictions_diff |
Function pointer of the Jacobian of the constraints. |
yane::SqpNagC3::SqpNagC::SqpNagC | ( | int | n, |
yane::MinProg::T_FUNC | func, | ||
yane::MinProg::T_FUNC | rest = 0 , |
||
int | nrest = 0 , |
||
int | nrest_eq = 0 , |
||
yane::MinProg::T_FUNC | df = 0 , |
||
yane::MinProg::T_FUNC | dg = 0 |
||
) |
n | Dimension of the optimization variable |
func | Objective function |
rest | Constraints |
nrest | Number of constraints (both equality and inequality constraints) |
nrest_eq | number of equality constraints These have to be listed first within the definition of the constraints |
df | Gradient of the objective function |
dg | Jacobian matrix of the restriction function |
yane::Utils::MemoryException | Is thrown, if memory allocation has failed |
yane::Utils::Exception | Is thrown, if initialization of the class has failed |
yane::MinProg::InitializingException | Is thrown, if default configurations could not be set |
LIB_EXPORT double yane::MinProg::NLP::abortTime | ( | ) | [virtual, inherited] |
LIB_EXPORT void yane::SqpNagC3::SqpNagC::calcMin | ( | double * | x0, |
double * | fx, | ||
double * | lb, | ||
double * | ub, | ||
double * | rpar = 0 , |
||
int * | ipar = 0 |
||
) | [virtual] |
x | Initial guess of the optimization variable Once the algorithm terminates successfully it contains the minimizer of the objective function |
fx | Optimal objective function value |
lb | Lower bounds for the optimization variable |
ub | Upper bounds for the optimization variable |
rpar | Vector of real-valued parameters |
ipar | Vector of integer paramaters |
SolverWarning | Is thrown, if optimization terminates with an noncritical error |
SolverError | Is thrown, if optimization terminates with a known critical error |
yane::MinProg::MinProgException | Is thrown, if optimization terminates with an unknown error |
yane::Utils::Exception | Is thrown, if evaluations could not be done |
Implements yane::MinProg::NLP.
LIB_EXPORT yane::MinProg::NLP * yane::SqpNagC3::SqpNagC::clone | ( | ) | [virtual] |
yane::Utils::MemoryException | Is thrown, if memory allocation of the clone fails |
Implements yane::MinProg::NLP.
LIB_EXPORT void yane::SqpNagC3::SqpNagC::getLagrangeParameters | ( | double * | lambda | ) | [virtual] |
lambda | Pointer to an array of length dimension_rest, contains the Lagrange parameters |
yane::Utils::MemoryException | Is thrown, if lambda is a zero-pointer |
Implements yane::MinProg::NLP.
LIB_EXPORT void yane::SqpNagC3::SqpNagC::getRestrictionJacobi | ( | double * | jac | ) | [virtual] |
jac | Pointer to an array of length dimension * dimension_rest After termination of this function, jac contains the jacobian saved by-line or by-column |
yane::Utils::MemoryException | Is thrown, if jac is a zero-pointer |
yane::Utils::Exception | Is thrown, if calculation fails |
Implements yane::MinProg::NLP.
virtual void yane::SqpNagC3::SqpNagC::init | ( | int | n, |
yane::MinProg::T_FUNC | func, | ||
yane::MinProg::T_FUNC | rest = 0 , |
||
int | nrest = 0 , |
||
int | nrest_eq = 0 , |
||
yane::MinProg::T_FUNC | df = 0 , |
||
yane::MinProg::T_FUNC | dg = 0 |
||
) | [virtual] |
n | Dimension of the optimizationvariable |
func | Objective function |
rest | Consrraints |
nrest | Number of constraints (both equality and inequality constraints) |
nrest_eq | Number of equality constraints These have to be listed first within the definition of the constraints |
df | Gradient of the objective function |
dg | Jacobian matrix of the constraints |
yane::Utils::MemoryException | Is thrown, if memory allocation fails |
yane::Utils::Exception | Is thrown, if initialization of the NLP object fails |
Reimplemented from yane::MinProg::NLP.
LIB_EXPORT Nag_E04State * yane::SqpNagC3::SqpNagC::nagState | ( | ) |
LIB_EXPORT void yane::MinProg::NLP::setAbortTime | ( | double | time | ) | [virtual, inherited] |
time | Abort time in seconds |
Reimplemented in yane::YaneIpopt::YaneIpopt.
LIB_EXPORT void yane::SqpNagC3::SqpNagC::setAccuracy | ( | double | acc | ) | [virtual] |
acc | Accuracy of the minimization routine |
InitializingException | Is thrown, if acc <= 0.0 |
Implements yane::MinProg::NLP.
LIB_EXPORT void yane::SqpNagC3::SqpNagC::setMaxIterations | ( | int | num | ) | [virtual] |
num | Maximal number of iterations |
InitializingException | Is thrown, if num <= 0 |
Implements yane::MinProg::NLP.
LIB_EXPORT void yane::SqpNagC3::SqpNagC::setNAGMemoryFactor | ( | double | factor | ) |
factor | relativ factor for memory allocation |