ROL
Public Member Functions | Protected Attributes | Private Attributes | List of all members
ROL::Problem< Real > Class Template Reference

#include <ROL_Problem.hpp>

+ Inheritance diagram for ROL::Problem< Real >:

Public Member Functions

virtual ~Problem ()
 
 Problem (const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< Vector< Real >> &g=nullPtr)
 Default constructor for OptimizationProblem. More...
 
 Problem (const Problem &problem)
 Copy constructor for OptimizationProblem. More...
 
void addBoundConstraint (const Ptr< BoundConstraint< Real >> &bnd)
 Add a bound constraint. More...
 
void removeBoundConstraint ()
 Remove an existing bound constraint. More...
 
void addProxObjective (const Ptr< ProxObjective< Real >> &prox)
 Add a prox objective. More...
 
void removeProxObjective ()
 Remove an existing prox objective. More...
 
void addConstraint (std::string name, const Ptr< Constraint< Real >> &econ, const Ptr< Vector< Real >> &emul, const Ptr< Vector< Real >> &eres=nullPtr, bool reset=false)
 Add an equality constraint. More...
 
void addConstraint (std::string name, const Ptr< Constraint< Real >> &icon, const Ptr< Vector< Real >> &imul, const Ptr< BoundConstraint< Real >> &ibnd, const Ptr< Vector< Real >> &ires=nullPtr, bool reset=false)
 Add an inequality constraint. More...
 
void removeConstraint (std::string name)
 Remove an existing constraint. More...
 
void addLinearConstraint (std::string name, const Ptr< Constraint< Real >> &linear_econ, const Ptr< Vector< Real >> &linear_emul, const Ptr< Vector< Real >> &linear_eres=nullPtr, bool reset=false)
 Add a linear equality constraint. More...
 
void addLinearConstraint (std::string name, const Ptr< Constraint< Real >> &linear_icon, const Ptr< Vector< Real >> &linear_imul, const Ptr< BoundConstraint< Real >> &linear_ibnd, const Ptr< Vector< Real >> &linear_ires=nullPtr, bool reset=false)
 Add a linear inequality constraint. More...
 
void removeLinearConstraint (std::string name)
 Remove an existing linear constraint. More...
 
void setProjectionAlgorithm (ParameterList &parlist)
 Set polyhedral projection algorithm. More...
 
const Ptr< Objective< Real > > & getObjective ()
 Get the objective function. More...
 
const Ptr< Vector< Real > > & getPrimalOptimizationVector ()
 Get the primal optimization space vector. More...
 
const Ptr< Vector< Real > > & getDualOptimizationVector ()
 Get the dual optimization space vector. More...
 
const Ptr< BoundConstraint
< Real > > & 
getBoundConstraint ()
 Get the bound constraint. More...
 
const Ptr< Constraint< Real > > & getConstraint ()
 Get the equality constraint. More...
 
const Ptr< Vector< Real > > & getMultiplierVector ()
 Get the dual constraint space vector. More...
 
const Ptr< Vector< Real > > & getResidualVector ()
 Get the primal constraint space vector. More...
 
const Ptr
< PolyhedralProjection< Real > > & 
getPolyhedralProjection ()
 Get the polyhedral projection object. This is a null pointer if no linear constraints and/or bounds are present. More...
 
EProblem getProblemType ()
 Get the optimization problem type (U, B, E, or G). More...
 
Real checkLinearity (bool printToStream=false, std::ostream &outStream=std::cout) const
 Check if user-supplied linear constraints are affine. More...
 
void checkVectors (bool printToStream=false, std::ostream &outStream=std::cout) const
 Run vector checks for user-supplied vectors. More...
 
void checkDerivatives (bool printToStream=false, std::ostream &outStream=std::cout) const
 Run derivative checks for user-supplied objective function and constraints. More...
 
void check (bool printToStream=false, std::ostream &outStream=std::cout) const
 Run vector, linearity and derivative checks for user-supplied vectors, objective function and constraints. More...
 
virtual void finalize (bool lumpConstraints=false, bool printToStream=false, std::ostream &outStream=std::cout)
 Tranform user-supplied constraints to consist of only bounds and equalities. Optimization problem cannot be modified after finalize has been called without calling the edit function. More...
 
bool isFinalized () const
 Indicate whether or no finalize has been called. More...
 
virtual void edit ()
 Resume editting optimization problem after finalize has been called. More...
 
