YANE-Framework 1.1.0
Public Member Functions

yane::YaneIpopt::NLPProblem Class Reference

Class to implement the problem which should be solved with Ipopt.

Collaboration diagram for yane::YaneIpopt::NLPProblem:
[legend]

List of all members.

Public Member Functions

void getLagrParams (double *lambda)
 Function which returns the Lagrange parameters which belongs to the current optimal solution x.
void getRestJac (double *jac)
 Function to calculate the jacobian of the restriction for the current optimal x.
void initializeProblem (double *x0, double *lb, double *ub, yane::Utils::RTClock *clock, double aborttime, double *rpar=0, int *ipar=0)
 Function to initialize the problem.
void lagrangian (double *x, double *lambda, double objfactor, double *fx)
 Function to calculate the lagranian.
 NLPProblem (int n, yane::MinProg::T_FUNC func, yane::MinProg::T_FUNC rest, int nrest, int nrest_eq, yane::MinProg::T_FUNC df, yane::MinProg::T_FUNC dg, yane::MinProg::T_FUNCTIONSTRUCT *f_struct, yane::MinProg::T_RESTRICTIONSTRUCT *r_struct)
 Constructor.
 ~NLPProblem ()
 Destructor.

Constructor & Destructor Documentation

yane::YaneIpopt::NLPProblem::NLPProblem ( int  n,
yane::MinProg::T_FUNC  func,
yane::MinProg::T_FUNC  rest,
int  nrest,
int  nrest_eq,
yane::MinProg::T_FUNC  df,
yane::MinProg::T_FUNC  dg,
yane::MinProg::T_FUNCTIONSTRUCT f_struct,
yane::MinProg::T_RESTRICTIONSTRUCT r_struct 
)
Parameters:
nDimension of the optimization variable
funcObjective function
restConstraints
nrestNumber of constraints (both equality and inequality constraints)
nrest_eqNumber of equality constraints
These have to be listed first within the definition of the constraints
dfGradient of the objective function
dgJacobian matrix of the restriction function
f_structparameterstruct which contains parameteres for the objective function
r_structparameterstruct which contains parameteres for the constraints
Exceptions:
yane::Utils::MemoryExceptionIs thrown, if memory allocation has failed

Member Function Documentation

void yane::YaneIpopt::NLPProblem::getLagrParams ( double *  lambda)
Parameters:
lambdaContains Lagrange parameters after functioncall
void yane::YaneIpopt::NLPProblem::getRestJac ( double *  jac)
Parameters:
jacContains the Jacobian after functioncall
Exceptions:
yane::Utils::ExceptionIs thrown, if function evaluation has failed
void yane::YaneIpopt::NLPProblem::initializeProblem ( double *  x0,
double *  lb,
double *  ub,
yane::Utils::RTClock clock,
double  aborttime,
double *  rpar = 0,
int *  ipar = 0 
)
Parameters:
x0Startvalue
lbLower bound for optimization variable
ubUpper bound for optimization variable
clockRTClock object for time measurement
aborttimeAbort time, after which the optimization will be stopped.
rparReal-valued parameters
iparIntegere parameters
void yane::YaneIpopt::NLPProblem::lagrangian ( double *  x,
double *  lambda,
double  objfactor,
double *  fx 
)
Parameters:
xOptimizationvariable
objfactorFactor which would be multiplied to F(x)
lambdaLagrange-parameters
fxContains Lagranian after functioncall