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( step == "Interior Point" ) {
107  if ( bnd->isActivated() ) {
108  Teuchos::ParameterList &iplist = stepList.sublist("Interior Point");
109  Real mu = iplist.get("Initial Barrier Penalty",1.0);
110  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
111  // Build composite constraint and multipliers
112  incon_ = Teuchos::rcp(new BoundInequalityConstraint<Real>(*bnd,*sol));
114  Teuchos::RCP<Vector<Real> > lmult1 = sol->dual().clone();
115  Teuchos::RCP<Vector<Real> > lmult2 = sol->dual().clone();
116  Teuchos::RCP<Vector<Real> > inmul = CreatePartitionedVector(lmult1,lmult2);
117  // Create slack variables - fill with parlist value
118  Elementwise::Fill<Real> fill(slack_ival);
119  Teuchos::RCP<Vector<Real> > slack1 = sol->clone();
120  slack1->applyUnary(fill);
121  Teuchos::RCP<Vector<Real> > slack2 = sol->clone();
122  slack2->applyUnary(fill);
123  Teuchos::RCP<Vector<Real> > slack = CreatePartitionedVector(slack1,slack2);
124  // Form vector of optimization and slack variables
125  sol_ = CreatePartitionedVector(sol,slack);
126  // Form partitioned Lagrange multiplier
127  mul_ = CreatePartitionedVector(inmul);
128  // Create penalty
129  Teuchos::RCP<Objective<Real> > barrier
130  = Teuchos::rcp( new LogBarrierObjective<Real> );
131  obj_ = Teuchos::rcp( new InteriorPoint::PenalizedObjective<Real>(obj,barrier,*sol_,mu) );
132  }
133  else {
134  // Exception
135  }
136  }
137  else { // Not an Interior Point, but have parameters
138  bnd_ = bnd;
139  }
140  }
141  }
142  else {
143  bnd_ = bnd;
144  }
145  }
146 
147  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
148  const Teuchos::RCP<Vector<Real> > &sol,
149  const Teuchos::RCP<EqualityConstraint<Real> > &con,
150  const Teuchos::RCP<Vector<Real> > &mul,
151  const Teuchos::RCP<Teuchos::ParameterList> &parlist = Teuchos::null)
152  : obj_(obj), sol_(sol), bnd_(Teuchos::null), con_(con), mul_(mul),
153  parlist_(parlist), hasSlack_(false) {}
154 
155  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
156  const Teuchos::RCP<Vector<Real> > &sol,
157  const Teuchos::RCP<BoundConstraint<Real> > &bnd,
158  const Teuchos::RCP<EqualityConstraint<Real> > &con,
159  const Teuchos::RCP<Vector<Real> > &mul,
160  const Teuchos::RCP<Teuchos::ParameterList> &parlist = Teuchos::null)
161  : obj_(obj), sol_(sol), bnd_(Teuchos::null), con_(con), mul_(mul),
162  parlist_(parlist), hasSlack_(true) {
163  if ( parlist != Teuchos::null ) {
164  Teuchos::ParameterList &stepList = parlist->sublist("Step");
165  std::string step = stepList.get("Type","Trust Region");
166  if ( bnd->isActivated() && step == "Interior Point" ) {
167  Teuchos::ParameterList &iplist = stepList.sublist("Interior Point");
168  Real mu = iplist.get("Initial Barrier Penalty",1.0);
169  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
170  // Build composite constraint and multipliers
171  incon_ = Teuchos::rcp(new BoundInequalityConstraint<Real>(*bnd,*sol));
172  con_ = Teuchos::rcp(new InteriorPoint::CompositeConstraint<Real>(incon_,con));
173  Teuchos::RCP<Vector<Real> > lmult1 = sol->clone();
174  Teuchos::RCP<Vector<Real> > lmult2 = sol->clone();
175  Teuchos::RCP<Vector<Real> > inmul = CreatePartitionedVector(lmult1,lmult2);
176  // Create slack variables - fill with parlist value
177  Elementwise::Fill<Real> fill(slack_ival);
178  Teuchos::RCP<Vector<Real> > slack1 = sol->clone();
179  slack1->applyUnary(fill);
180  Teuchos::RCP<Vector<Real> > slack2 = sol->clone();
181  slack2->applyUnary(fill);
182  Teuchos::RCP<Vector<Real> > slack = CreatePartitionedVector(slack1,slack2);
183  // Form vector of optimization and slack variables
184  sol_ = CreatePartitionedVector(sol,slack);
185  // Form partitioned Lagrange multiplier
186  mul_ = CreatePartitionedVector(inmul,mul);
187  // Create penalty
188  Teuchos::RCP<Objective<Real> > barrier
189  = Teuchos::rcp( new LogBarrierObjective<Real> );
190  obj_ = Teuchos::rcp( new InteriorPoint::PenalizedObjective<Real>(obj,barrier,*sol_,mu) );
191  }
192  else {
193  bnd_ = bnd;
194  }
195  }
196  else {
197  bnd_ = bnd;
198  }
199  }
200 
201 
202  // For interior points without equality constraint
203  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
204  const Teuchos::RCP<Vector<Real> > &sol,
205  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
206  const Teuchos::RCP<Vector<Real> > &inmul,
207  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
208  : obj_(Teuchos::null), sol_(Teuchos::null),
209  con_(Teuchos::null), mul_(Teuchos::null),
210  parlist_(Teuchos::null), hasSlack_(true) {
211 
214  using Elementwise::Fill;
215 
216  using Teuchos::RCP; using Teuchos::rcp;
217 
218  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
219 
220  Real mu = iplist.get("Initial Barrier Penalty",1.0);
221  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
222 
223  con_ = rcp( new CompositeConstraint<Real>(incon) );
224 
225  // Create slack variables - fill with parlist value
226  RCP<Vector<Real> > slack = inmul->dual().clone();
227 
228  Fill<Real> fill(slack_ival);
229 
230  slack->applyUnary(fill);
231 
232  // Form vector of optimization and slack variables
233  sol_ = CreatePartitionedVector(sol,slack);
234 
235  // Form partitioned Lagrange multiplier
236  mul_ = CreatePartitionedVector(inmul);
237 
238  // Create penalty
239  RCP<Objective<Real> > barrier = rcp( new LogBarrierObjective<Real> );
240 
241  obj_ = rcp( new PenalizedObjective<Real>(obj,barrier,*sol_,mu) );
242 
243  }
244 
245  // Bound but no equality
246  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
247  const Teuchos::RCP<Vector<Real> > &sol,
248  const Teuchos::RCP<BoundConstraint<Real> > &bnd,
249  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
250  const Teuchos::RCP<Vector<Real> > &inmul,
251  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
252  : obj_(Teuchos::null), sol_(Teuchos::null), bnd_(bnd),
253  con_(Teuchos::null), mul_(Teuchos::null),
254  parlist_(Teuchos::null), hasSlack_(true) {
255 
258  using Elementwise::Fill;
259 
260  using Teuchos::RCP; using Teuchos::rcp;
261 
262  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
263 
264  Real mu = iplist.get("Initial Barrier Penalty",1.0);
265  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
266 
267  con_ = rcp( new CompositeConstraint<Real>(incon) );
268 
269  // Create slack variables - fill with parlist value
270  RCP<Vector<Real> > slack = inmul->dual().clone();
271 
272  Fill<Real> fill(slack_ival);
273 
274  slack->applyUnary(fill);
275 
276  // Form vector of optimization and slack variables
277  sol_ = CreatePartitionedVector(sol,slack);
278 
279  // Form partitioned Lagrange multiplier
280  mul_ = CreatePartitionedVector(inmul);
281 
282  // Create penalties
283  RCP<Objective<Real> > slack_barrier = rcp( new LogBarrierObjective<Real> );
284 
285  RCP<Objective<Real> > bc_barrier = rcp( new ObjectiveFromBoundConstraint<Real>(*bnd,*parlist) );
286 
287  obj_ = rcp( new PenalizedObjective<Real>(obj,slack_barrier,bc_barrier,*sol_,mu) );
288 
289  }
290 
291 
292  // For interior points with equality constraint
293  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
294  const Teuchos::RCP<Vector<Real> > &sol,
295  const Teuchos::RCP<EqualityConstraint<Real> > &eqcon,
296  const Teuchos::RCP<Vector<Real> > &eqmul,
297  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
298  const Teuchos::RCP<Vector<Real> > &inmul,
299  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
300  : obj_(Teuchos::null), sol_(Teuchos::null),
301  con_(Teuchos::null), mul_(Teuchos::null),
302  parlist_(parlist), hasSlack_(true) {
303 
306  using Elementwise::Fill;
307 
308  using Teuchos::RCP; using Teuchos::rcp;
309 
310  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
311 
312  Real mu = iplist.get("Initial Barrier Penalty",1.0);
313  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
314 
315  con_ = rcp( new CompositeConstraint<Real>(incon,eqcon) );
316 
317  // Create slack variables - fill with parlist value
318  RCP<Vector<Real> > slack = inmul->dual().clone();
319 
320  Fill<Real> fill(slack_ival);
321 
322  slack->applyUnary(fill);
323 
324  // Form vector of optimization and slack variables
325  sol_ = CreatePartitionedVector(sol,slack);
326 
327  // Form partitioned Lagrange multiplier
328  mul_ = CreatePartitionedVector(inmul,eqmul);
329 
330  // Create penalty
331  RCP<Objective<Real> > slack_barrier = rcp( new LogBarrierObjective<Real> );
332 
333  obj_ = rcp( new PenalizedObjective<Real>(obj,slack_barrier,*sol_,mu) );
334 
335  }
336 
337  // Both bound and equality constraint
338  OptimizationProblem(const Teuchos::RCP<Objective<Real> > &obj,
339  const Teuchos::RCP<Vector<Real> > &sol,
340  const Teuchos::RCP<BoundConstraint<Real> > &bnd,
341  const Teuchos::RCP<EqualityConstraint<Real> > &eqcon,
342  const Teuchos::RCP<Vector<Real> > &eqmul,
343  const Teuchos::RCP<InequalityConstraint<Real> > &incon,
344  const Teuchos::RCP<Vector<Real> > &inmul,
345  const Teuchos::RCP<Teuchos::ParameterList> &parlist )
346  : obj_(Teuchos::null), sol_(Teuchos::null), bnd_(bnd),
347  con_(Teuchos::null), mul_(Teuchos::null),
348  parlist_(parlist), hasSlack_(true) {
349 
352  using Elementwise::Fill;
353 
354  using Teuchos::RCP; using Teuchos::rcp;
355 
356  Teuchos::ParameterList &iplist = parlist->sublist("Interior Point");
357 
358  Real mu = iplist.get("Initial Barrier Penalty",1.0);
359  Real slack_ival = iplist.get("Initial Slack Variable Value",1.0);
360 
361  con_ = rcp( new CompositeConstraint<Real>(incon,eqcon) );
362 
363  // Create slack variables - fill with parlist value
364  RCP<Vector<Real> > slack = inmul->dual().clone();
365 
366  Fill<Real> fill(slack_ival);
367 
368  slack->applyUnary(fill);
369 
370  // Form vector of optimization and slack variables
371  sol_ = CreatePartitionedVector(sol,slack);
372 
373  // Form partitioned Lagrange multiplier
374  mul_ = CreatePartitionedVector(inmul,eqmul);
375 
376  // Create penalties
377  RCP<Objective<Real> > slack_barrier = rcp( new LogBarrierObjective<Real> );
378  RCP<Objective<Real> > bc_barrier = rcp( new ObjectiveFromBoundConstraint<Real>(*bnd,*parlist) );
379 
380  obj_ = rcp( new PenalizedObjective<Real>(obj,slack_barrier,bc_barrier,*sol_,mu) );
381 
382 
383 
384  }
385 
386 
387  Teuchos::RCP<Objective<Real> > getObjective(void) {
388  return obj_;
389  }
390 
391  void setObjective(const Teuchos::RCP<Objective<Real> > &obj) {
392  obj_ = obj;
393  }
394 
395  Teuchos::RCP<Vector<Real> > getSolutionVector(void) {
396  return sol_;
397  }
398 
399  void setSolutionVector(const Teuchos::RCP<Vector<Real> > &sol) {
400  sol_ = sol;
401  }
402 
403  Teuchos::RCP<BoundConstraint<Real> > getBoundConstraint(void) {
404  return bnd_;
405  }
406 
407  void setBoundConstraint(const Teuchos::RCP<BoundConstraint<Real> > &bnd) {
408  bnd_ = bnd;
409  }
410 
411  Teuchos::RCP<EqualityConstraint<Real> > getEqualityConstraint(void) {
412  return con_;
413  }
414 
415  void setEqualityConstraint(const Teuchos::RCP<EqualityConstraint<Real> > &con) {
416  con_ = con;
417  }
418 
419  Teuchos::RCP<Vector<Real> > getMultiplierVector(void) {
420  return mul_;
421  }
422 
423  void setMultiplierVector(const Teuchos::RCP<Vector<Real> > &mul) {
424  mul_ = mul;
425  }
426 
427  Teuchos::RCP<Teuchos::ParameterList> getParameterList(void) {
428  return parlist_;
429  }
430 
431  void setParameterList( const Teuchos::RCP<Teuchos::ParameterList> &parlist ) {
432  parlist_ = parlist;
433  }
434 
435  virtual std::vector<std::vector<Real> > checkObjectiveGradient( const Vector<Real> &d,
436  const bool printToStream = true,
437  std::ostream & outStream = std::cout,
438  const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
439  const int order = 1 ) {
440  if(hasSlack_) {
441  Teuchos::RCP<PV> ds = Teuchos::rcp_static_cast<PV>(sol_->clone());
442  ds->set(OPT,d);
443  RandomizeVector(*(ds->get(SLACK)));
444  return obj_->checkGradient(*sol_,*ds,printToStream,outStream,numSteps,order);
445  }
446  else {
447  return obj_->checkGradient(*sol_,d,printToStream,outStream,numSteps,order);
448  }
449  }
450 
451  virtual std::vector<std::vector<Real> > checkObjectiveHessVec( const Vector<Real> &v,
452  const bool printToStream = true,
453  std::ostream & outStream = std::cout,
454  const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
455  const int order = 1 ) {
456  if(hasSlack_) {
457  Teuchos::RCP<PV> vs = Teuchos::rcp_static_cast<PV>(sol_->clone());
458  vs->set(OPT,v);
459  RandomizeVector(*(vs->get(SLACK)));
460  return obj_->checkHessVec(*sol_,*vs,printToStream,outStream,numSteps,order);
461  }
462  else {
463  return obj_->checkHessVec(*sol_,v,printToStream,outStream,numSteps,order);
464  }
465  }
466 
467 };
468 }
469 #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.
Has both inequality and equality constraints. Treat inequality constraint as equality with slack vari...
void set(const V &x)
Set where .
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)