void finalizeIteration ()
 Transform the optimization variables to the native parameterization after an optimization algorithm has finished. More...
 
virtual ~Problem ()
 
 Problem (const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< Vector< Real >> &g=nullPtr)
 Default constructor for OptimizationProblem. More...
 
 Problem (const Problem &problem)
 Copy constructor for OptimizationProblem. More...
 
void addBoundConstraint (const Ptr< BoundConstraint< Real >> &bnd)
 Add a bound constraint. More...
 
void removeBoundConstraint ()
 Remove an existing bound constraint. More...
 
void addConstraint (std::string name, const Ptr< Constraint< Real >> &econ, const Ptr< Vector< Real >> &emul, const Ptr< Vector< Real >> &eres=nullPtr, bool reset=false)
 Add an equality constraint. More...
 
void addConstraint (std::string name, const Ptr< Constraint< Real >> &icon, const Ptr< Vector< Real >> &imul, const Ptr< BoundConstraint< Real >> &ibnd, const Ptr< Vector< Real >> &ires=nullPtr, bool reset=false)
 Add an inequality constraint. More...
 
void removeConstraint (std::string name)
 Remove an existing constraint. More...
 
void addLinearConstraint (std::string name, const Ptr< Constraint< Real >> &linear_econ, const Ptr< Vector< Real >> &linear_emul, const Ptr< Vector< Real >> &linear_eres=nullPtr, bool reset=false)
 Add a linear equality constraint. More...
 
void addLinearConstraint (std::string name, const Ptr< Constraint< Real >> &linear_icon, const Ptr< Vector< Real >> &linear_imul, const Ptr< BoundConstraint< Real >> &linear_ibnd, const Ptr< Vector< Real >> &linear_ires=nullPtr, bool reset=false)
 Add a linear inequality constraint. More...
 
void removeLinearConstraint (std::string name)
 Remove an existing linear constraint. More...
 
void setProjectionAlgorithm (ParameterList &parlist)
 Set polyhedral projection algorithm. More...
 
void addProximableObjective (const Ptr< Objective< Real >> &nobj)
 
void removeProximableObjective ()
 
const Ptr< Objective< Real > > & getObjective ()
 Get the objective function. More...
 
const Ptr< Objective< Real > > & getProximableObjective ()
 Get proximable objective. More...
 
const Ptr< Vector< Real > > & getPrimalOptimizationVector ()
 Get the primal optimization space vector. More...
 
const Ptr< Vector< Real > > & getDualOptimizationVector ()
 Get the dual optimization space vector. More...
 
const Ptr< BoundConstraint
< Real > > & 
getBoundConstraint ()
 Get the bound constraint. More...
 
const Ptr< Constraint< Real > > & getConstraint ()
 Get the equality constraint. More...
 
const Ptr< Vector< Real > > & getMultiplierVector ()
 Get the dual constraint space vector. More...
 
const Ptr< Vector< Real > > & getResidualVector ()
 Get the primal constraint space vector. More...
 
const Ptr
< PolyhedralProjection< Real > > & 
getPolyhedralProjection ()
 Get the polyhedral projection object. This is a null pointer if no linear constraints and/or bounds are present. More...
 
EProblem getProblemType ()
 Get the optimization problem type (U, B, E, G, or P). More...
 
Real checkLinearity (bool printToStream=false, std::ostream &outStream=std::cout) const
 Check if user-supplied linear constraints are affine. More...
 
void checkVectors (bool printToStream=false, std::ostream &outStream=std::cout) const
 Run vector checks for user-supplied vectors. More...
 
void checkDerivatives (bool printToStream=false, std::ostream &outStream=std::cout, const Ptr< Vector< Real >> &x0=nullPtr, Real scale=Real(1)) const
 Run derivative checks for user-supplied objective function and constraints. More...
 
void check (bool printToStream=false, std::ostream &outStream=std::cout, const Ptr< Vector< Real >> &x0=nullPtr, Real scale=Real(1)) const
 Run vector, linearity and derivative checks for user-supplied vectors, objective function and constraints. More...
 
virtual void finalize (bool lumpConstraints=false, bool printToStream=false, std::ostream &outStream=std::cout)
 Tranform user-supplied constraints to consist of only bounds and equalities. Optimization problem cannot be modified after finalize has been called without calling the edit function. More...
 
bool isFinalized () const
 Indicate whether or no finalize has been called. More...
 
