SG++
sgpp::optimization::optimizer::AugmentedLagrangian Class Reference

Augmented Lagrangian method for constrained optimization. More...

#include <AugmentedLagrangian.hpp>

Inheritance diagram for sgpp::optimization::optimizer::AugmentedLagrangian:
sgpp::optimization::optimizer::ConstrainedOptimizer sgpp::optimization::optimizer::UnconstrainedOptimizer

Public Member Functions

 AugmentedLagrangian (const ScalarFunction &f, const ScalarFunctionGradient &fGradient, const VectorFunction &g, const VectorFunctionGradient &gGradient, const VectorFunction &h, const VectorFunctionGradient &hGradient, size_t maxItCount=DEFAULT_N, double xTolerance=DEFAULT_X_TOLERANCE, double constraintTolerance=DEFAULT_CONSTRAINT_TOLERANCE, double penaltyStartValue=DEFAULT_PENALTY_START_VALUE, double penaltyIncreaseFactor=DEFAULT_PENALTY_INCREASE_FACTOR)
 Constructor. More...
 
 AugmentedLagrangian (const AugmentedLagrangian &other)
 Copy constructor. More...
 
void clone (std::unique_ptr< UnconstrainedOptimizer > &clone) const override
 
base::DataVector findFeasiblePoint () const
 Try to find a feasible initial point by solving an auxiliary problem. More...
 
double getConstraintTolerance () const
 
VectorFunctionGradientgetEqualityConstraintGradient () const
 
const std::vector< size_t > & getHistoryOfInnerIterationNumbers () const
 
const base::DataMatrixgetHistoryOfInnerIterationPoints () const
 
VectorFunctionGradientgetInequalityConstraintGradient () const
 
ScalarFunctionGradientgetObjectiveGradient () const
 
double getPenaltyIncreaseFactor () const
 
double getPenaltyStartValue () const
 
double getXTolerance () const
 
void optimize () override
 Pure virtual method for optimization of the objective function. More...
 
void setConstraintTolerance (double constraintTolerance)
 
void setPenaltyIncreaseFactor (double penaltyIncreaseFactor)
 
void setPenaltyStartValue (double penaltyStartValue)
 
void setXTolerance (double xTolerance)
 
 ~AugmentedLagrangian () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::optimizer::ConstrainedOptimizer
 ConstrainedOptimizer (const ScalarFunction &f, const VectorFunction &g, const VectorFunction &h, size_t N=DEFAULT_N)
 Constructor. More...
 
 ConstrainedOptimizer (const ConstrainedOptimizer &other)
 Copy constructor. More...
 
VectorFunctiongetEqualityConstraintFunction () const
 
VectorFunctiongetInequalityConstraintFunction () const
 
 ~ConstrainedOptimizer () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
const base::DataMatrixgetHistoryOfOptimalPoints () const
 
const base::DataVectorgetHistoryOfOptimalValues () const
 
size_t getN () const
 
ScalarFunctiongetObjectiveFunction () const
 
const base::DataVectorgetOptimalPoint () const
 
double getOptimalValue () const
 
const base::DataVectorgetStartingPoint () const
 
void setN (size_t N)
 
void setStartingPoint (const base::DataVector &startingPoint)
 
 UnconstrainedOptimizer (const ScalarFunction &f, size_t N=DEFAULT_N)
 Constructor. More...
 
 UnconstrainedOptimizer (const UnconstrainedOptimizer &other)
 Copy constructor. More...
 
virtual ~UnconstrainedOptimizer ()
 Destructor. More...
 

Static Public Attributes

static constexpr double DEFAULT_CONSTRAINT_TOLERANCE = 1e-6
 default constraint tolerance More...
 
static constexpr double DEFAULT_PENALTY_INCREASE_FACTOR = 1.0
 default penalty increase factor More...
 
static constexpr double DEFAULT_PENALTY_START_VALUE = 1.0
 default penalty start value More...
 
static constexpr double DEFAULT_X_TOLERANCE = 1e-6
 default point tolerance More...
 
- Static Public Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
static const size_t DEFAULT_N = 1000
 default maximal number of iterations or function evaluations More...
 

Protected Attributes

double epsilon
 constraint tolerance More...
 
std::unique_ptr< ScalarFunctionGradientfGradient
 objective function gradient More...
 
std::unique_ptr< VectorFunctionGradientgGradient
 inequality constraint function gradient More...
 
std::unique_ptr< VectorFunctionGradienthGradient
 equality constraint function gradient More...
 
std::vector< size_t > kHistInner
 search history (number of inner iterations) More...
 
double mu0
 penalty start value More...
 
double rhoMuPlus
 penalty increase factor More...
 
double theta
 point tolerance More...
 
base::DataMatrix xHistInner
 search history (inner iterations) More...
 
- Protected Attributes inherited from sgpp::optimization::optimizer::ConstrainedOptimizer
std::unique_ptr< VectorFunctiong
 inequality constraint function More...
 
