ROL
ROL_OptimizationProblem.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ************************************************************************
3 //
4 // Rapid Optimization Library (ROL) Package
5 // Copyright (2014) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact lead developers:
38 // Drew Kouri (dpkouri@sandia.gov) and
39 // Denis Ridzal (dridzal@sandia.gov)
40 //
41 // ************************************************************************
42 // @HEADER
43 
44 #ifndef ROL_OPTIMIZATIONPROBLEM_HPP
45 #define ROL_OPTIMIZATIONPROBLEM_HPP
46 
47 #include "Teuchos_ParameterList.hpp"
48 #include "ROL_Objective.hpp"
49 #include "ROL_Vector.hpp"
50 #include "ROL_BoundConstraint.hpp"
51 #include "ROL_InteriorPoint.hpp"
56 #include "ROL_RandomVector.hpp"
57 
58 namespace ROL {
59 
60 /*
61  * Note: We may wish to consider making the get functions private and make Algorithm
62  * a friend of OptimizationProblem as Algorithm is the only class which should
63  * need these functions and they may return something other than what the user
64  * expects (penalized instead of raw objective, solution and slack instead of
65  * solution, etc).
66  */
67 
68 template<class Real>
70 
72  typedef typename PV::size_type size_type;
73 
74 private:
75  Teuchos::RCP<Objective<Real> > obj_;
76  Teuchos::RCP<Vector<Real> > sol_;
77  Teuchos::RCP<BoundConstraint<Real> > bnd_;
78  Teuchos::RCP<EqualityConstraint<Real> > con_;
79  Teuchos::RCP<InequalityConstraint<Real> > incon_;
80  Teuchos::RCP<Vector<Real> > mul_;
81  Teuchos::RCP<Teuchos::ParameterList> parlist_;
82 
83  bool hasSlack_;
84 
85  const static size_type OPT = 0;
86  const static size_type SLACK = 1;
87 
88 public:
89  virtual ~OptimizationProblem(void) {}
90 
92  : obj_(Teuchos::null), sol_(Teuchos::null), bnd_(Teuchos::null),
93  con_(Teuchos::null), mul_(Teuchos::null),
94  parlist_(Teuchos::null), hasSlack_(false) {}
95 
96  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
97  const Teuchos::RCP<Vector<Real> > &sol,
98  const Teuchos::RCP<BoundConstraint<Real> > &bnd = Teuchos::null,
99  const Teuchos::RCP<Teuchos::ParameterList> &parlist = Teuchos::null)
100  : obj_(obj), sol_(sol), bnd_(Teuchos::null), con_(Teuchos::null), mul_(Teuchos::null),
101  parlist_(parlist), hasSlack_(false) {
102  if ( parlist != Teuchos::null ) {
103  if ( bnd != Teuchos::null ) {
104  Teuchos::ParameterList &stepList = parlist->sublist("Step");
105  std::string step = stepList.get("Type","Trust Region");
106  if ( bnd->isActivated() && step == "Interior Point" ) {
107  Teuchos::ParameterList &iplist = stepList.sublist("Interior Point");
108  Real mu = iplist.get("Initial Barrier Penalty",1.0);
109  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
110  // Build composite constraint and multipliers
111  incon_ = Teuchos::rcp(new BoundInequalityConstraint<Real>(*bnd,*sol));
112  con_ = Teuchos::rcp(new InteriorPoint::CompositeConstraint<Real>(incon_));
113  Teuchos::RCP<Vector<Real> > lmult1 = sol->dual().clone();
114  Teuchos::RCP<Vector<Real> > lmult2 = sol->dual().clone();
115  Teuchos::RCP<Vector<Real> > inmul = CreatePartitionedVector(lmult1,lmult2);
116  // Create slack variables - fill with parlist value
117  Elementwise::Fill<Real> fill(slack_ival);
118  Teuchos::RCP<Vector<Real> > slack1 = sol->clone();
119  slack1->applyUnary(fill);
120  Teuchos::RCP<Vector<Real> > slack2 = sol->clone();
121  slack2->applyUnary(fill);
122  Teuchos::RCP<Vector<Real> > slack = CreatePartitionedVector(slack1,slack2);
123  // Form vector of optimization and slack variables
124  sol_ = CreatePartitionedVector(sol,slack);
125  // Form partitioned Lagrange multiplier
126  mul_ = CreatePartitionedVector(inmul);
127  // Create penalty
128  Teuchos::RCP<Objective<Real> > barrier
129  = Teuchos::rcp( new LogBarrierObjective<Real> );
130  obj_ = Teuchos::rcp( new InteriorPoint::PenalizedObjective<Real>(obj,barrier,*sol_,mu) );
131  }
132  }
133  }
134  else {
135  bnd_ = Teuchos::rcp(&*bnd,false);
136  }
137  }
138 
139  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
140  const Teuchos::RCP<Vector<Real> > &sol,
141  const Teuchos::RCP<EqualityConstraint<Real> > &con,
142  const Teuchos::RCP<Vector<Real> > &mul,
143  const Teuchos::RCP<Teuchos::ParameterList> &parlist = Teuchos::null)
144  : obj_(obj), sol_(sol), bnd_(Teuchos::null), con_(con), mul_(mul),
145  parlist_(parlist), hasSlack_(false) {}
146 
147  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
148  const Teuchos::RCP<Vector<Real> > &sol,
149  const Teuchos::RCP<BoundConstraint<Real> > &bnd,
150  const Teuchos::RCP<EqualityConstraint<Real> > &con,
151  const Teuchos::RCP<Vector<Real> > &mul,
152  const Teuchos::RCP<Teuchos::ParameterList> &parlist = Teuchos::null)
153  : obj_(obj), sol_(sol), bnd_(Teuchos::null), con_(con), mul_(mul),
154  parlist_(parlist), hasSlack_(true) {
155  if ( parlist != Teuchos::null ) {
156  Teuchos::ParameterList &stepList = parlist->sublist("Step");
157  std::string step = stepList.get("Type","Trust Region");
158  if ( bnd->isActivated() && step == "Interior Point" ) {
159  Teuchos::ParameterList &iplist = stepList.sublist("Interior Point");
160  Real mu = iplist.get("Initial Barrier Penalty",1.0);
161  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
162  // Build composite constraint and multipliers
163  incon_ = Teuchos::rcp(new BoundInequalityConstraint<Real>(*bnd,*sol));
164  con_ = Teuchos::rcp(new InteriorPoint::CompositeConstraint<Real>(incon_,con));
165  Teuchos::RCP<Vector<Real> > lmult1 = sol->clone();
166  Teuchos::RCP<Vector<Real> > lmult2 = sol->clone();
167  Teuchos::RCP<Vector<Real> > inmul = CreatePartitionedVector(lmult1,lmult2);
168  // Create slack variables - fill with parlist value
169  Elementwise::Fill<Real> fill(slack_ival);
170  Teuchos::RCP<Vector<Real> > slack1 = sol->clone();
171  slack1->applyUnary(fill);
172  Teuchos::RCP<Vector<Real> > slack2 = sol->clone();
173  slack2->applyUnary(fill);
174  Teuchos::RCP<Vector<Real> > slack = CreatePartitionedVector(slack1,slack2);
175  // Form vector of optimization and slack variables
176  sol_ = CreatePartitionedVector(sol,slack);
177  // Form partitioned Lagrange multiplier
178  mul_ = CreatePartitionedVector(inmul,mul);
179  // Create penalty
180  Teuchos::RCP<Objective<Real> > barrier
181  = Teuchos::rcp( new LogBarrierObjective<Real> );
182  obj_ = Teuchos::rcp( new InteriorPoint::PenalizedObjective<Real>(obj,barrier,*sol_,mu) );
183  }
184  else {
185  bnd_ = bnd;
186  }
187  }
188  else {
189  bnd_ = bnd;
190  }
191  }
192 
193  // For interior points without equality constraint
194  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
195  const Teuchos::RCP<Vector<Real> > &sol,
196  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
197  const Teuchos::RCP<Vector<Real> > &inmul,
198  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
199  : obj_(Teuchos::null), sol_(Teuchos::null),
200  con_(Teuchos::null), mul_(Teuchos::null),
201  parlist_(Teuchos::null), hasSlack_(true) {
202 
205  using Elementwise::Fill;
206 
207  using Teuchos::RCP; using Teuchos::rcp;
208 
209  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
210 
211  Real mu = iplist.get("Initial Barrier Penalty",1.0);
212  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
213 
214  con_ = rcp( new CompositeConstraint<Real>(incon) );
215 
216  // Create slack variables - fill with parlist value
217  RCP<Vector<Real> > slack = inmul->dual().clone();
218 
219  Fill<Real> fill(slack_ival);
220 
221  slack->applyUnary(fill);
222 
223  // Form vector of optimization and slack variables
224  sol_ = CreatePartitionedVector(sol,slack);
225 
226  // Form partitioned Lagrange multiplier
227  mul_ = CreatePartitionedVector(inmul);
228 
229  // Create penalty
230  RCP<Objective<Real> > barrier = rcp( new LogBarrierObjective<Real> );
231 
232  obj_ = rcp( new PenalizedObjective<Real>(obj,barrier,*sol_,mu) );
233 
234  }
235 
236  // Bound but no equality
237  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
238  const Teuchos::RCP<Vector<Real> > &sol,
239  const Teuchos::RCP<BoundConstraint<Real> > &bnd,
240  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
241  const Teuchos::RCP<Vector<Real> > &inmul,
242  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
243  : obj_(Teuchos::null), sol_(Teuchos::null), bnd_(bnd),
244  con_(Teuchos::null), mul_(Teuchos::null),
245  parlist_(Teuchos::null), hasSlack_(true) {
246 
249  using Elementwise::Fill;
250 
251  using Teuchos::RCP; using Teuchos::rcp;
252 
253  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
254 
255  Real mu = iplist.get("Initial Barrier Penalty",1.0);
256  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
257 
258  con_ = rcp( new CompositeConstraint<Real>(incon) );
259 
260  // Create slack variables - fill with parlist value
261  RCP<Vector<Real> > slack = inmul->dual().clone();
262 
263  Fill<Real> fill(slack_ival);
264 
265  slack->applyUnary(fill);
266 
267  // Form vector of optimization and slack variables
268  sol_ = CreatePartitionedVector(sol,slack);
269 
270  // Form partitioned Lagrange multiplier
271  mul_ = CreatePartitionedVector(inmul);
272 
273  // Create penalties
274  RCP<Objective<Real> > slack_barrier = rcp( new LogBarrierObjective<Real> );
275 
276  RCP<Objective<Real> > bc_barrier = rcp( new ObjectiveFromBoundConstraint<Real>(*bnd) );
277 
278  obj_ = rcp( new PenalizedObjective<Real>(obj,slack_barrier,bc_barrier,*sol_,mu) );
279 
280  }
281 
282 
283  // For interior points with equality constraint
284  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
285  const Teuchos::RCP<Vector<Real> > &sol,
286  const Teuchos::RCP<EqualityConstraint<Real> > &eqcon,
287  const Teuchos::RCP<Vector<Real> > &eqmul,
288  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
289  const Teuchos::RCP<Vector<Real> > &inmul,
290  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
291  : obj_(Teuchos::null), sol_(Teuchos::null),
292  con_(Teuchos::null), mul_(Teuchos::null),
293  parlist_(parlist), hasSlack_(true) {
294 
297  using Elementwise::Fill;
298 
299  using Teuchos::RCP; using Teuchos::rcp;
300 
301  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
302 
303  Real mu = iplist.get("Initial Barrier Penalty",1.0);
304  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
305 
306  con_ = rcp( new CompositeConstraint<Real>(incon,eqcon) );
307 
308  // Create slack variables - fill with parlist value
309  RCP<Vector<Real> > slack = inmul->dual().clone();
310 
311  Fill<Real> fill(slack_ival);
312 
313  slack->applyUnary(fill);
314 
315  // Form vector of optimization and slack variables
316  sol_ = CreatePartitionedVector(sol,slack);
317 
318  // Form partitioned Lagrange multiplier
319  mul_ = CreatePartitionedVector(inmul,eqmul);
320 
321  // Create penalty
322  RCP<Objective<Real> > slack_barrier = rcp( new LogBarrierObjective<Real> );
323 
324  obj_ = rcp( new PenalizedObjective<Real>(obj,slack_barrier,*sol_,mu) );
325 
326  }
327 
328  // Both bound and equality constraint
329  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
330  const Teuchos::RCP<Vector<Real> > &sol,
331  const Teuchos::RCP<BoundConstraint<Real> > &bnd,
332  const Teuchos::RCP<EqualityConstraint<Real> > &eqcon,
333  const Teuchos::RCP<Vector<Real> > &eqmul,
334  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
335  const Teuchos::RCP<Vector<Real> > &inmul,
336  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
337  : obj_(Teuchos::null), sol_(Teuchos::null), bnd_(bnd),
338  con_(Teuchos::null), mul_(Teuchos::null),
339  parlist_(parlist), hasSlack_(true) {
340 
343  using Elementwise::Fill;
344 
345  using Teuchos::RCP; using Teuchos::rcp;
346 
347  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
348 
349  Real mu = iplist.get("Initial Barrier Penalty",1.0);
350  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
351 
352  con_ = rcp( new CompositeConstraint<Real>(incon,eqcon) );
353 
354  // Create slack variables - fill with parlist value
355  RCP<Vector<Real> > slack = inmul->dual().clone();
356 
357  Fill<Real> fill(slack_ival);
358 
359  slack->applyUnary(fill);
360 
361  // Form vector of optimization and slack variables
362  sol_ = CreatePartitionedVector(sol,slack);
363 
364  // Form partitioned Lagrange multiplier
365  mul_ = CreatePartitionedVector(inmul,eqmul);
366 
367  // Create penalties
368  RCP<Objective<Real> > slack_barrier = rcp( new LogBarrierObjective<Real> );
369  RCP<Objective<Real> > bc_barrier = rcp( new ObjectiveFromBoundConstraint<Real>(*bnd) );
370 
371  obj_ = rcp( new PenalizedObjective<Real>(obj,slack_barrier,bc_barrier,*sol_,mu) );
372 
373 
374 
375  }
376 
377 
378  Teuchos::RCP<Objective<Real> > getObjective(void) {
379  return obj_;
380  }
381 
382  void setObjective(const Teuchos::RCP<Objective<Real> > &obj) {
383  obj_ = obj;
384  }
385 
386  Teuchos::RCP<Vector<Real> > getSolutionVector(void) {
387  return sol_;
388  }
389 
390  void setSolutionVector(const Teuchos::RCP<Vector<Real> > &sol) {
391  sol_ = sol;
392  }
393 
394  Teuchos::RCP<BoundConstraint<Real> > getBoundConstraint(void) {
395  return bnd_;
396  }
397 
398  void setBoundConstraint(const Teuchos::RCP<BoundConstraint<Real> > &bnd) {
399  bnd_ = bnd;
400  }
401 
402  Teuchos::RCP<EqualityConstraint<Real> > getEqualityConstraint(void) {
403  return con_;
404  }
405 
406  void setEqualityConstraint(const Teuchos::RCP<EqualityConstraint<Real> > &con) {
407  con_ = con;
408  }
409 
410  Teuchos::RCP<Vector<Real> > getMultiplierVector(void) {
411  return mul_;
412  }
413 
414  void setMultiplierVector(const Teuchos::RCP<Vector<Real> > &mul) {
415  mul_ = mul;
416  }
417 
418  Teuchos::RCP<Teuchos::ParameterList> getParameterList(void) {
419  return parlist_;
420  }
421 
422  void setParameterList( const Teuchos::RCP<Teuchos::ParameterList> &parlist ) {
423  parlist_ = parlist;
424  }
425 
426  virtual std::vector<std::vector<Real> > checkObjectiveGradient( const Vector<Real> &d,
427  const bool printToStream = true,
428  std::ostream & outStream = std::cout,
429  const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
430  const int order = 1 ) {
431  if(hasSlack_) {
432  Teuchos::RCP<PV> ds = Teuchos::rcp_static_cast<PV>(sol_->clone());
433  ds->set(OPT,d);
434  RandomizeVector(*(ds->get(SLACK)));
435  return obj_->checkGradient(*sol_,*ds,printToStream,outStream,numSteps,order);
436  }
437  else {
438  return obj_->checkGradient(*sol_,d,printToStream,outStream,numSteps,order);
439  }
440  }
441 
442  virtual std::vector<std::vector<Real> > checkObjectiveHessVec( const Vector<Real> &v,
443  const bool printToStream = true,
444  std::ostream & outStream = std::cout,
445  const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
446  const int order = 1 ) {
447  if(hasSlack_) {
448  Teuchos::RCP<PV> vs = Teuchos::rcp_static_cast<PV>(sol_->clone());
449  vs->set(OPT,v);
450  RandomizeVector(*(vs->get(SLACK)));
451  return obj_->checkHessVec(*sol_,*vs,printToStream,outStream,numSteps,order);
452  }
453  else {
454  return obj_->checkHessVec(*sol_,v,printToStream,outStream,numSteps,order);
455  }
456  }
457 
458 };
459 }
460 #endif
Provides the interface to evaluate objective functions.
OptimizationProblem(const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< Vector< Real > > &sol, const Teuchos::RCP< BoundConstraint< Real > > &bnd, const Teuchos::RCP< EqualityConstraint< Real > > &eqcon, const Teuchos::RCP< Vector< Real > > &eqmul, const Teuchos::RCP< InequalityConstraint< Real > > &incon, const Teuchos::RCP< Vector< Real > > &inmul, const Teuchos::RCP< Teuchos::ParameterList > &parlist)
OptimizationProblem(const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< Vector< Real > > &sol, const Teuchos::RCP< EqualityConstraint< Real > > &con, const Teuchos::RCP< Vector< Real > > &mul, const Teuchos::RCP< Teuchos::ParameterList > &parlist=Teuchos::null)
virtual std::vector< std::vector< Real > > checkObjectiveGradient(const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
PartitionedVector< Real > PV
Defines the linear algebra of vector space on a generic partitioned vector.
OptimizationProblem(const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< Vector< Real > > &sol, const Teuchos::RCP< BoundConstraint< Real > > &bnd, const Teuchos::RCP< EqualityConstraint< Real > > &con, const Teuchos::RCP< Vector< Real > > &mul, const Teuchos::RCP< Teuchos::ParameterList > &parlist=Teuchos::null)
Has both inequality and equality constraints. Treat inequality constraint as equality with slack vari...
Teuchos::RCP< Objective< Real > > obj_
Teuchos::RCP< Teuchos::ParameterList > getParameterList(void)
void RandomizeVector(Vector< Real > &x, const Real &lower=0.0, const Real &upper=1.0)
Fill a ROL::Vector with uniformly-distributed random numbers in the interval [lower,upper].
Provides an implementation for bound inequality constraints.
Teuchos::RCP< Vector< Real > > CreatePartitionedVector(const Teuchos::RCP< Vector< Real > > &a)
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:74
Teuchos::RCP< BoundConstraint< Real > > getBoundConstraint(void)
void setObjective(const Teuchos::RCP< Objective< Real > > &obj)
Defines the equality constraint operator interface.
OptimizationProblem(const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< Vector< Real > > &sol, const Teuchos::RCP< InequalityConstraint< Real > > &incon, const Teuchos::RCP< Vector< Real > > &inmul, const Teuchos::RCP< Teuchos::ParameterList > &parlist)
void setSolutionVector(const Teuchos::RCP< Vector< Real > > &sol)
Teuchos::RCP< Vector< Real > > mul_
Adds barrier term to generic objective.
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &parlist)
Teuchos::RCP< Vector< Real > > getMultiplierVector(void)
Provides the interface to apply upper and lower bound constraints.
#define ROL_NUM_CHECKDERIV_STEPS
Number of steps for derivative checks.
Definition: ROL_Types.hpp:70
OptimizationProblem(const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< Vector< Real > > &sol, const Teuchos::RCP< EqualityConstraint< Real > > &eqcon, const Teuchos::RCP< Vector< Real > > &eqmul, const Teuchos::RCP< InequalityConstraint< Real > > &incon, const Teuchos::RCP< Vector< Real > > &inmul, const Teuchos::RCP< Teuchos::ParameterList > &parlist)
Teuchos::RCP< Teuchos::ParameterList > parlist_
Teuchos::RCP< EqualityConstraint< Real > > con_
Teuchos::RCP< InequalityConstraint< Real > > incon_
OptimizationProblem(const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< Vector< Real > > &sol, const Teuchos::RCP< BoundConstraint< Real > > &bnd, const Teuchos::RCP< InequalityConstraint< Real > > &incon, const Teuchos::RCP< Vector< Real > > &inmul, const Teuchos::RCP< Teuchos::ParameterList > &parlist)
Teuchos::RCP< BoundConstraint< Real > > bnd_
std::vector< PV >::size_type size_type
Teuchos::RCP< EqualityConstraint< Real > > getEqualityConstraint(void)
OptimizationProblem(const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< Vector< Real > > &sol, const Teuchos::RCP< BoundConstraint< Real > > &bnd=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > &parlist=Teuchos::null)
Log barrier objective for interior point methods.
Teuchos::RCP< Vector< Real > > getSolutionVector(void)
Teuchos::RCP< Vector< Real > > sol_
void setMultiplierVector(const Teuchos::RCP< Vector< Real > > &mul)
Provides a unique argument for inequality constraints, which otherwise behave exactly as equality con...
void setEqualityConstraint(const Teuchos::RCP< EqualityConstraint< Real > > &con)
void setBoundConstraint(const Teuchos::RCP< BoundConstraint< Real > > &bnd)
virtual std::vector< std::vector< Real > > checkObjectiveHessVec(const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
Create a logarithmic penalty objective from upper and lower bound vectors.
Teuchos::RCP< Objective< Real > > getObjective(void)