virtual void edit ()
 Resume editting optimization problem after finalize has been called. More...
 
void finalizeIteration ()
 Transform the optimization variables to the native parameterization after an optimization algorithm has finished. More...
 

Protected Attributes

Ptr< Objective< Real > > INPUT_obj_
 
Ptr< Vector< Real > > INPUT_xprim_
 
Ptr< Vector< Real > > INPUT_xdual_
 
Ptr< BoundConstraint< Real > > INPUT_bnd_
 
std::unordered_map
< std::string, ConstraintData
< Real > > 
INPUT_con_
 
std::unordered_map
< std::string, ConstraintData
< Real > > 
INPUT_linear_con_
 
Ptr< ProxObjective< Real > > INPUT_prox_
 
Ptr< Objective< Real > > INPUT_nobj_
 

Private Attributes

bool isFinalized_
 
bool hasBounds_
 
bool hasEquality_
 
bool hasInequality_
 
bool hasLinearEquality_
 
bool hasLinearInequality_
 
bool hasProx_
 
unsigned cnt_econ_
 
unsigned cnt_icon_
 
unsigned cnt_linear_econ_
 
unsigned cnt_linear_icon_
 
ParameterList ppa_list_
 
Ptr< Objective< Real > > obj_
 
Ptr< Vector< Real > > xprim_
 
Ptr< Vector< Real > > xdual_
 
Ptr< BoundConstraint< Real > > bnd_
 
Ptr< Constraint< Real > > con_
 
Ptr< Vector< Real > > mul_
 
Ptr< Vector< Real > > res_
 
Ptr< PolyhedralProjection< Real > > proj_
 
Ptr< ProxObjective< Real > > prox_
 
Ptr< Vector< Real > > xfeas_
 
Ptr< ReduceLinearConstraint
< Real > > 
rlc_
 
EProblem problemType_
 
bool hasProximableObjective_
 
Ptr< Objective< Real > > nobj_
 

Detailed Description

template<typename Real>
class ROL::Problem< Real >

Definition at line 27 of file function/prox/ROL_Problem.hpp.

Constructor & Destructor Documentation

template<typename Real>
virtual ROL::Problem< Real >::~Problem ( )
inlinevirtual

Definition at line 69 of file function/prox/ROL_Problem.hpp.

template<typename Real >
ROL::Problem< Real >::Problem ( const Ptr< Objective< Real >> &  obj,
const Ptr< Vector< Real >> &  x,
const Ptr< Vector< Real >> &  g = nullPtr 
)

Default constructor for OptimizationProblem.

Parameters
[in]objobjective function object
[in]xprimal optimization space vector
[in]gdual optimization space vector

Definition at line 18 of file function/prox/ROL_Problem_Def.hpp.

References ROL::Problem< Real >::INPUT_bnd_, ROL::Problem< Real >::INPUT_con_, ROL::Problem< Real >::INPUT_linear_con_, ROL::Problem< Real >::INPUT_obj_, ROL::Problem< Real >::INPUT_xdual_, and ROL::Problem< Real >::INPUT_xprim_.

template<typename Real>
ROL::Problem< Real >::Problem ( const Problem< Real > &  problem)
inline

Copy constructor for OptimizationProblem.

Parameters
[in]problemobjective function object

Definition at line 85 of file function/prox/ROL_Problem.hpp.

template<typename Real>
virtual ROL::Problem< Real >::~Problem ( )
inlinevirtual

Definition at line 68 of file algorithm/ROL_Problem.hpp.

template<typename Real>
ROL::Problem< Real >::Problem ( const Ptr< Objective< Real >> &  obj,
const Ptr< Vector< Real >> &  x,
const Ptr< Vector< Real >> &  g = nullPtr 
)

Default constructor for OptimizationProblem.

Parameters
[in]objobjective function object
[in]xprimal optimization space vector
[in]gdual optimization space vector
template<typename Real>
ROL::Problem< Real >::Problem ( const Problem< Real > &  problem)
inline

Copy constructor for OptimizationProblem.

Parameters
[in]problemobjective function object

Definition at line 84 of file algorithm/ROL_Problem.hpp.

Member Function Documentation

template<typename Real >
void ROL::Problem< Real >::addBoundConstraint ( const Ptr< BoundConstraint< Real >> &  bnd)
template<typename Real >
void ROL::Problem< Real >::removeBoundConstraint ( )

Remove an existing bound constraint.