std::unique_ptr< VectorFunctionh
 equality constraint function More...
 
- Protected Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
std::unique_ptr< ScalarFunctionf
 objective function More...
 
base::DataVector fHist
 search history vector (optimal values) More...
 
double fOpt
 result of optimization (optimal function value) More...
 
size_t N
 maximal number of iterations or function evaluations More...
 
base::DataVector x0
 starting point More...
 
base::DataMatrix xHist
 search history matrix (optimal points) More...
 
base::DataVector xOpt
 result of optimization (location of optimum) More...
 

Detailed Description

Augmented Lagrangian method for constrained optimization.

Constructor & Destructor Documentation

sgpp::optimization::optimizer::AugmentedLagrangian::AugmentedLagrangian ( const ScalarFunction f,
const ScalarFunctionGradient fGradient,
const VectorFunction g,
const VectorFunctionGradient gGradient,
const VectorFunction h,
const VectorFunctionGradient hGradient,
size_t  maxItCount = DEFAULT_N,
double  xTolerance = DEFAULT_X_TOLERANCE,
double  constraintTolerance = DEFAULT_CONSTRAINT_TOLERANCE,
double  penaltyStartValue = DEFAULT_PENALTY_START_VALUE,
double  penaltyIncreaseFactor = DEFAULT_PENALTY_INCREASE_FACTOR 
)

Constructor.

Parameters
fobjective function
fGradientobjective function gradient
ginequality constraint
gGradientinequality constraint gradient
hequality constraint
hGradientequality constraint gradient
maxItCountmaximal number of function evaluations
xTolerancepoint tolerance
constraintToleranceconstraint tolerance
penaltyStartValuepenalty start value
penaltyIncreaseFactorpenalty increase factor

References sgpp::optimization::ScalarFunctionGradient::clone(), and sgpp::optimization::VectorFunctionGradient::clone().

Referenced by clone().

sgpp::optimization::optimizer::AugmentedLagrangian::AugmentedLagrangian ( const AugmentedLagrangian other)

Copy constructor.

Parameters
otheroptimizer to be copied

References fGradient, gGradient, and hGradient.

sgpp::optimization::optimizer::AugmentedLagrangian::~AugmentedLagrangian ( )
override

Destructor.

Member Function Documentation

void sgpp::optimization::optimizer::AugmentedLagrangian::clone ( std::unique_ptr< UnconstrainedOptimizer > &  clone) const
overridevirtual
Parameters
[out]clonepointer to cloned object

Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.

References AugmentedLagrangian().

base::DataVector sgpp::optimization::optimizer::AugmentedLagrangian::findFeasiblePoint ( ) const
double sgpp::optimization::optimizer::AugmentedLagrangian::getConstraintTolerance ( ) const
Returns
constraint tolerance

References epsilon.

VectorFunctionGradient & sgpp::optimization::optimizer::AugmentedLagrangian::getEqualityConstraintGradient ( ) const
Returns
equality constraint function gradient

References hGradient.

const std::vector< size_t > & sgpp::optimization::optimizer::AugmentedLagrangian::getHistoryOfInnerIterationNumbers ( ) const
Returns
vector in which the k-th entry indicates the number of inner iterations in the k-th (outer) iteration, empty vector on error

References kHistInner.

const base::DataMatrix & sgpp::optimization::optimizer::AugmentedLagrangian::getHistoryOfInnerIterationPoints ( ) const
Returns
tall matrix (d columns) in which the history of optimal points of the iterations are concatenated

References xHistInner.

VectorFunctionGradient & sgpp::optimization::optimizer::AugmentedLagrangian::getInequalityConstraintGradient ( ) const
Returns
inequality constraint function gradient

References gGradient.

ScalarFunctionGradient & sgpp::optimization::optimizer::AugmentedLagrangian::getObjectiveGradient ( ) const
Returns
objective function gradient

References fGradient.

double sgpp::optimization::optimizer::AugmentedLagrangian::getPenaltyIncreaseFactor ( ) const
Returns
penalty increase factor

References rhoMuPlus.

double sgpp::optimization::optimizer::AugmentedLagrangian::getPenaltyStartValue ( ) const
Returns
penalty start value

References mu0.

double sgpp::optimization::optimizer::AugmentedLagrangian::getXTolerance ( ) const
Returns
point tolerance

References theta.

void sgpp::optimization::optimizer::AugmentedLagrangian::optimize ( )
overridevirtual

Pure virtual method for optimization of the objective function.

The result of the optimization process can be obtained by member functions, e.g., getOptimalPoint() and getOptimalValue().

Implements sgpp::optimization::optimizer::UnconstrainedOptimizer.

