![]() |
YANE-Framework 1.1.0
|
Class for the Interior-Point routine Ipopt.
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) |
virtual yane::MinProg::T_MEMMODEL | memoryModel () const |
Function to set the column by column memorymodel for multidimensional arrays. | |
Ipopt::SmartPtr < Ipopt::OptionsList > | options () |
Function to get access to the options of Ipopt. | |
virtual void | setAbortTime (double aborttime) |
Function to set abort time, after which the optimization will be stopped. | |
void | setAcceptableMaxIter (int acceptable_iter) |
Function to set the maximal number of iterations for the second level of termination criteria (see Ipopt) | |
void | setAcceptableTolerance (double acceptable_tol) |
Function to set the tolerance for the second level of termination criteria (see Ipopt) | |
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 | setNumberLinearConstraints (int nlincon) |
Function to set the number of linear constraints. | |
YaneIpopt () | |
Default-Constructor. | |
YaneIpopt (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 | ~YaneIpopt () |
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. |
LIB_EXPORT yane::YaneIpopt::YaneIpopt::YaneIpopt | ( | 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 or creation of NLPProblem has failed |
yane::Utils::Exception | Is thrown, if initialization of the class has failed |
LIB_EXPORT double yane::MinProg::NLP::abortTime | ( | ) | [virtual, inherited] |
LIB_EXPORT void yane::YaneIpopt::YaneIpopt::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::YaneIpopt::YaneIpopt::clone | ( | ) | [virtual] |
yane::Utils::MemoryException | Is thrown, if memory allocation of the clone fails |
Implements yane::MinProg::NLP.
LIB_EXPORT void yane::YaneIpopt::YaneIpopt::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::YaneIpopt::YaneIpopt::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.
LIB_EXPORT void yane::YaneIpopt::YaneIpopt::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] |
Optionpointer from Ipopt
Reimplemented from yane::MinProg::NLP.
LIB_EXPORT Ipopt::SmartPtr< Ipopt::OptionsList > yane::YaneIpopt::YaneIpopt::options | ( | ) |
LIB_EXPORT void yane::YaneIpopt::YaneIpopt::setAbortTime | ( | double | time | ) | [virtual] |
time | Abort time in seconds |
Reimplemented from yane::MinProg::NLP.
LIB_EXPORT void yane::YaneIpopt::YaneIpopt::setAcceptableMaxIter | ( | int | acceptable_iter | ) |
acceptable_iter | Maximal number of iterations for the second level of termination criteria |
LIB_EXPORT void yane::YaneIpopt::YaneIpopt::setAcceptableTolerance | ( | double | acceptable_tol | ) |
tolerance | Tolerance for the second level of termination criteria (see Ipopt) |
LIB_EXPORT void yane::YaneIpopt::YaneIpopt::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::YaneIpopt::YaneIpopt::setMaxIterations | ( | int | num | ) | [virtual] |
num | Maximal number of iterations |
InitializingException | Is thrown, if num <= 0 |
Implements yane::MinProg::NLP.
LIB_EXPORT void yane::YaneIpopt::YaneIpopt::setNumberLinearConstraints | ( | int | nlincon | ) |
nlincon | Number of linear constraints |