44 #ifndef ROL_BOUND_CONSTRAINT_SIMOPT_H 45 #define ROL_BOUND_CONSTRAINT_SIMOPT_H 75 Teuchos::RCP<BoundConstraint<Real> >
bnd1_;
76 Teuchos::RCP<BoundConstraint<Real> >
bnd2_;
88 if (
bnd1_->isActivated() ||
bnd2_->isActivated() ) {
106 if (
bnd1_->isActivated() ) {
109 if (
bnd2_->isActivated() ) {
125 if (
bnd1_->isActivated() ) {
126 Teuchos::RCP<Vector<Real> > x1 = xs.
get_1()->clone(); x1->set(*(xs.
get_1()));
130 if (
bnd2_->isActivated() ) {
131 Teuchos::RCP<Vector<Real> > x2 = xs.
get_2()->clone(); x2->set(*(xs.
get_2()));
149 if (
bnd1_->isActivated() ) {
153 if (
bnd2_->isActivated() ) {
175 if (
bnd1_->isActivated() ) {
176 Teuchos::RCP<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
177 bnd1_->pruneUpperActive(*v1,*(xs.
get_1()),eps);
180 if (
bnd2_->isActivated() ) {
181 Teuchos::RCP<Vector<Real> > v2 = vs.
get_2()->clone(); v2->set(*(vs.
get_2()));
182 bnd2_->pruneUpperActive(*v2,*(xs.
get_2()),eps);
207 if (
bnd1_->isActivated() ) {
208 Teuchos::RCP<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
212 if (
bnd2_->isActivated() ) {
213 Teuchos::RCP<Vector<Real> > v2 = vs.
get_2()->clone(); v2->set(*(vs.
get_2()));
235 if (
bnd1_->isActivated() ) {
236 Teuchos::RCP<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
237 bnd1_->pruneLowerActive(*v1,*(xs.
get_1()),eps);
240 if (
bnd2_->isActivated() ) {
241 Teuchos::RCP<Vector<Real> > v2 = vs.
get_2()->clone(); v2->set(*(vs.
get_2()));
242 bnd2_->pruneLowerActive(*v2,*(xs.
get_2()),eps);
267 if (
bnd1_->isActivated() ) {
268 Teuchos::RCP<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
272 if (
bnd2_->isActivated() ) {
273 Teuchos::RCP<Vector<Real> > v2 = vs.
get_2()->clone(); v2->set(*(vs.
get_2()));
280 const Teuchos::RCP<const Vector<Real> > l1 =
bnd1_->getLowerVectorRCP();
281 const Teuchos::RCP<const Vector<Real> > l2 =
bnd2_->getLowerVectorRCP();
287 const Teuchos::RCP<const Vector<Real> > u1 =
bnd1_->getUpperVectorRCP();
288 const Teuchos::RCP<const Vector<Real> > u2 =
bnd2_->getUpperVectorRCP();
303 Teuchos::RCP<Vector<Real> > u1 = us.
get_1()->clone();
304 Teuchos::RCP<Vector<Real> > u2 = us.
get_2()->clone();
305 bnd1_->setVectorToUpperBound(*u1);
306 bnd2_->setVectorToUpperBound(*u2);
319 Teuchos::RCP<Vector<Real> > l1 = ls.
get_1()->clone();
320 Teuchos::RCP<Vector<Real> > l2 = ls.
get_2()->clone();
321 bnd1_->setVectorToLowerBound(*l1);
322 bnd2_->setVectorToLowerBound(*l2);
343 if (
bnd1_->isActivated() ) {
344 Teuchos::RCP<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
348 if (
bnd2_->isActivated() ) {
349 Teuchos::RCP<Vector<Real> > v2 = vs.
get_2()->clone(); v2->set(*(vs.
get_2()));
374 if (
bnd1_->isActivated() ) {
375 Teuchos::RCP<Vector<Real> > v1 = vs.
get_1()->clone(); v1->set(*(vs.
get_1()));
379 if (
bnd2_->isActivated() ) {
380 Teuchos::RCP<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.
void setVectorToLowerBound(Vector< Real > &l)
Set the input vector to the lower bound.
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.
Teuchos::RCP< const Vector< Real > > get_2() const
Contains definitions of custom data types in ROL.
void set_1(const Vector< Real > &vec)
Defines the linear algebra or vector space interface.
void setVectorToUpperBound(Vector< Real > &u)
Set the input vector to the upper bound.
bool checkMultipliers(const Vector< Real > &l, const Vector< Real > &x)
Determine if a vector of Lagrange multipliers is nonnegative components.
Teuchos::RCP< BoundConstraint< Real > > bnd1_
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.
Teuchos::RCP< const Vector< Real > > get_1() const
BoundConstraint_SimOpt(const Teuchos::RCP< BoundConstraint< Real > > &bnd1, const Teuchos::RCP< BoundConstraint< Real > > &bnd2)
Default constructor.
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.
const Teuchos::RCP< const Vector< Real > > getUpperVectorRCP(void) const
Return the ref count pointer to the upper bound vector.
Teuchos::RCP< BoundConstraint< Real > > bnd2_
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.
const Teuchos::RCP< const Vector< Real > > getLowerVectorRCP(void) const
Return the ref count pointer to the lower bound vector.
void set_2(const Vector< Real > &vec)