References sgpp::base::DataVector::append(), sgpp::base::DataMatrix::appendRow(), epsilon, sgpp::optimization::optimizer::UnconstrainedOptimizer::f, fGradient, sgpp::optimization::optimizer::UnconstrainedOptimizer::fHist, sgpp::optimization::optimizer::UnconstrainedOptimizer::fOpt, sgpp::optimization::optimizer::ConstrainedOptimizer::g, sgpp::optimization::optimizer::UnconstrainedOptimizer::getHistoryOfOptimalPoints(), sgpp::optimization::Printer::getInstance(), sgpp::base::DataMatrix::getNrows(), sgpp::optimization::optimizer::UnconstrainedOptimizer::getOptimalPoint(), gGradient, sgpp::optimization::optimizer::ConstrainedOptimizer::h, hGradient, kHistInner, sgpp::base::DataVector::l2Norm(), lambda, sgpp::base::DataVector::max(), sgpp::base::DataVector::maxNorm(), mG, mH, mu, mu0, sgpp::optimization::optimizer::UnconstrainedOptimizer::N, sgpp::optimization::optimizer::AdaptiveGradientDescent::optimize(), sgpp::optimization::Printer::printStatusBegin(), sgpp::optimization::Printer::printStatusEnd(), sgpp::optimization::Printer::printStatusUpdate(), sgpp::base::DataMatrix::resize(), rhoMuPlus, sgpp::optimization::optimizer::UnconstrainedOptimizer::setStartingPoint(), sgpp::base::DataVector::sub(), theta, sgpp::base::DataVector::toString(), sgpp::optimization::optimizer::UnconstrainedOptimizer::x0, sgpp::optimization::optimizer::UnconstrainedOptimizer::xHist, xHistInner, and sgpp::optimization::optimizer::UnconstrainedOptimizer::xOpt.

Referenced by findFeasiblePoint().

void sgpp::optimization::optimizer::AugmentedLagrangian::setConstraintTolerance ( double  constraintTolerance)
Parameters
constraintToleranceconstraint tolerance

References epsilon.

void sgpp::optimization::optimizer::AugmentedLagrangian::setPenaltyIncreaseFactor ( double  penaltyIncreaseFactor)
Parameters
penaltyIncreaseFactorpenalty increase factor

References rhoMuPlus.

void sgpp::optimization::optimizer::AugmentedLagrangian::setPenaltyStartValue ( double  penaltyStartValue)
Parameters
penaltyStartValuepenalty start value

References mu0.

void sgpp::optimization::optimizer::AugmentedLagrangian::setXTolerance ( double  xTolerance)
Parameters
xTolerancepoint tolerance

References theta.

Member Data Documentation

constexpr double sgpp::optimization::optimizer::AugmentedLagrangian::DEFAULT_CONSTRAINT_TOLERANCE = 1e-6
static

default constraint tolerance

constexpr double sgpp::optimization::optimizer::AugmentedLagrangian::DEFAULT_PENALTY_INCREASE_FACTOR = 1.0
static

default penalty increase factor

constexpr double sgpp::optimization::optimizer::AugmentedLagrangian::DEFAULT_PENALTY_START_VALUE = 1.0
static

default penalty start value

constexpr double sgpp::optimization::optimizer::AugmentedLagrangian::DEFAULT_X_TOLERANCE = 1e-6
static

default point tolerance

double sgpp::optimization::optimizer::AugmentedLagrangian::epsilon
protected

constraint tolerance

Referenced by getConstraintTolerance(), optimize(), and setConstraintTolerance().

std::unique_ptr<ScalarFunctionGradient> sgpp::optimization::optimizer::AugmentedLagrangian::fGradient
protected

objective function gradient

Referenced by AugmentedLagrangian(), getObjectiveGradient(), and optimize().

std::unique_ptr<VectorFunctionGradient> sgpp::optimization::optimizer::AugmentedLagrangian::gGradient
protected

inequality constraint function gradient

Referenced by AugmentedLagrangian(), findFeasiblePoint(), getInequalityConstraintGradient(), and optimize().

std::unique_ptr<VectorFunctionGradient> sgpp::optimization::optimizer::AugmentedLagrangian::hGradient
protected

equality constraint function gradient

Referenced by AugmentedLagrangian(), findFeasiblePoint(), getEqualityConstraintGradient(), and optimize().

std::vector<size_t> sgpp::optimization::optimizer::AugmentedLagrangian::kHistInner
protected

search history (number of inner iterations)

Referenced by getHistoryOfInnerIterationNumbers(), and optimize().

double sgpp::optimization::optimizer::AugmentedLagrangian::mu0
protected

penalty start value

Referenced by getPenaltyStartValue(), optimize(), and setPenaltyStartValue().

double sgpp::optimization::optimizer::AugmentedLagrangian::rhoMuPlus
protected

penalty increase factor

Referenced by getPenaltyIncreaseFactor(), optimize(), and setPenaltyIncreaseFactor().

double sgpp::optimization::optimizer::AugmentedLagrangian::theta
protected

point tolerance

Referenced by getXTolerance(), optimize(), and setXTolerance().

base::DataMatrix sgpp::optimization::optimizer::AugmentedLagrangian::xHistInner
protected

search history (inner iterations)

Referenced by getHistoryOfInnerIterationPoints(), and optimize().


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