Definition at line 47 of file function/prox/ROL_Problem_Def.hpp.

template<typename Real >
void ROL::Problem< Real >::addProxObjective ( const Ptr< ProxObjective< Real >> &  prox)

Add a prox objective.

Parameters
[in]proxprox objective object

Definition at line 56 of file function/prox/ROL_Problem_Def.hpp.

template<typename Real >
void ROL::Problem< Real >::removeProxObjective ( )

Remove an existing prox objective.

Definition at line 65 of file function/prox/ROL_Problem_Def.hpp.

template<typename Real >
void ROL::Problem< Real >::addConstraint ( std::string  name,
const Ptr< Constraint< Real >> &  econ,
const Ptr< Vector< Real >> &  emul,
const Ptr< Vector< Real >> &  eres = nullPtr,
bool  reset = false 
)

Add an equality constraint.

Parameters
[in]namethe unique constraint identifier
[in]econconstraint object
[in]emuldual constraint space vector
[in]eresprimal constraint space vector
[in]resetwhether or not to clear constraint container

Definition at line 74 of file function/prox/ROL_Problem_Def.hpp.

Referenced by ROL::StochasticProblem< Real >::edit(), ROL::StochasticProblem< Real >::finalize(), ROL::StochasticProblem< Real >::makeConstraintStochastic(), ROL::StochasticProblem< Real >::resetStochasticConstraint(), ROL::TypeE::Algorithm< Real >::run(), and ROL::TypeG::Algorithm< Real >::run().

template<typename Real >
void ROL::Problem< Real >::addConstraint ( std::string  name,
const Ptr< Constraint< Real >> &  icon,
const Ptr< Vector< Real >> &  imul,
const Ptr< BoundConstraint< Real >> &  ibnd,
const Ptr< Vector< Real >> &  ires = nullPtr,
bool  reset = false 
)

Add an inequality constraint.

Parameters
[in]namethe unique constraint identifier
[in]iconconstraint object
[in]imuldual constraint space vector
[in]ibndbound constraint
[in]iresprimal constraint space vector
[in]resetwhether or not to clear constraint container

Definition at line 94 of file function/prox/ROL_Problem_Def.hpp.

template<typename Real >
void ROL::Problem< Real >::removeConstraint ( std::string  name)
template<typename Real >
void ROL::Problem< Real >::addLinearConstraint ( std::string  name,
const Ptr< Constraint< Real >> &  linear_econ,
const Ptr< Vector< Real >> &  linear_emul,
const Ptr< Vector< Real >> &  linear_eres = nullPtr,
bool  reset = false 
)

Add a linear equality constraint.

Parameters
[in]namethe unique constraint identifier
[in]linear_econconstraint object
[in]linear_emuldual constraint space vector
[in]linear_eresprimal constraint space vector
[in]resetwhether or not to clear linear constraint container

Definition at line 130 of file function/prox/ROL_Problem_Def.hpp.

Referenced by ROL::StochasticProblem< Real >::edit(), ROL::StochasticProblem< Real >::finalize(), ROL::StochasticProblem< Real >::makeLinearConstraintStochastic(), ROL::StochasticProblem< Real >::resetStochasticLinearConstraint(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), ROL::TypeG::StabilizedLCLAlgorithm< Real >::run(), ROL::TypeE::Algorithm< Real >::run(), ROL::TypeB::Algorithm< Real >::run(), and ROL::TypeG::Algorithm< Real >::run().

template<typename Real >
void ROL::Problem< Real >::addLinearConstraint ( std::string  name,
const Ptr< Constraint< Real >> &  linear_icon,
const Ptr< Vector< Real >> &  linear_imul,
const Ptr< BoundConstraint< Real >> &  linear_ibnd,
const Ptr< Vector< Real >> &  linear_ires = nullPtr,
bool  reset = false 
)

Add a linear inequality constraint.

Parameters
[in]namethe unique constraint identifier
[in]linear_iconconstraint object
[in]linear_imuldual constraint space vector
[in]linear_ibndbound constraint
[in]linear_iresprimal constraint space vector
[in]resetwhether or not to clear linear constraint container

Definition at line 150 of file function/prox/ROL_Problem_Def.hpp.

template<typename Real >
void ROL::Problem< Real >::removeLinearConstraint ( std::string  name)
template<typename Real >
void ROL::Problem< Real >::setProjectionAlgorithm ( ParameterList &  parlist)

