YANE-Framework 1.1.0
Public Member Functions | Public Attributes | Protected Attributes

yane::SqpNagC3::SqpNagC Class Reference

Wrapper class for the SQP routine e04wdc from NAGC.

Inheritance diagram for yane::SqpNagC3::SqpNagC:
[legend]
Collaboration diagram for yane::SqpNagC3::SqpNagC:
[legend]

List of all members.

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::NLPclone ()
 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.

Constructor & Destructor Documentation

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 
)
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
Exceptions:
yane::Utils::MemoryExceptionIs thrown, if memory allocation has failed
yane::Utils::ExceptionIs thrown, if initialization of the class has failed
yane::MinProg::InitializingExceptionIs thrown, if default configurations could not be set

Member Function Documentation

LIB_EXPORT double yane::MinProg::NLP::abortTime ( ) [virtual, inherited]
Returns:
Abort time in seconds
LIB_EXPORT void yane::SqpNagC3::SqpNagC::calcMin ( double *  x0,
double *  fx,
double *  lb,
double *  ub,
double *  rpar = 0,
int *  ipar = 0 
) [virtual]
Parameters:
xInitial guess of the optimization variable
Once the algorithm terminates successfully it contains the minimizer of the objective function
fxOptimal objective function value
lbLower bounds for the optimization variable
ubUpper bounds for the optimization variable
rparVector of real-valued parameters
iparVector of integer paramaters
Exceptions:
SolverWarningIs thrown, if optimization terminates with an noncritical error
SolverErrorIs thrown, if optimization terminates with a known critical error
yane::MinProg::MinProgExceptionIs thrown, if optimization terminates with an unknown error
yane::Utils::ExceptionIs thrown, if evaluations could not be done

Implements yane::MinProg::NLP.

LIB_EXPORT yane::MinProg::NLP * yane::SqpNagC3::SqpNagC::clone ( ) [virtual]
Exceptions:
yane::Utils::MemoryExceptionIs thrown, if memory allocation of the clone fails
Returns:
Pointer to the cloned NLP object

Implements yane::MinProg::NLP.

LIB_EXPORT void yane::SqpNagC3::SqpNagC::getLagrangeParameters ( double *  lambda) [virtual]
Parameters:
lambdaPointer to an array of length dimension_rest, contains the Lagrange parameters
Exceptions:
yane::Utils::MemoryExceptionIs thrown, if lambda is a zero-pointer

Implements yane::MinProg::NLP.

LIB_EXPORT void yane::SqpNagC3::SqpNagC::getRestrictionJacobi ( double *  jac) [virtual]
Parameters:
jacPointer to an array of length dimension * dimension_rest
After termination of this function, jac contains the jacobian saved by-line or by-column
Exceptions:
yane::Utils::MemoryExceptionIs thrown, if jac is a zero-pointer
yane::Utils::ExceptionIs 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]
Parameters:
nDimension of the optimizationvariable
funcObjective function
restConsrraints
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 constraints
Exceptions:
yane::Utils::MemoryExceptionIs thrown, if memory allocation fails
yane::Utils::ExceptionIs thrown, if initialization of the NLP object fails

Reimplemented from yane::MinProg::NLP.

LIB_EXPORT Nag_E04State * yane::SqpNagC3::SqpNagC::nagState ( )
Returns:
Returns the state varialbe of NAG routine
LIB_EXPORT void yane::MinProg::NLP::setAbortTime ( double  time) [virtual, inherited]
Parameters:
timeAbort time in seconds

Reimplemented in yane::YaneIpopt::YaneIpopt.

LIB_EXPORT void yane::SqpNagC3::SqpNagC::setAccuracy ( double  acc) [virtual]
Parameters:
accAccuracy of the minimization routine
Exceptions:
InitializingExceptionIs thrown, if acc <= 0.0

Implements yane::MinProg::NLP.

LIB_EXPORT void yane::SqpNagC3::SqpNagC::setMaxIterations ( int  num) [virtual]
Parameters:
numMaximal number of iterations
Exceptions:
InitializingExceptionIs thrown, if num <= 0

Implements yane::MinProg::NLP.

LIB_EXPORT void yane::SqpNagC3::SqpNagC::setNAGMemoryFactor ( double  factor)
Parameters:
factorrelativ factor for memory allocation