|
ROL
|
#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. | |
| Problem (const Problem &problem) | |
| Copy constructor for OptimizationProblem. | |
| void | addBoundConstraint (const Ptr< BoundConstraint< Real > > &bnd) |
| Add a bound constraint. | |
| void | removeBoundConstraint () |
| Remove an existing bound constraint. | |
| void | addProxObjective (const Ptr< ProxObjective< Real > > &prox) |
| Add a prox objective. | |
| void | removeProxObjective () |
| Remove an existing prox objective. | |
| 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. | |
| 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. | |
| void | removeConstraint (std::string name) |
| Remove an existing constraint. | |
| 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. | |
| 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. | |
| void | removeLinearConstraint (std::string name) |
| Remove an existing linear constraint. | |
| void | setProjectionAlgorithm (ParameterList &parlist) |
| Set polyhedral projection algorithm. | |
| const Ptr< Objective< Real > > & | getObjective () |
| Get the objective function. | |
| const Ptr< Vector< Real > > & | getPrimalOptimizationVector () |
| Get the primal optimization space vector. | |
| const Ptr< Vector< Real > > & | getDualOptimizationVector () |
| Get the dual optimization space vector. | |
| const Ptr< BoundConstraint< Real > > & | getBoundConstraint () |
| Get the bound constraint. | |
| const Ptr< Constraint< Real > > & | getConstraint () |
| Get the equality constraint. | |
| const Ptr< Vector< Real > > & | getMultiplierVector () |
| Get the dual constraint space vector. | |
| const Ptr< Vector< Real > > & | getResidualVector () |
| Get the primal constraint space vector. | |
| const Ptr< PolyhedralProjection< Real > > & | getPolyhedralProjection () |
| Get the polyhedral projection object. This is a null pointer if no linear constraints and/or bounds are present. | |
| EProblem | getProblemType () |
| Get the optimization problem type (U, B, E, or G). | |
| Real | checkLinearity (bool printToStream=false, std::ostream &outStream=std::cout) const |
| Check if user-supplied linear constraints are affine. | |
| void | checkVectors (bool printToStream=false, std::ostream &outStream=std::cout) const |
| Run vector checks for user-supplied vectors. | |
| void | checkDerivatives (bool printToStream=false, std::ostream &outStream=std::cout) const |
| Run derivative checks for user-supplied objective function and constraints. | |
| 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. | |
| 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. | |
| bool | isFinalized () const |
| Indicate whether or no finalize has been called. | |
| virtual void | edit () |
| Resume editting optimization problem after finalize has been called. | |
| void | finalizeIteration () |
| Transform the optimization variables to the native parameterization after an optimization algorithm has finished. | |
| virtual | ~Problem () |
| Problem (const Ptr< Objective< Real > > &obj, const Ptr< Vector< Real > > &x, const Ptr< Vector< Real > > &g=nullPtr) | |
| Default constructor for OptimizationProblem. | |
| Problem (const Problem &problem) | |
| Copy constructor for OptimizationProblem. | |
| void | addBoundConstraint (const Ptr< BoundConstraint< Real > > &bnd) |
| Add a bound constraint. | |
| void | removeBoundConstraint () |
| Remove an existing bound constraint. | |
| 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. | |
| 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. | |
| void | removeConstraint (std::string name) |
| Remove an existing constraint. | |
| 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. | |
| 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. | |
| void | removeLinearConstraint (std::string name) |
| Remove an existing linear constraint. | |
| void | setProjectionAlgorithm (ParameterList &parlist) |
| Set polyhedral projection algorithm. | |
| const Ptr< Objective< Real > > & | getObjective () |
| Get the objective function. | |
| const Ptr< Vector< Real > > & | getPrimalOptimizationVector () |
| Get the primal optimization space vector. | |
| const Ptr< Vector< Real > > & | getDualOptimizationVector () |
| Get the dual optimization space vector. | |
| const Ptr< BoundConstraint< Real > > & | getBoundConstraint () |
| Get the bound constraint. | |
| const Ptr< Constraint< Real > > & | getConstraint () |
| Get the equality constraint. | |
| const Ptr< Vector< Real > > & | getMultiplierVector () |
| Get the dual constraint space vector. | |
| const Ptr< Vector< Real > > & | getResidualVector () |
| Get the primal constraint space vector. | |
| const Ptr< PolyhedralProjection< Real > > & | getPolyhedralProjection () |
| Get the polyhedral projection object. This is a null pointer if no linear constraints and/or bounds are present. | |
| EProblem | getProblemType () |
| Get the optimization problem type (U, B, E, or G). | |
| Real | checkLinearity (bool printToStream=false, std::ostream &outStream=std::cout) const |
| Check if user-supplied linear constraints are affine. | |
| void | checkVectors (bool printToStream=false, std::ostream &outStream=std::cout) const |
| Run vector checks for user-supplied vectors. | |
| 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. | |
| 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. | |
| 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. | |
| bool | isFinalized () const |
| Indicate whether or no finalize has been called. | |
| virtual void | edit () |
| Resume editting optimization problem after finalize has been called. | |
| void | finalizeIteration () |
| Transform the optimization variables to the native parameterization after an optimization algorithm has finished. | |
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_ |
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_ |
Definition at line 61 of file function/prox/ROL_Problem.hpp.
|
inlinevirtual |
Definition at line 103 of file function/prox/ROL_Problem.hpp.
| ROL::Problem< Real >::Problem | ( | const Ptr< Objective< Real > > & | obj, |
| const Ptr< Vector< Real > > & | x, | ||
| const Ptr< Vector< Real > > & | g = nullPtr |
||
| ) |
Default constructor for OptimizationProblem.
| [in] | obj | objective function object |
| [in] | x | primal optimization space vector |
| [in] | g | dual optimization space vector |
Definition at line 52 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_.
|
inline |
Copy constructor for OptimizationProblem.
| [in] | problem | objective function object |
Definition at line 119 of file function/prox/ROL_Problem.hpp.
|
inlinevirtual |
Definition at line 99 of file algorithm/ROL_Problem.hpp.
| ROL::Problem< Real >::Problem | ( | const Ptr< Objective< Real > > & | obj, |
| const Ptr< Vector< Real > > & | x, | ||
| const Ptr< Vector< Real > > & | g = nullPtr |
||
| ) |
Default constructor for OptimizationProblem.
| [in] | obj | objective function object |
| [in] | x | primal optimization space vector |
| [in] | g | dual optimization space vector |
|
inline |
Copy constructor for OptimizationProblem.
| [in] | problem | objective function object |
Definition at line 115 of file algorithm/ROL_Problem.hpp.
| void ROL::Problem< Real >::addBoundConstraint | ( | const Ptr< BoundConstraint< Real > > & | bnd | ) |
Add a bound constraint.
| [in] | bnd | bound constraint object |
Definition at line 72 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeG::StabilizedLCLAlgorithm< Real >::run(), ROL::TypeB::Algorithm< Real >::run(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::Algorithm< Real >::run().
| void ROL::Problem< Real >::removeBoundConstraint |
Remove an existing bound constraint.
Definition at line 81 of file function/prox/ROL_Problem_Def.hpp.
| void ROL::Problem< Real >::addProxObjective | ( | const Ptr< ProxObjective< Real > > & | prox | ) |
Add a prox objective.
| [in] | prox | prox objective object |
Definition at line 90 of file function/prox/ROL_Problem_Def.hpp.
| void ROL::Problem< Real >::removeProxObjective |
Remove an existing prox objective.
Definition at line 99 of file function/prox/ROL_Problem_Def.hpp.
| 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.
| [in] | name | the unique constraint identifier |
| [in] | econ | constraint object |
| [in] | emul | dual constraint space vector |
| [in] | eres | primal constraint space vector |
| [in] | reset | whether or not to clear constraint container |
Definition at line 108 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::StochasticProblem< Real >::finalize(), ROL::StochasticProblem< Real >::makeConstraintStochastic(), ROL::StochasticProblem< Real >::resetStochasticConstraint(), ROL::TypeG::Algorithm< Real >::run(), and ROL::TypeE::Algorithm< Real >::run().
| 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.
| [in] | name | the unique constraint identifier |
| [in] | icon | constraint object |
| [in] | imul | dual constraint space vector |
| [in] | ibnd | bound constraint |
| [in] | ires | primal constraint space vector |
| [in] | reset | whether or not to clear constraint container |
Definition at line 128 of file function/prox/ROL_Problem_Def.hpp.
| void ROL::Problem< Real >::removeConstraint | ( | std::string | name | ) |
Remove an existing constraint.
| [in] | name | the unique constraint identifier |
Definition at line 149 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::StochasticProblem< Real >::finalize(), ROL::StochasticProblem< Real >::makeConstraintStochastic(), and ROL::StochasticProblem< Real >::resetStochasticConstraint().
| 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.
| [in] | name | the unique constraint identifier |
| [in] | linear_econ | constraint object |
| [in] | linear_emul | dual constraint space vector |
| [in] | linear_eres | primal constraint space vector |
| [in] | reset | whether or not to clear linear constraint container |
Definition at line 164 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::StochasticProblem< Real >::finalize(), ROL::StochasticProblem< Real >::makeLinearConstraintStochastic(), ROL::StochasticProblem< Real >::resetStochasticLinearConstraint(), ROL::TypeG::StabilizedLCLAlgorithm< Real >::run(), ROL::TypeB::Algorithm< Real >::run(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), and ROL::TypeE::Algorithm< Real >::run().
| 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.
| [in] | name | the unique constraint identifier |
| [in] | linear_icon | constraint object |
| [in] | linear_imul | dual constraint space vector |
| [in] | linear_ibnd | bound constraint |
| [in] | linear_ires | primal constraint space vector |
| [in] | reset | whether or not to clear linear constraint container |
Definition at line 184 of file function/prox/ROL_Problem_Def.hpp.
| void ROL::Problem< Real >::removeLinearConstraint | ( | std::string | name | ) |
Remove an existing linear constraint.
| [in] | name | the unique constraint identifier |
Definition at line 205 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::StochasticProblem< Real >::finalize(), ROL::StochasticProblem< Real >::makeLinearConstraintStochastic(), and ROL::StochasticProblem< Real >::resetStochasticLinearConstraint().
| void ROL::Problem< Real >::setProjectionAlgorithm | ( | ParameterList & | parlist | ) |
Set polyhedral projection algorithm.
| [in] | ppa | polyhedral projection algorithm |
Definition at line 220 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().
| const Ptr< Objective< Real > > & ROL::Problem< Real >::getObjective |
Get the objective function.
Definition at line 475 of file function/prox/ROL_Problem_Def.hpp.
References obj_.
Referenced by ROL::TypeB::Algorithm< Real >::run(), ROL::TypeE::Algorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), ROL::TypeU::Algorithm< Real >::run(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().
| const Ptr< Vector< Real > > & ROL::Problem< Real >::getPrimalOptimizationVector |
Get the primal optimization space vector.
Definition at line 481 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeB::Algorithm< Real >::run(), ROL::TypeE::Algorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), ROL::TypeU::Algorithm< Real >::run(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().
| const Ptr< Vector< Real > > & ROL::Problem< Real >::getDualOptimizationVector |
Get the dual optimization space vector.
Definition at line 487 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeB::Algorithm< Real >::run(), ROL::TypeE::Algorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), ROL::TypeU::Algorithm< Real >::run(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().
| const Ptr< BoundConstraint< Real > > & ROL::Problem< Real >::getBoundConstraint |
Get the bound constraint.
Definition at line 493 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeB::Algorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().
| const Ptr< Constraint< Real > > & ROL::Problem< Real >::getConstraint |
Get the equality constraint.
Definition at line 499 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeE::Algorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().
| const Ptr< Vector< Real > > & ROL::Problem< Real >::getMultiplierVector |
Get the dual constraint space vector.
Definition at line 505 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeE::Algorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().
| const Ptr< Vector< Real > > & ROL::Problem< Real >::getResidualVector |
Get the primal constraint space vector.
Definition at line 511 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeE::Algorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().
| 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.
Definition at line 517 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeB::Algorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), ROL::TypeB::KelleySachsAlgorithm< Real >::run(), ROL::TypeB::NewtonKrylovAlgorithm< Real >::run(), ROL::TypeG::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeE::StabilizedLCLAlgorithm< Real >::run().
| EProblem ROL::Problem< Real >::getProblemType |
Get the optimization problem type (U, B, E, or G).
Definition at line 523 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeB::Algorithm< Real >::run(), ROL::TypeE::Algorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), ROL::TypeU::Algorithm< Real >::run(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().
| 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.
| [in] | printToStream | determines whether to print to the supplied std::ostream |
| [in,out] | outStream | user supplied std::ostream |
Definition at line 529 of file function/prox/ROL_Problem_Def.hpp.
References ROL::Temp.
| void ROL::Problem< Real >::checkVectors | ( | bool | printToStream = false, |
| std::ostream & | outStream = std::cout |
||
| ) | const |
Run vector checks for user-supplied vectors.
| [in] | printToStream | determines whether to print to the supplied std::ostream |
| [in,out] | outStream | user supplied std::ostream |
Definition at line 578 of file function/prox/ROL_Problem_Def.hpp.
| void ROL::Problem< Real >::checkDerivatives | ( | bool | printToStream = false, |
| std::ostream & | outStream = std::cout |
||
| ) | const |
Run derivative checks for user-supplied objective function and constraints.
| [in] | printToStream | determines whether to print to the supplied std::ostream |
| [in,out] | outStream | user supplied std::ostream |
Definition at line 637 of file function/prox/ROL_Problem_Def.hpp.
| 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.
| [in] | printToStream | determines whether to print to the supplied std::ostream |
| [in,out] | outStream | user supplied std::ostream |
Definition at line 678 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeG::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeE::StabilizedLCLAlgorithm< Real >::run().
|
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.
| [in] | lumpConstraints | combine both linear and nonlinear constraints |
| [in] | printToStream | determines whether to print to the supplied std::ostream |
| [in,out] | outStream | user supplied std::ostream |
Reimplemented in ROL::StochasticProblem< Real >.
Definition at line 228 of file function/prox/ROL_Problem_Def.hpp.
References ROL::ConstraintAssembler< Real >::getBoundConstraint(), ROL::ConstraintAssembler< Real >::getConstraint(), ROL::ConstraintAssembler< Real >::getDualOptVector(), ROL::ConstraintAssembler< Real >::getLinearConstraint(), ROL::ConstraintAssembler< Real >::getLinearMultiplier(), ROL::ConstraintAssembler< Real >::getLinearResidual(), ROL::ConstraintAssembler< Real >::getMultiplier(), ROL::ConstraintAssembler< Real >::getOptVector(), ROL::ConstraintAssembler< Real >::getResidual(), ROL::ConstraintAssembler< Real >::hasInequality(), obj_, ROL::TYPE_B, ROL::TYPE_E, ROL::TYPE_EB, and ROL::TYPE_U.
Referenced by ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), ROL::TypeG::StabilizedLCLAlgorithm< Real >::run(), ROL::TypeB::Algorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), and ROL::TypeE::Algorithm< Real >::run().
| bool ROL::Problem< Real >::isFinalized |
Indicate whether or no finalize has been called.
Definition at line 687 of file function/prox/ROL_Problem_Def.hpp.
|
virtual |
Resume editting optimization problem after finalize has been called.
Reimplemented in ROL::StochasticProblem< Real >.
Definition at line 692 of file function/prox/ROL_Problem_Def.hpp.
Referenced by ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().
| void ROL::Problem< Real >::finalizeIteration |
Transform the optimization variables to the native parameterization after an optimization algorithm has finished.
Definition at line 699 of file function/prox/ROL_Problem_Def.hpp.
References ROL::PartitionedVector< Real >::get().
Referenced by ROL::TypeB::Algorithm< Real >::run(), ROL::TypeE::Algorithm< Real >::run(), ROL::TypeG::Algorithm< Real >::run(), ROL::TypeU::Algorithm< Real >::run(), ROL::TypeE::StabilizedLCLAlgorithm< Real >::run(), and ROL::TypeG::StabilizedLCLAlgorithm< Real >::run().
| void ROL::Problem< Real >::addBoundConstraint | ( | const Ptr< BoundConstraint< Real > > & | bnd | ) |
Add a bound constraint.
| [in] | bnd | bound constraint object |
| void ROL::Problem< Real >::removeBoundConstraint | ( | ) |
Remove an existing bound constraint.
| 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.
| [in] | name | the unique constraint identifier |
| [in] | econ | constraint object |
| [in] | emul | dual constraint space vector |
| [in] | eres | primal constraint space vector |
| [in] | reset | whether or not to clear constraint container |
| 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.
| [in] | name | the unique constraint identifier |
| [in] | icon | constraint object |
| [in] | imul | dual constraint space vector |
| [in] | ibnd | bound constraint |
| [in] | ires | primal constraint space vector |
| [in] | reset | whether or not to clear constraint container |
| void ROL::Problem< Real >::removeConstraint | ( | std::string | name | ) |
Remove an existing constraint.
| [in] | name | the unique constraint identifier |
| 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.
| [in] | name | the unique constraint identifier |
| [in] | linear_econ | constraint object |
| [in] | linear_emul | dual constraint space vector |
| [in] | linear_eres | primal constraint space vector |
| [in] | reset | whether or not to clear linear constraint container |
| 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.
| [in] | name | the unique constraint identifier |
| [in] | linear_icon | constraint object |
| [in] | linear_imul | dual constraint space vector |
| [in] | linear_ibnd | bound constraint |
| [in] | linear_ires | primal constraint space vector |
| [in] | reset | whether or not to clear linear constraint container |
| void ROL::Problem< Real >::removeLinearConstraint | ( | std::string | name | ) |
Remove an existing linear constraint.
| [in] | name | the unique constraint identifier |
| void ROL::Problem< Real >::setProjectionAlgorithm | ( | ParameterList & | parlist | ) |
Set polyhedral projection algorithm.
| [in] | ppa | polyhedral projection algorithm |
| const Ptr< Objective< Real > > & ROL::Problem< Real >::getObjective | ( | ) |
Get the objective function.
| const Ptr< Vector< Real > > & ROL::Problem< Real >::getPrimalOptimizationVector | ( | ) |
Get the primal optimization space vector.
| const Ptr< Vector< Real > > & ROL::Problem< Real >::getDualOptimizationVector | ( | ) |
Get the dual optimization space vector.
| const Ptr< BoundConstraint< Real > > & ROL::Problem< Real >::getBoundConstraint | ( | ) |
Get the bound constraint.
| const Ptr< Constraint< Real > > & ROL::Problem< Real >::getConstraint | ( | ) |
Get the equality constraint.
| const Ptr< Vector< Real > > & ROL::Problem< Real >::getMultiplierVector | ( | ) |
Get the dual constraint space vector.
| const Ptr< Vector< Real > > & ROL::Problem< Real >::getResidualVector | ( | ) |
Get the primal constraint space vector.
| 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.
| EProblem ROL::Problem< Real >::getProblemType | ( | ) |
Get the optimization problem type (U, B, E, or G).
| 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.
| [in] | printToStream | determines whether to print to the supplied std::ostream |
| [in,out] | outStream | user supplied std::ostream |
| void ROL::Problem< Real >::checkVectors | ( | bool | printToStream = false, |
| std::ostream & | outStream = std::cout |
||
| ) | const |
Run vector checks for user-supplied vectors.
| [in] | printToStream | determines whether to print to the supplied std::ostream |
| [in,out] | outStream | user supplied std::ostream |
| 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.
| [in] | printToStream | determines whether to print to the supplied std::ostream |
| [in,out] | outStream | user supplied std::ostream |
Definition at line 605 of file algorithm/ROL_Problem_Def.hpp.
| 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.
| [in] | printToStream | determines whether to print to the supplied std::ostream |
| [in,out] | outStream | user supplied std::ostream |
Definition at line 644 of file algorithm/ROL_Problem_Def.hpp.
|
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.
| [in] | lumpConstraints | combine both linear and nonlinear constraints |
| [in] | printToStream | determines whether to print to the supplied std::ostream |
| [in,out] | outStream | user supplied std::ostream |
Reimplemented in ROL::StochasticProblem< Real >.
| bool ROL::Problem< Real >::isFinalized | ( | ) | const |
Indicate whether or no finalize has been called.
|
virtual |
Resume editting optimization problem after finalize has been called.
Reimplemented in ROL::StochasticProblem< Real >.
| void ROL::Problem< Real >::finalizeIteration | ( | ) |
Transform the optimization variables to the native parameterization after an optimization algorithm has finished.
|
private |
Definition at line 63 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 64 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 65 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 66 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 67 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 68 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 69 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 70 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 71 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 72 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 73 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 75 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 77 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 78 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 79 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 80 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 81 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 82 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 83 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 84 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 85 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 87 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 88 of file function/prox/ROL_Problem.hpp.
|
private |
Definition at line 90 of file function/prox/ROL_Problem.hpp.
|
protected |
Definition at line 94 of file function/prox/ROL_Problem.hpp.
Referenced by ROL::Problem< Real >::Problem().
|
protected |
Definition at line 95 of file function/prox/ROL_Problem.hpp.
Referenced by ROL::Problem< Real >::Problem().
|
protected |
Definition at line 96 of file function/prox/ROL_Problem.hpp.
Referenced by ROL::Problem< Real >::Problem().
|
protected |
Definition at line 97 of file function/prox/ROL_Problem.hpp.
Referenced by ROL::Problem< Real >::Problem().
|
protected |
Definition at line 98 of file function/prox/ROL_Problem.hpp.
Referenced by ROL::Problem< Real >::Problem().
|
protected |
Definition at line 99 of file function/prox/ROL_Problem.hpp.
Referenced by ROL::Problem< Real >::Problem().
|
protected |
Definition at line 100 of file function/prox/ROL_Problem.hpp.