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 #ifdef OPTIMIZATION_PROBLEM_REFACTOR
49 #else
50 
51 
52 #include "Teuchos_ParameterList.hpp"
53 #include "ROL_Objective.hpp"
54 #include "ROL_Vector.hpp"
55 #include "ROL_BoundConstraint.hpp"
56 #include "ROL_InteriorPoint.hpp"
61 #include "ROL_RandomVector.hpp"
62 
63 namespace ROL {
64 
65 /*
66  * Note: We may wish to consider making the get functions private and make Algorithm
67  * a friend of OptimizationProblem as Algorithm is the only class which should
68  * need these functions and they may return something other than what the user
69  * expects (penalized instead of raw objective, solution and slack instead of
70  * solution, etc).
71  */
72 
73 template<class Real>
75 
77  typedef typename PV::size_type size_type;
78 
79 private:
80  Teuchos::RCP<Objective<Real> > obj_;
81  Teuchos::RCP<Vector<Real> > sol_;
82  Teuchos::RCP<BoundConstraint<Real> > bnd_;
83  Teuchos::RCP<EqualityConstraint<Real> > con_;
84  Teuchos::RCP<InequalityConstraint<Real> > incon_;
85  Teuchos::RCP<Vector<Real> > mul_;
86  Teuchos::RCP<Teuchos::ParameterList> parlist_;
87 
88  bool hasSlack_;
89 
90  const static size_type OPT = 0;
91  const static size_type SLACK = 1;
92 
93 public:
94  virtual ~OptimizationProblem(void) {}
95 
97  : obj_(Teuchos::null), sol_(Teuchos::null), bnd_(Teuchos::null),
98  con_(Teuchos::null), mul_(Teuchos::null),
99  parlist_(Teuchos::null), hasSlack_(false) {}
100 
101  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
102  const Teuchos::RCP<Vector<Real> > &sol,
103  const Teuchos::RCP<BoundConstraint<Real> > &bnd = Teuchos::null,
104  const Teuchos::RCP<Teuchos::ParameterList> &parlist = Teuchos::null)
105  : obj_(obj), sol_(sol), bnd_(Teuchos::null), con_(Teuchos::null), mul_(Teuchos::null),
106  parlist_(parlist), hasSlack_(false) {
107  if ( parlist != Teuchos::null ) {
108  if ( bnd != Teuchos::null ) {
109  Teuchos::ParameterList &stepList = parlist->sublist("Step");
110  std::string step = stepList.get("Type","Trust Region");
111  if( step == "Interior Point" ) {
112  if ( bnd->isActivated() ) {
113  Teuchos::ParameterList &iplist = stepList.sublist("Interior Point");
114  Real mu = iplist.get("Initial Barrier Penalty",1.0);
115  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
116  // Build composite constraint and multipliers
117  incon_ = Teuchos::rcp(new BoundInequalityConstraint<Real>(*bnd,*sol));
118  con_ = Teuchos::rcp(new InteriorPoint::CompositeConstraint<Real>(incon_));
119  Teuchos::RCP<Vector<Real> > lmult1 = sol->dual().clone();
120  Teuchos::RCP<Vector<Real> > lmult2 = sol->dual().clone();
121  Teuchos::RCP<Vector<Real> > inmul = CreatePartitionedVector(lmult1,lmult2);
122  // Create slack variables - fill with parlist value
123  Elementwise::Fill<Real> fill(slack_ival);
124  Teuchos::RCP<Vector<Real> > slack1 = sol->clone();
125  slack1->applyUnary(fill);
126  Teuchos::RCP<Vector<Real> > slack2 = sol->clone();
127  slack2->applyUnary(fill);
128  Teuchos::RCP<Vector<Real> > slack = CreatePartitionedVector(slack1,slack2);
129  // Form vector of optimization and slack variables
130  sol_ = CreatePartitionedVector(sol,slack);
131  // Form partitioned Lagrange multiplier
132  mul_ = CreatePartitionedVector(inmul);
133  // Create penalty
134  Teuchos::RCP<Objective<Real> > barrier
135  = Teuchos::rcp( new LogBarrierObjective<Real> );
136  obj_ = Teuchos::rcp( new InteriorPoint::PenalizedObjective<Real>(obj,barrier,*sol_,mu) );
137  }
138  else {
139  // Exception
140  }
141  }
142  else { // Not an Interior Point, but have parameters
143  bnd_ = bnd;
144  }
145  }
146  }
147  else {
148  bnd_ = bnd;
149  }
150  }
151 
152  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
153  const Teuchos::RCP<Vector<Real> > &sol,
154  const Teuchos::RCP<EqualityConstraint<Real> > &con,
155  const Teuchos::RCP<Vector<Real> > &mul,
156  const Teuchos::RCP<Teuchos::ParameterList> &parlist = Teuchos::null)
157  : obj_(obj), sol_(sol), bnd_(Teuchos::null), con_(con), mul_(mul),
158  parlist_(parlist), hasSlack_(false) {}
159 
160  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
161  const Teuchos::RCP<Vector<Real> > &sol,
162  const Teuchos::RCP<BoundConstraint<Real> > &bnd,
163  const Teuchos::RCP<EqualityConstraint<Real> > &con,
164  const Teuchos::RCP<Vector<Real> > &mul,
165  const Teuchos::RCP<Teuchos::ParameterList> &parlist = Teuchos::null)
166  : obj_(obj), sol_(sol), bnd_(Teuchos::null), con_(con), mul_(mul),
167  parlist_(parlist), hasSlack_(true) {
168  if ( parlist != Teuchos::null ) {
169  Teuchos::ParameterList &stepList = parlist->sublist("Step");
170  std::string step = stepList.get("Type","Trust Region");
171  if ( bnd->isActivated() && step == "Interior Point" ) {
172  Teuchos::ParameterList &iplist = stepList.sublist("Interior Point");
173  Real mu = iplist.get("Initial Barrier Penalty",1.0);
174  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
175  // Build composite constraint and multipliers
176  incon_ = Teuchos::rcp(new BoundInequalityConstraint<Real>(*bnd,*sol));
177  con_ = Teuchos::rcp(new InteriorPoint::CompositeConstraint<Real>(incon_,con));
178  Teuchos::RCP<Vector<Real> > lmult1 = sol->clone();
179  Teuchos::RCP<Vector<Real> > lmult2 = sol->clone();
180  Teuchos::RCP<Vector<Real> > inmul = CreatePartitionedVector(lmult1,lmult2);
181  // Create slack variables - fill with parlist value
182  Elementwise::Fill<Real> fill(slack_ival);
183  Teuchos::RCP<Vector<Real> > slack1 = sol->clone();
184  slack1->applyUnary(fill);
185  Teuchos::RCP<Vector<Real> > slack2 = sol->clone();
186  slack2->applyUnary(fill);
187  Teuchos::RCP<Vector<Real> > slack = CreatePartitionedVector(slack1,slack2);
188  // Form vector of optimization and slack variables
189  sol_ = CreatePartitionedVector(sol,slack);
190  // Form partitioned Lagrange multiplier
191  mul_ = CreatePartitionedVector(inmul,mul);
192  // Create penalty
193  Teuchos::RCP<Objective<Real> > barrier
194  = Teuchos::rcp( new LogBarrierObjective<Real> );
195  obj_ = Teuchos::rcp( new InteriorPoint::PenalizedObjective<Real>(obj,barrier,*sol_,mu) );
196  }
197  else {
198  bnd_ = bnd;
199  }
200  }
201  else {
202  bnd_ = bnd;
203  }
204  }
205 
206 
207  // For interior points without equality constraint
208  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
209  const Teuchos::RCP<Vector<Real> > &sol,
210  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
211  const Teuchos::RCP<Vector<Real> > &inmul,
212  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
213  : obj_(Teuchos::null), sol_(Teuchos::null),
214  con_(Teuchos::null), mul_(Teuchos::null),
215  parlist_(Teuchos::null), hasSlack_(true) {
216 
219  using Elementwise::Fill;
220 
221  using Teuchos::RCP; using Teuchos::rcp;
222 
223  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
224 
225  Real mu = iplist.get("Initial Barrier Penalty",1.0);
226  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
227 
228  con_ = rcp( new CompositeConstraint<Real>(incon) );
229 
230  // Create slack variables - fill with parlist value
231  RCP<Vector<Real> > slack = inmul->dual().clone();
232 
233  Fill<Real> fill(slack_ival);
234 
235  slack->applyUnary(fill);
236 
237  // Form vector of optimization and slack variables
238  sol_ = CreatePartitionedVector(sol,slack);
239 
240  // Form partitioned Lagrange multiplier
241  mul_ = CreatePartitionedVector(inmul);
242 
243  // Create penalty
244  RCP<Objective<Real> > barrier = rcp( new LogBarrierObjective<Real> );
245 
246  obj_ = rcp( new PenalizedObjective<Real>(obj,barrier,*sol_,mu) );
247 
248  }
249 
250  // Bound but no equality
251  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
252  const Teuchos::RCP<Vector<Real> > &sol,
253  const Teuchos::RCP<BoundConstraint<Real> > &bnd,
254  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
255  const Teuchos::RCP<Vector<Real> > &inmul,
256  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
257  : obj_(Teuchos::null), sol_(Teuchos::null), bnd_(bnd),
258  con_(Teuchos::null), mul_(Teuchos::null),
259  parlist_(Teuchos::null), hasSlack_(true) {
260 
263  using Elementwise::Fill;
264 
265  using Teuchos::RCP; using Teuchos::rcp;
266 
267  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
268 
269  Real mu = iplist.get("Initial Barrier Penalty",1.0);
270  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
271 
272  con_ = rcp( new CompositeConstraint<Real>(incon) );
273 
274  // Create slack variables - fill with parlist value
275  RCP<Vector<Real> > slack = inmul->dual().clone();
276 
277  Fill<Real> fill(slack_ival);
278 
279  slack->applyUnary(fill);
280 
281  // Form vector of optimization and slack variables
282  sol_ = CreatePartitionedVector(sol,slack);
283 
284  // Form partitioned Lagrange multiplier
285  mul_ = CreatePartitionedVector(inmul);
286 
287  // Create penalties
288  RCP<Objective<Real> > slack_barrier = rcp( new LogBarrierObjective<Real> );
289 
290  RCP<Objective<Real> > bc_barrier = rcp( new ObjectiveFromBoundConstraint<Real>(*bnd,*parlist) );
291 
292  obj_ = rcp( new PenalizedObjective<Real>(obj,slack_barrier,bc_barrier,*sol_,mu) );
293 
294  }
295 
296 
297  // For interior points with equality constraint
298  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
299  const Teuchos::RCP<Vector<Real> > &sol,
300  const Teuchos::RCP<EqualityConstraint<Real> > &eqcon,
301  const Teuchos::RCP<Vector<Real> > &eqmul,
302  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
303  const Teuchos::RCP<Vector<Real> > &inmul,
304  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
305  : obj_(Teuchos::null), sol_(Teuchos::null),
306  con_(Teuchos::null), mul_(Teuchos::null),
307  parlist_(parlist), hasSlack_(true) {
308 
311  using Elementwise::Fill;
312 
313  using Teuchos::RCP; using Teuchos::rcp;
314 
315  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
316 
317  Real mu = iplist.get("Initial Barrier Penalty",1.0);
318  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
319 
320  con_ = rcp( new CompositeConstraint<Real>(incon,eqcon) );
321 
322  // Create slack variables - fill with parlist value
323  RCP<Vector<Real> > slack = inmul->dual().clone();
324 
325  Fill<Real> fill(slack_ival);
326 
327  slack->applyUnary(fill);
328 
329  // Form vector of optimization and slack variables
330  sol_ = CreatePartitionedVector(sol,slack);
331 
332  // Form partitioned Lagrange multiplier
333  mul_ = CreatePartitionedVector(inmul,eqmul);
334 
335  // Create penalty
336  RCP<Objective<Real> > slack_barrier = rcp( new LogBarrierObjective<Real> );
337 
338  obj_ = rcp( new PenalizedObjective<Real>(obj,slack_barrier,*sol_,mu) );
339 
340  }
341 
342  // Both bound and equality constraint
343  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
344  const Teuchos::RCP<Vector<Real> > &sol,
345  const Teuchos::RCP<BoundConstraint<Real> > &bnd,
346  const Teuchos::RCP<EqualityConstraint<Real> > &eqcon,
347  const Teuchos::RCP<Vector<Real> > &eqmul,
348  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
349  const Teuchos::RCP<Vector<Real> > &inmul,
350  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
351  : obj_(Teuchos::null), sol_(Teuchos::null), bnd_(bnd),
352  con_(Teuchos::null), mul_(Teuchos::null),
353  parlist_(parlist), hasSlack_(true) {
354 
357  using Elementwise::Fill;
358 
359  using Teuchos::RCP; using Teuchos::rcp;
360 
361  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
362 
363  Real mu = iplist.get("Initial Barrier Penalty",1.0);
364  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
365 
366  con_ = rcp( new CompositeConstraint<Real>(incon,eqcon) );
367 
368  // Create slack variables - fill with parlist value
369  RCP<Vector<Real> > slack = inmul->dual().clone();
370 
371  Fill<Real> fill(slack_ival);
372 
373  slack->applyUnary(fill);
374 
375  // Form vector of optimization and slack variables
376  sol_ = CreatePartitionedVector(sol,slack);
377 
378  // Form partitioned Lagrange multiplier
379  mul_ = CreatePartitionedVector(inmul,eqmul);
380 
381  // Create penalties
382  RCP<Objective<Real> > slack_barrier = rcp( new LogBarrierObjective<Real> );
383  RCP<Objective<Real> > bc_barrier = rcp( new ObjectiveFromBoundConstraint<Real>(*bnd,*parlist) );
384 
385  obj_ = rcp( new PenalizedObjective<Real>(obj,slack_barrier,bc_barrier,*sol_,mu) );
386 
387 
388 
389  }
390 
391 
392  Teuchos::RCP<Objective<Real> > getObjective(void) {
393  return obj_;
394  }
395 
396  void setObjective(const Teuchos::RCP<Objective<Real> > &obj) {
397  obj_ = obj;
398  }
399 
400  Teuchos::RCP<Vector<Real> > getSolutionVector(void) {
401  return sol_;
402  }
403 
404  void setSolutionVector(const Teuchos::RCP<Vector<Real> > &sol) {
405  sol_ = sol;
406  }
407 
408  Teuchos::RCP<BoundConstraint<Real> > getBoundConstraint(void) {
409  return bnd_;
410  }
411 
412  void setBoundConstraint(const Teuchos::RCP<BoundConstraint<Real> > &bnd) {
413  bnd_ = bnd;
414  }
415 
416  Teuchos::RCP<EqualityConstraint<Real> > getEqualityConstraint(void) {
417  return con_;
418  }
419 
420  void setEqualityConstraint(const Teuchos::RCP<EqualityConstraint<Real> > &con) {
421  con_ = con;
422  }
423 
424  Teuchos::RCP<Vector<Real> > getMultiplierVector(void) {
425  return mul_;
426  }
427 
428  void setMultiplierVector(const Teuchos::RCP<Vector<Real> > &mul) {
429  mul_ = mul;
430  }
431 
432  Teuchos::RCP<Teuchos::ParameterList> getParameterList(void) {
433  return parlist_;
434  }
435 
436  void setParameterList( const Teuchos::RCP<Teuchos::ParameterList> &parlist ) {
437  parlist_ = parlist;
438  }
439 
440  virtual std::vector<std::vector<Real> > checkObjectiveGradient( const Vector<Real> &d,
441  const bool printToStream = true,
442  std::ostream & outStream = std::cout,
443  const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
444  const int order = 1 ) {
445  if(hasSlack_) {
446  Teuchos::RCP<PV> ds = Teuchos::rcp_static_cast<PV>(sol_->clone());
447  ds->set(OPT,d);
448  RandomizeVector(*(ds->get(SLACK)));
449  return obj_->checkGradient(*sol_,*ds,printToStream,outStream,numSteps,order);
450  }
451  else {
452  return obj_->checkGradient(*sol_,d,printToStream,outStream,numSteps,order);
453  }
454  }
455 
456  virtual std::vector<std::vector<Real> > checkObjectiveHessVec( const Vector<Real> &v,
457  const bool printToStream = true,
458  std::ostream & outStream = std::cout,
459  const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
460  const int order = 1 ) {
461  if(hasSlack_) {
462  Teuchos::RCP<PV> vs = Teuchos::rcp_static_cast<PV>(sol_->clone());
463  vs->set(OPT,v);
464  RandomizeVector(*(vs->get(SLACK)));
465  return obj_->checkHessVec(*sol_,*vs,printToStream,outStream,numSteps,order);
466  }
467  else {
468  return obj_->checkHessVec(*sol_,v,printToStream,outStream,numSteps,order);
469  }
470  }
471 
472 };
473 }
474 
475 #endif // OPTIMIZATION_PROBLEM_REFACTOR
476 
477 #endif // ROL_OPTIMIZATIONPROBLEM_HPP
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:76
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.
Has both inequality and equality constraints. Treat inequality constraint as equality with slack vari...
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:73
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 penalty objective from upper and lower bound vectors.
Teuchos::RCP< Objective< Real > > getObjective(void)