Ejemplo n.º 1
0
  MoreauYosidaPenalty(const Teuchos::RCP<Objective<Real> > &obj,
                      const Teuchos::RCP<BoundConstraint<Real> > &con, 
                      const ROL::Vector<Real> &x, const Real mu = 1.0)
    : obj_(obj), con_(con), mu_(mu),
      fval_(0), isConEvaluated_(false), nfval_(0), ngval_(0) {

    g_    = x.dual().clone();
    l_    = x.clone();
    l1_   = x.clone();
    dl1_  = x.dual().clone();
    u_    = x.clone();
    u1_   = x.clone();
    du1_  = x.dual().clone();
    xlam_ = x.clone();
    v_    = x.clone();
    dv_   = x.dual().clone();
    dv2_  = x.dual().clone();
    lam_  = x.clone();
    tmp_  = x.clone();

    con_->setVectorToLowerBound(*l_);
    con_->setVectorToUpperBound(*u_);

    lam_->zero();
    //lam_->set(*u_);
    //lam_->plus(*l_);
    //lam_->scale(0.5);
  }
 AugmentedLagrangian(Objective<Real> &obj, EqualityConstraint<Real> &con, 
               const ROL::Vector<Real> &x, const ROL::Vector<Real> &c)
   : mu_(0.0), fval_(0.0), isConEvaluated_(false), ncval_(0), nfval_(0), ngval_(0) {
   obj_ = Teuchos::rcp(&obj, false);
   con_ = Teuchos::rcp(&con, false);
   c_    = c.clone();
   dc1_  = x.dual().clone();
   dc2_  = c.clone();
   lam_  = c.dual().clone();
   dlam_ = c.dual().clone();
   flag_ = true;
   HessianLevel_ = 1;
 }
Ejemplo n.º 3
0
 void initialize(const ROL::Vector<Real> &x, const ROL::Vector<Real> &s, const ROL::Vector<Real> &g, 
                 Objective<Real> &obj, BoundConstraint<Real> &con) {
   LineSearch<Real>::initialize(x,s,g,obj,con);
   xnew_ = x.clone();
 }