Set polyhedral projection algorithm.

Parameters
[in]ppapolyhedral projection algorithm

Definition at line 186 of file function/prox/ROL_Problem_Def.hpp.

Referenced by ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().

template<typename Real >
const Ptr< Objective< Real > > & ROL::Problem< Real >::getObjective ( void  )
template<typename Real >
const Ptr< Vector< Real > > & ROL::Problem< Real >::getPrimalOptimizationVector ( )
template<typename Real >
const Ptr< Vector< Real > > & ROL::Problem< Real >::getDualOptimizationVector ( )
template<typename Real >
const Ptr< BoundConstraint< Real > > & ROL::Problem< Real >::getBoundConstraint ( void  )
template<typename Real >
const Ptr< Constraint< Real > > & ROL::Problem< Real >::getConstraint ( )
template<typename Real >
const Ptr< Vector< Real > > & ROL::Problem< Real >::getMultiplierVector ( )
template<typename Real >
const Ptr< Vector< Real > > & ROL::Problem< Real >::getResidualVector ( )
template<typename Real >
const Ptr< PolyhedralProjection< Real > > & ROL::Problem< Real >::getPolyhedralProjection ( )
template<typename Real >
EProblem ROL::Problem< Real >::getProblemType ( )
template<typename Real >
Real ROL::Problem< Real >::checkLinearity ( bool  printToStream = false,
std::ostream &  outStream = std::cout 
) const

Check if user-supplied linear constraints are affine.

This function computes the error

\[ \|c(x+\alpha y) - (c(x)+\alpha (c(y)-c(0)))\| \]

for each user-supplied linear constraint and returns the maximum.

Parameters
[in]printToStreamdetermines whether to print to the supplied std::ostream
[in,out]outStreamuser supplied std::ostream

Definition at line 495 of file function/prox/ROL_Problem_Def.hpp.

References ROL::Temp.

template<typename Real >
void ROL::Problem< Real >::checkVectors ( bool  printToStream = false,
std::ostream &  outStream = std::cout 
) const

Run vector checks for user-supplied vectors.

Parameters
[in]printToStreamdetermines whether to print to the supplied std::ostream
[in,out]outStreamuser supplied std::ostream

Definition at line 544 of file function/prox/ROL_Problem_Def.hpp.

template<typename Real >
void ROL::Problem< Real >::checkDerivatives ( bool  printToStream = false,
std::ostream &  outStream = std::cout 
) const

Run derivative checks for user-supplied objective function and constraints.

Parameters
[in]printToStreamdetermines whether to print to the supplied std::ostream
[in,out]outStreamuser supplied std::ostream

Definition at line 603 of file function/prox/ROL_Problem_Def.hpp.

template<typename Real >
void ROL::Problem< Real >::check ( bool  printToStream = false,
std::ostream &  outStream = std::cout 
) const

Run vector, linearity and derivative checks for user-supplied vectors, objective function and constraints.

Parameters
[in]printToStreamdetermines whether to print to the supplied std::ostream
[in,out]outStreamuser supplied std::ostream

Definition at line 644 of file function/prox/ROL_Problem_Def.hpp.

Referenced by ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().

template<typename Real >
void ROL::Problem< Real >::finalize ( bool  lumpConstraints = false,
bool  printToStream = false,
std::ostream &  outStream = std::cout 
)
virtual
template<typename Real >
bool ROL::Problem< Real >::isFinalized ( ) const

Indicate whether or no finalize has been called.

Definition at line 653 of file function/prox/ROL_Problem_Def.hpp.

template<typename Real >
void ROL::Problem< Real >::edit ( void  )
virtual

Resume editting optimization problem after finalize has been called.

Reimplemented in ROL::StochasticProblem< Real >.

Definition at line 658 of file function/prox/ROL_Problem_Def.hpp.

