54 #include "Teuchos_ParameterList.hpp" 71 Teuchos::RCP<StepState<Real> >
state_;
74 Teuchos::RCP<StepState<Real> >
getState(
void) {
100 Real tol = std::sqrt(ROL_EPSILON<Real>()), one(1), zero(0);
104 state_->searchSize = zero;
116 Teuchos::RCP<Vector<Real> > xnew = x.
clone();
121 algo_state.
gnorm = xnew->norm();
206 if( con == Teuchos::null ) {
207 if( bnd == Teuchos::null ) {
211 initialize(*x, x->dual(), *obj, *bnd, algo_state);
215 if( bnd == Teuchos::null ) {
216 initialize(*x,x->dual(),*l,l->dual(),*obj,*con,algo_state );
218 initialize(*x,x->dual(),*l,l->dual(),*obj,*con,*bnd,algo_state);
231 if( con == Teuchos::null ) {
232 if( bnd == Teuchos::null ) {
236 compute(s,*x, *obj, *bnd, algo_state);
239 if( bnd == Teuchos::null ) {
240 compute(s,*x,*l,*obj,*con,algo_state);
242 compute(s,*x,*l,*obj,*con,*bnd,algo_state);
256 if( con == Teuchos::null ) {
257 if( bnd == Teuchos::null ) {
261 update(*x, s, *obj, *bnd, algo_state);
264 if( bnd == Teuchos::null ) {
265 update(*x,*l,s,*obj,*con,algo_state);
267 update(*x,*l,s,*obj,*con,*bnd,algo_state);
Provides the interface to evaluate objective functions.
virtual std::string printHeader(void) const
Print iterate header.
virtual void update(Vector< Real > &x, const Vector< Real > &s, Objective< Real > &obj, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state)
Update step, if successful.
void compute(Vector< Real > &s, OptimizationProblem< Real > &opt, AlgorithmState< Real > &algo_state)
void initialize(OptimizationProblem< Real > &opt, AlgorithmState< Real > &algo_state)
virtual Real value(const Vector< Real > &x, Real &tol)=0
Compute value.
Provides the interface to compute optimization steps.
virtual void compute(Vector< Real > &s, const Vector< Real > &x, const Vector< Real > &l, Objective< Real > &obj, EqualityConstraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state)
Compute step (equality constraints).
Teuchos::RCP< StepState< Real > > state_
Teuchos::RCP< StepState< Real > > getState(void)
Contains definitions of custom data types in ROL.
virtual void update(Vector< Real > &x, Vector< Real > &l, const Vector< Real > &s, Objective< Real > &obj, EqualityConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Update step, if successful (equality constraints).
virtual Teuchos::RCP< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual void compute(Vector< Real > &s, const Vector< Real > &x, const Vector< Real > &l, Objective< Real > &obj, EqualityConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Compute step (equality constraints).
virtual void initialize(Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Initialize step with bound constraint.
virtual void update(Vector< Real > &x, Vector< Real > &l, const Vector< Real > &s, Objective< Real > &obj, EqualityConstraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state)
Update step, if successful (equality constraints).
Defines the linear algebra or vector space interface.
Teuchos::RCP< BoundConstraint< Real > > getBoundConstraint(void)
void update(OptimizationProblem< Real > &opt, const Vector< Real > &s, AlgorithmState< Real > &algo_state)
State for algorithm class. Will be used for restarts.
virtual void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
bool isActivated(void)
Check if bounds are on.
Defines the equality constraint operator interface.
const Teuchos::RCP< const StepState< Real > > getStepState(void) const
Get state for step object.
State for step class. Will be used for restarts.
Teuchos::RCP< Vector< Real > > getMultiplierVector(void)
Provides the interface to apply upper and lower bound constraints.
virtual void compute(Vector< Real > &s, const Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state)
Compute step.
Teuchos::RCP< EqualityConstraint< Real > > getEqualityConstraint(void)
Teuchos::RCP< Vector< Real > > getSolutionVector(void)
virtual std::string print(AlgorithmState< Real > &algo_state, bool printHeader=false) const
Print iterate status.
virtual void initialize(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Initialize step with bound constraint.
virtual void initialize(Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, EqualityConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Initialize step with equality constraint.
virtual void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update objective function.
virtual void initialize(Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, EqualityConstraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state)
Initialize step with equality constraint.
virtual void project(Vector< Real > &x)
Project optimization variables onto the bounds.
Teuchos::RCP< Objective< Real > > getObjective(void)
virtual std::string printName(void) const
Print step name.