DOpE
Public Member Functions | Static Public Member Functions
DOpE::Reduced_SnoptAlgorithm< PROBLEM, VECTOR > Class Template Reference

#include <reduced_snopt_algorithm.h>

Inheritance diagram for DOpE::Reduced_SnoptAlgorithm< PROBLEM, VECTOR >:
DOpE::ReducedAlgorithm< PROBLEM, VECTOR >

Public Member Functions

 Reduced_SnoptAlgorithm (PROBLEM *OP, ReducedProblemInterface< PROBLEM, VECTOR > *S, DOpEtypes::VectorStorageType vector_behavior, ParameterReader &param_reader, DOpEExceptionHandler< VECTOR > *Except=NULL, DOpEOutputHandler< VECTOR > *Output=NULL, int base_priority=0)
 
 ~Reduced_SnoptAlgorithm ()
 
virtual int Solve (ControlVector< VECTOR > &q, double global_tol=-1.)
 
- Public Member Functions inherited from DOpE::ReducedAlgorithm< PROBLEM, VECTOR >
 ReducedAlgorithm (PROBLEM *OP, ReducedProblemInterface< PROBLEM, VECTOR > *S, ParameterReader &param_reader, DOpEExceptionHandler< VECTOR > *Except=NULL, DOpEOutputHandler< VECTOR > *Output=NULL, int base_priority=0)
 
virtual ~ReducedAlgorithm ()
 
virtual void ReInit ()
 
virtual void SolveForward (ControlVector< VECTOR > &q)
 
virtual void CheckGrads (double c, ControlVector< VECTOR > &q, ControlVector< VECTOR > &dq, unsigned int niter=1, double eps=1.)
 
virtual void FirstDifferenceQuotient (double exact, double eps, const ControlVector< VECTOR > &q, const ControlVector< VECTOR > &dq)
 
virtual void CheckHessian (double c, ControlVector< VECTOR > &q, ControlVector< VECTOR > &dq, unsigned int niter=1, double eps=1.)
 
virtual void SecondDifferenceQuotient (double exact, double eps, const ControlVector< VECTOR > &q, const ControlVector< VECTOR > &dq)
 
DOpEExceptionHandler< VECTOR > * GetExceptionHandler ()
 
DOpEOutputHandler< VECTOR > * GetOutputHandler ()
 

Static Public Member Functions

static void declare_params (ParameterReader &param_reader)
 
- Static Public Member Functions inherited from DOpE::ReducedAlgorithm< PROBLEM, VECTOR >
static void declare_params (ParameterReader &param_reader)
 

Additional Inherited Members

- Protected Member Functions inherited from DOpE::ReducedAlgorithm< PROBLEM, VECTOR >
PROBLEM * GetProblem ()
 
const PROBLEM * GetProblem () const
 
const ReducedProblemInterface
< PROBLEM, VECTOR > * 
GetReducedProblem () const
 
ReducedProblemInterface
< PROBLEM, VECTOR > * 
GetReducedProblem ()
 
int GetBasePriority () const
 

Detailed Description

template<typename PROBLEM, typename VECTOR>
class DOpE::Reduced_SnoptAlgorithm< PROBLEM, VECTOR >

This class provides a solver for constrained optimization problems in reduced form, i.e., the dependent variable given by an equality constraint is assumed to be eliminated by solving the equation. I.e., we solve the problem min j(q) s.t., a q b, g(q) 0

The solution is done by interfacing to the SNOPT library.

Template Parameters
<PROBLEM>The problem container. See, e.g., OptProblemContainer
<VECTOR>The vector type of the solution.

Constructor & Destructor Documentation

template<typename PROBLEM , typename VECTOR >
DOpE::Reduced_SnoptAlgorithm< PROBLEM, VECTOR >::Reduced_SnoptAlgorithm ( PROBLEM *  OP,
ReducedProblemInterface< PROBLEM, VECTOR > *  S,
DOpEtypes::VectorStorageType  vector_behavior,
ParameterReader param_reader,
DOpEExceptionHandler< VECTOR > *  Except = NULL,
DOpEOutputHandler< VECTOR > *  Output = NULL,
int  base_priority = 0 
)
template<typename PROBLEM , typename VECTOR >
DOpE::Reduced_SnoptAlgorithm< PROBLEM, VECTOR >::~Reduced_SnoptAlgorithm ( )

Member Function Documentation

template<typename PROBLEM , typename VECTOR >
void DOpE::Reduced_SnoptAlgorithm< PROBLEM, VECTOR >::declare_params ( ParameterReader param_reader)
static

Used to declare run time parameters. This is needed to declare all parameters a startup without the need for an object to be already declared.

template<typename PROBLEM , typename VECTOR >
int DOpE::Reduced_SnoptAlgorithm< PROBLEM, VECTOR >::Solve ( ControlVector< VECTOR > &  q,
double  global_tol = -1. 
)
virtual

This solves an Optimizationproblem in only the control variable using the commercial optimization library snopt. To use it you need to define the compiler flag WITH_SNOPT and ensure that all required snopt headers and libraries are within the path or otherwise known.

Parameters
qThe initial point.
global_tolAn optional parameter specifying the required tolerance. The actual tolerance is the maximum of this and the one specified in the param file. Its default value is negative, so that it has no influence if not specified.

Implements DOpE::ReducedAlgorithm< PROBLEM, VECTOR >.


The documentation for this class was generated from the following file: