44 #ifndef ROL_BOUND_CONSTRAINT_SIMOPT_H
45 #define ROL_BOUND_CONSTRAINT_SIMOPT_H
75 ROL::Ptr<BoundConstraint<Real> >
bnd1_;
76 ROL::Ptr<BoundConstraint<Real> >
bnd2_;
88 if (
bnd1_->isActivated() ||
bnd2_->isActivated() ) {
106 if (
bnd1_->isActivated() ) {
109 if (
bnd2_->isActivated() ) {
125 if (
bnd1_->isActivated() ) {
126 ROL::Ptr<Vector<Real> > x1 = xs.
get_1()->clone(); x1->set(*(xs.
get_1()));
130 if (
bnd2_->isActivated() ) {
131 ROL::Ptr<Vector<Real> > x2 = xs.
get_2()->clone(); x2->set(*(xs.
get_2()));
150 if (
bnd1_->isActivated() ) {
151 ROL::Ptr<Vector<Real> > x1 = xs.
get_1()->clone(); x1->set(*(xs.
get_1()));
152 bnd1_->projectInterior(*x1);
155 if (
bnd2_->isActivated() ) {
156 ROL::Ptr<Vector<Real> > x2 = xs.
get_2()->clone(); x2->set(*(xs.
get_2()));
157 bnd2_->projectInterior(*x2);
174 if (
bnd1_->isActivated() ) {
178 if (
bnd2_->isActivated() ) {
200 if (
bnd1_->isActivated() ) {
201 ROL::Ptr<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
202 bnd1_->pruneUpperActive(*v1,*(xs.
get_1()),eps);
205 if (
bnd2_->isActivated() ) {
206 ROL::Ptr<Vector<Real> > v2 = vs.
get_2()->clone(); v2->set(*(vs.
get_2()));
207 bnd2_->pruneUpperActive(*v2,*(xs.
get_2()),eps);
232 if (
bnd1_->isActivated() ) {
233 ROL::Ptr<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
237 if (
bnd2_->isActivated() ) {
238 ROL::Ptr<Vector<Real> > v2 = vs.
get_2()->clone(); v2->set(*(vs.
get_2()));
260 if (
bnd1_->isActivated() ) {
261 ROL::Ptr<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
262 bnd1_->pruneLowerActive(*v1,*(xs.
get_1()),eps);
265 if (
bnd2_->isActivated() ) {
266 ROL::Ptr<Vector<Real> > v2 = vs.
get_2()->clone(); v2->set(*(vs.
get_2()));
267 bnd2_->pruneLowerActive(*v2,*(xs.
get_2()),eps);
292 if (
bnd1_->isActivated() ) {
293 ROL::Ptr<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
297 if (
bnd2_->isActivated() ) {
298 ROL::Ptr<Vector<Real> > v2 = vs.
get_2()->clone(); v2->set(*(vs.
get_2()));
305 const ROL::Ptr<const Vector<Real>> l1 =
bnd1_->getLowerBound();
306 const ROL::Ptr<const Vector<Real>> l2 =
bnd2_->getLowerBound();
307 return ROL::makePtr<Vector_SimOpt<Real>>( ROL::constPtrCast<Vector<Real>>(l1),
312 const ROL::Ptr<const Vector<Real>> u1 =
bnd1_->getUpperBound();
313 const ROL::Ptr<const Vector<Real>> u2 =
bnd2_->getUpperBound();
314 return ROL::makePtr<Vector_SimOpt<Real>>( ROL::constPtrCast<Vector<Real>>(u1),
334 if (
bnd1_->isActivated() ) {
335 ROL::Ptr<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
339 if (
bnd2_->isActivated() ) {
340 ROL::Ptr<Vector<Real> > v2 = vs.
get_2()->clone(); v2->set(*(vs.
get_2()));
362 if (
bnd1_->isActivated() ) {
363 ROL::Ptr<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
367 if (
bnd2_->isActivated() ) {
368 ROL::Ptr<Vector<Real> > v2 = vs.
get_2()->clone(); v2->set(*(vs.
get_2()));
~BoundConstraint_SimOpt()
bool isFeasible(const Vector< Real > &v)
Check if the vector, v, is feasible.
ROL::Ptr< const Vector< Real > > get_2() const
void pruneLowerActive(Vector< Real > &v, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the lower -active set.
Defines the linear algebra or vector space interface for simulation-based optimization.
void activate(void)
Turn on bounds.
void pruneLowerActive(Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the lower -binding set.
ROL::Ptr< BoundConstraint< Real > > bnd2_
Contains definitions of custom data types in ROL.
void set_1(const Vector< Real > &vec)
Defines the linear algebra or vector space interface.
const ROL::Ptr< const Vector< Real > > getLowerBound(void) const
Return the ref count pointer to the lower bound vector.
bool checkMultipliers(const Vector< Real > &l, const Vector< Real > &x)
Determine if a vector of Lagrange multipliers is nonnegative components.
const ROL::Ptr< const Vector< Real > > getUpperBound(void) const
Return the ref count pointer to the upper bound vector.
void projectInterior(Vector< Real > &x)
Project optimization variables into the interior of the feasible set.
void pruneActive(Vector< Real > &v, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the -active set.
void pruneUpperActive(Vector< Real > &v, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the upper -active set.
void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update bounds.
Provides the interface to apply upper and lower bound constraints.
void pruneUpperActive(Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the upper -binding set.
void pruneActive(Vector< Real > &v, const Vector< Real > &g, const Vector< Real > &x, Real eps=0.0)
Set variables to zero if they correspond to the -binding set.
void deactivate(void)
Turn off bounds.
void project(Vector< Real > &x)
Project optimization variables onto the bounds.
ROL::Ptr< BoundConstraint< Real > > bnd1_
BoundConstraint_SimOpt(const ROL::Ptr< BoundConstraint< Real > > &bnd1, const ROL::Ptr< BoundConstraint< Real > > &bnd2)
Default constructor.
void set_2(const Vector< Real > &vec)
ROL::Ptr< const Vector< Real > > get_1() const