Referenced by ROL::StochasticProblem< Real >::edit(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().

template<typename Real >
void ROL::Problem< Real >::finalizeIteration ( )
template<typename Real>
void ROL::Problem< Real >::addBoundConstraint ( const Ptr< BoundConstraint< Real >> &  bnd)

Add a bound constraint.

Parameters
[in]bndbound constraint object
template<typename Real>
void ROL::Problem< Real >::removeBoundConstraint ( )

Remove an existing bound constraint.

template<typename Real>
void ROL::Problem< Real >::addConstraint ( std::string  name,
const Ptr< Constraint< Real >> &  econ,
const Ptr< Vector< Real >> &  emul,
const Ptr< Vector< Real >> &  eres = nullPtr,
bool  reset = false 
)

Add an equality constraint.

Parameters
[in]namethe unique constraint identifier
[in]econconstraint object
[in]emuldual constraint space vector
[in]eresprimal constraint space vector
[in]resetwhether or not to clear constraint container
template<typename Real>
void ROL::Problem< Real >::addConstraint ( std::string  name,
const Ptr< Constraint< Real >> &  icon,
const Ptr< Vector< Real >> &  imul,
const Ptr< BoundConstraint< Real >> &  ibnd,
const Ptr< Vector< Real >> &  ires = nullPtr,
bool  reset = false 
)

Add an inequality constraint.

Parameters
[in]namethe unique constraint identifier
[in]iconconstraint object
[in]imuldual constraint space vector
[in]ibndbound constraint
[in]iresprimal constraint space vector
[in]resetwhether or not to clear constraint container
template<typename Real>
void ROL::Problem< Real >::removeConstraint ( std::string  name)

Remove an existing constraint.

Parameters
[in]namethe unique constraint identifier
template<typename Real>
void ROL::Problem< Real >::addLinearConstraint ( std::string  name,
const Ptr< Constraint< Real >> &  linear_econ,
const Ptr< Vector< Real >> &  linear_emul,
const Ptr< Vector< Real >> &  linear_eres = nullPtr,
bool  reset = false 
)

Add a linear equality constraint.

Parameters
[in]namethe unique constraint identifier
[in]linear_econconstraint object
[in]linear_emuldual constraint space vector
[in]linear_eresprimal constraint space vector
[in]resetwhether or not to clear linear constraint container
template<typename Real>
void ROL::Problem< Real >::addLinearConstraint ( std::string  name,
const Ptr< Constraint< Real >> &  linear_icon,
const Ptr< Vector< Real >> &  linear_imul,
const Ptr< BoundConstraint< Real >> &  linear_ibnd,
const Ptr< Vector< Real >> &  linear_ires = nullPtr,
bool  reset = false 
)

Add a linear inequality constraint.

Parameters
[in]namethe unique constraint identifier
[in]linear_iconconstraint object
[in]linear_imuldual constraint space vector
[in]linear_ibndbound constraint
[in]linear_iresprimal constraint space vector
[in]resetwhether or not to clear linear constraint container
template<typename Real>
void ROL::Problem< Real >::removeLinearConstraint ( std::string  name)

Remove an existing linear constraint.

Parameters
[in]namethe unique constraint identifier
template<typename Real>
void ROL::Problem< Real >::setProjectionAlgorithm ( ParameterList &  parlist)

Set polyhedral projection algorithm.

Parameters
[in]ppapolyhedral projection algorithm
template<typename Real >
void ROL::Problem< Real >::addProximableObjective ( const Ptr< Objective< Real >> &  nobj)

Set Proximable objective function

Definition at line 58 of file algorithm/ROL_Problem_Def.hpp.

template<typename Real >
void ROL::Problem< Real >::removeProximableObjective ( )

Remove Proximable objective function

Definition at line 67 of file algorithm/ROL_Problem_Def.hpp.

template<typename Real>
const Ptr<Objective<Real> >& ROL::Problem< Real >::getObjective ( )

Get the objective function.

template<typename Real >
const Ptr< Objective< Real > > & ROL::Problem< Real >::getProximableObjective ( )

Get proximable objective.

Definition at line 455 of file algorithm/ROL_Problem_Def.hpp.

Referenced by ROL::TypeP::Algorithm< Real >::run().

template<typename Real>
const Ptr<Vector<Real> >& ROL::Problem< Real >::getPrimalOptimizationVector ( )

Get the primal optimization space vector.

template<typename Real>
const Ptr<Vector<Real> >& ROL::Problem< Real >::getDualOptimizationVector ( )

Get the dual optimization space vector.

template<typename Real>
const Ptr<BoundConstraint<Real> >& ROL::Problem< Real >::getBoundConstraint ( )

Get the bound constraint.

template<typename Real>
const Ptr<Constraint<Real> >& ROL::Problem< Real >::getConstraint ( )

Get the equality constraint.

template<typename Real>
const Ptr<Vector<Real> >& ROL::Problem< Real >::getMultiplierVector ( )

Get the dual constraint space vector.

template<typename Real>
const Ptr<Vector<Real> >& ROL::Problem< Real >::getResidualVector ( )

Get the primal constraint space vector.

template<typename Real>
const Ptr<PolyhedralProjection<Real> >& ROL::Problem< Real >::getPolyhedralProjection ( )

Get the polyhedral projection object. This is a null pointer if no linear constraints and/or bounds are present.

template<typename Real>
EProblem ROL::Problem< Real >::getProblemType ( )

Get the optimization problem type (U, B, E, G, or P).

template<typename Real>
Real ROL::Problem< Real >::checkLinearity ( bool  printToStream = false,
std::ostream &  outStream = std::cout 
) const

Check if user-supplied linear constraints are affine.

This function computes the error

\[ \|c(x+\alpha y) - (c(x)+\alpha (c(y)-c(0)))\| \]

for each user-supplied linear constraint and returns the maximum.

Parameters
[in]printToStreamdetermines whether to print to the supplied std::ostream
[in,out]outStreamuser supplied std::ostream
template<typename Real>
void ROL::Problem< Real >::checkVectors ( bool  printToStream = false,
std::ostream &  outStream = std::cout 
) const

Run vector checks for user-supplied vectors.

Parameters
[in]printToStreamdetermines whether to print to the supplied std::ostream
[in,out]outStreamuser supplied std::ostream
template<typename Real >
void ROL::Problem< Real >::checkDerivatives ( bool  printToStream = false,
std::ostream &  outStream = std::cout,
const Ptr< Vector< Real >> &  x0 = nullPtr,
Real  scale = Real(1) 
) const

Run derivative checks for user-supplied objective function and constraints.

Parameters
[in]printToStreamdetermines whether to print to the supplied std::ostream
[in,out]outStreamuser supplied std::ostream

Definition at line 617 of file algorithm/ROL_Problem_Def.hpp.

template<typename Real >
void ROL::Problem< Real >::check ( bool  printToStream = false,
std::ostream &  outStream = std::cout,
const Ptr< Vector< Real >> &  x0 = nullPtr,
Real  scale = Real(1) 
) const

Run vector, linearity and derivative checks for user-supplied vectors, objective function and constraints.

Parameters
[in]printToStreamdetermines whether to print to the supplied std::ostream
[in,out]outStreamuser supplied std::ostream

Definition at line 656 of file algorithm/ROL_Problem_Def.hpp.

template<typename Real>
virtual void ROL::Problem< Real >::finalize ( bool  lumpConstraints = false,
bool  printToStream = false,
std::ostream &  outStream = std::cout 
)
virtual

Tranform user-supplied constraints to consist of only bounds and equalities. Optimization problem cannot be modified after finalize has been called without calling the edit function.

Parameters
[in]lumpConstraintscombine both linear and nonlinear constraints
[in]printToStreamdetermines whether to print to the supplied std::ostream
[in,out]outStreamuser supplied std::ostream

Reimplemented in ROL::StochasticProblem< Real >.

template<typename Real>
bool ROL::Problem< Real >::isFinalized ( ) const

Indicate whether or no finalize has been called.

template<typename Real>
virtual void ROL::Problem< Real >::edit ( )
virtual

Resume editting optimization problem after finalize has been called.

Reimplemented in ROL::StochasticProblem< Real >.

template<typename Real>
void ROL::Problem< Real >::finalizeIteration ( )

Transform the optimization variables to the native parameterization after an optimization algorithm has finished.

Member Data Documentation

template<typename Real>
bool ROL::Problem< Real >::isFinalized_
private

Definition at line 29 of file function/prox/ROL_Problem.hpp.

template<typename Real>
bool ROL::Problem< Real >::hasBounds_
private

Definition at line 30 of file function/prox/ROL_Problem.hpp.

template<typename Real>
bool ROL::Problem< Real >::hasEquality_
private

Definition at line 31 of file function/prox/ROL_Problem.hpp.

template<typename Real>
bool ROL::Problem< Real >::hasInequality_
private

Definition at line 32 of file function/prox/ROL_Problem.hpp.

template<typename Real>
bool ROL::Problem< Real >::hasLinearEquality_
private

Definition at line 33 of file function/prox/ROL_Problem.hpp.

template<typename Real>
bool ROL::Problem< Real >::hasLinearInequality_
private

Definition at line 34 of file function/prox/ROL_Problem.hpp.

template<typename Real>
bool ROL::Problem< Real >::hasProx_
private

Definition at line 35 of file function/prox/ROL_Problem.hpp.

template<typename Real>
unsigned ROL::Problem< Real >::cnt_econ_
private

Definition at line 36 of file function/prox/ROL_Problem.hpp.

template<typename Real>
unsigned ROL::Problem< Real >::cnt_icon_
private

Definition at line 37 of file function/prox/ROL_Problem.hpp.

template<typename Real>
unsigned ROL::Problem< Real >::cnt_linear_econ_
private

Definition at line 38 of file function/prox/ROL_Problem.hpp.

template<typename Real>
unsigned ROL::Problem< Real >::cnt_linear_icon_
private

Definition at line 39 of file function/prox/ROL_Problem.hpp.

template<typename Real>
ParameterList ROL::Problem< Real >::ppa_list_
private

Definition at line 41 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr< Objective< Real > > ROL::Problem< Real >::obj_
private

Definition at line 43 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr< Vector< Real > > ROL::Problem< Real >::xprim_
private

Definition at line 44 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr< Vector< Real > > ROL::Problem< Real >::xdual_
private

Definition at line 45 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr< BoundConstraint< Real > > ROL::Problem< Real >::bnd_
private

Definition at line 46 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr< Constraint< Real > > ROL::Problem< Real >::con_
private

Definition at line 47 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr< Vector< Real > > ROL::Problem< Real >::mul_
private

Definition at line 48 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr< Vector< Real > > ROL::Problem< Real >::res_
private

Definition at line 49 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr< PolyhedralProjection< Real > > ROL::Problem< Real >::proj_
private

Definition at line 50 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr<ProxObjective<Real> > ROL::Problem< Real >::prox_
private

Definition at line 51 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr< Vector< Real > > ROL::Problem< Real >::xfeas_
private

Definition at line 53 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr< ReduceLinearConstraint< Real > > ROL::Problem< Real >::rlc_
private

Definition at line 54 of file function/prox/ROL_Problem.hpp.

template<typename Real>
EProblem ROL::Problem< Real >::problemType_
private

Definition at line 56 of file function/prox/ROL_Problem.hpp.

template<typename Real>
Ptr< Objective< Real > > ROL::Problem< Real >::INPUT_obj_
protected

Definition at line 60 of file function/prox/ROL_Problem.hpp.

Referenced by ROL::Problem< Real >::Problem().

template<typename Real>
Ptr< Vector< Real > > ROL::Problem< Real >::INPUT_xprim_
protected

Definition at line 61 of file function/prox/ROL_Problem.hpp.

Referenced by ROL::Problem< Real >::Problem().

template<typename Real>
Ptr< Vector< Real > > ROL::Problem< Real >::INPUT_xdual_
protected

Definition at line 62 of file function/prox/ROL_Problem.hpp.

Referenced by ROL::Problem< Real >::Problem().

template<typename Real>
Ptr< BoundConstraint< Real > > ROL::Problem< Real >::INPUT_bnd_
protected

Definition at line 63 of file function/prox/ROL_Problem.hpp.

Referenced by ROL::Problem< Real >::Problem().

template<typename Real>
std::unordered_map< std::string, ConstraintData< Real > > ROL::Problem< Real >::INPUT_con_
protected

Definition at line 64 of file function/prox/ROL_Problem.hpp.

Referenced by ROL::Problem< Real >::Problem().

template<typename Real>
std::unordered_map< std::string, ConstraintData< Real > > ROL::Problem< Real >::INPUT_linear_con_
protected

Definition at line 65 of file function/prox/ROL_Problem.hpp.

Referenced by ROL::Problem< Real >::Problem().

template<typename Real>
Ptr<ProxObjective<Real> > ROL::Problem< Real >::INPUT_prox_
protected

Definition at line 66 of file function/prox/ROL_Problem.hpp.

template<typename Real>
bool ROL::Problem< Real >::hasProximableObjective_
private

Definition at line 34 of file algorithm/ROL_Problem.hpp.

template<typename Real>
Ptr<Objective<Real> > ROL::Problem< Real >::nobj_
private

Definition at line 43 of file algorithm/ROL_Problem.hpp.

template<typename Real>
Ptr<Objective<Real> > ROL::Problem< Real >::INPUT_nobj_
protected

Definition at line 60 of file algorithm/ROL_Problem.hpp.


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