ROL
function/test_14.cpp
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 
51 #include "ROL_HS9.hpp"
52 #include "ROL_HS14.hpp"
53 #include "ROL_HS28.hpp"
54 #include "ROL_HS42.hpp"
55 #include "ROL_HS48.hpp"
56 #include "ROL_HS49.hpp"
57 #include "ROL_HS50.hpp"
58 #include "ROL_HS51.hpp"
59 #include "ROL_HS52.hpp"
60 
61 #include "ROL_BinaryConstraint.hpp"
62 #include "ROL_DiagonalOperator.hpp"
64 #include "ROL_RandomVector.hpp"
65 #include "ROL_StdVector.hpp"
66 #include "ROL_Bounds.hpp"
67 
68 #include "ROL_Stream.hpp"
69 #include "Teuchos_GlobalMPISession.hpp"
70 
71 typedef double RealT;
72 
73 int main(int argc, char *argv[]) {
74 
75  Teuchos::GlobalMPISession mpiSession(&argc, &argv);
76 
77  // This little trick lets us print to std::cout only if a
78  // (dummy) command-line argument is provided.
79  int iprint = argc - 1;
80  ROL::Ptr<std::ostream> outStream;
81  ROL::nullstream bhs; // outputs nothing
82  if (iprint > 0)
83  outStream = ROL::makePtrFromRef(std::cout);
84  else
85  outStream = ROL::makePtrFromRef(bhs);
86 
87  int errorFlag = 0;
88 
89  try {
90  RealT tol = 1e4*std::sqrt(ROL::ROL_EPSILON<RealT>());
91  ROL::ParameterList list;
92  list.sublist("Status Test").set("Gradient Tolerance",1e-12);
93  list.sublist("Status Test").set("Constraint Tolerance",1e-12);
94  list.sublist("Status Test").set("Step Tolerance",1e-14);
95  list.sublist("Step").set("Type","Trust Region");
96  list.sublist("Step").sublist("Trust Region").set("Subproblem Solver","Truncated CG");
97  list.sublist("Step").sublist("Augmented Lagrangian").set("Print Intermediate Optimization History",true);
98  ROL::Ptr<ROL::Vector<RealT>> sol, mul, s, ds, Ps, imul, c;
99  ROL::Ptr<ROL::Objective<RealT>> obj, tobj;
100  ROL::Ptr<ROL::Constraint<RealT>> con, icon, tcon;
101  ROL::Ptr<ROL::BoundConstraint<RealT>> ibnd;
102  ROL::Ptr<ROL::ExplicitLinearConstraint<RealT>> elc;
103  ROL::Ptr<ROL::OptimizationProblem<RealT>> problem;
104  ROL::Ptr<ROL::OptimizationSolver<RealT>> solver;
105  std::vector<RealT> data;
106  RealT e1(0), e2(0), e3(0), e4(0), e5(0), err(0);
107 
108  *outStream << "Hock and Schittkowski Problem #9" << std::endl << std::endl;
110  obj = HS9.getObjective();
111  sol = HS9.getInitialGuess();
112  con = HS9.getEqualityConstraint();
113  mul = HS9.getEqualityMultiplier();
114 
115  elc = ROL::makePtr<ROL::ExplicitLinearConstraint<RealT>>(con,obj,sol,mul);
116  tobj = elc->getTransformedObjective();
117  s = sol->clone(); s->randomize();
118  ds = sol->clone(); ds->randomize();
119 
120  obj->checkGradient(*s,*ds,true,*outStream);
121  obj->checkHessVec(*s,*ds,true,*outStream);
122  tobj->checkGradient(*s,*ds,true,*outStream);
123  tobj->checkHessVec(*s,*ds,true,*outStream);
124 
125  s->zero();
126  problem = ROL::makePtr<ROL::OptimizationProblem<RealT>>(tobj,s);
127  solver = ROL::makePtr<ROL::OptimizationSolver<RealT>>(*problem,list);
128  solver->solve(*outStream);
129 
130  Ps = s->clone();
131  elc->project(Ps,s);
132  Ps->plus(*elc->getFeasibleVector());
133 
134  data = *ROL::staticPtrCast<ROL::StdVector<RealT>>(Ps)->getVector();
135  e1 = (data[0]+static_cast<RealT>(3))/static_cast<RealT>(12);
136  e2 = (data[1]+static_cast<RealT>(4))/static_cast<RealT>(16);
137  *outStream << " x1 = " << data[0] << " x2 = " << data[1] << std::endl;
138  err = std::max(std::abs(e1-std::round(e1)),std::abs(e2-std::round(e2)));
139  *outStream << " Max-Error = " << err << std::endl;
140  errorFlag = (err > tol ? 1 : 0);
141 
142  *outStream << std::endl << "Hock and Schittkowski Problem #28" << std::endl << std::endl;
144  obj = HS28.getObjective();
145  sol = HS28.getInitialGuess();
146  con = HS28.getEqualityConstraint();
147  mul = HS28.getEqualityMultiplier();
148 
149  elc = ROL::makePtr<ROL::ExplicitLinearConstraint<RealT>>(con,obj,sol,mul);
150  tobj = elc->getTransformedObjective();
151  s = sol->clone(); s->randomize();
152  ds = sol->clone(); ds->randomize();
153 
154  obj->checkGradient(*s,*ds,true,*outStream);
155  obj->checkHessVec(*s,*ds,true,*outStream);
156  tobj->checkGradient(*s,*ds,true,*outStream);
157  tobj->checkHessVec(*s,*ds,true,*outStream);
158 
159  s->zero();
160  problem = ROL::makePtr<ROL::OptimizationProblem<RealT>>(tobj,s);
161  solver = ROL::makePtr<ROL::OptimizationSolver<RealT>>(*problem,list);
162  solver->solve(*outStream);
163 
164  Ps = s->clone();
165  elc->project(Ps,s);
166  Ps->plus(*elc->getFeasibleVector());
167 
168  data = *ROL::staticPtrCast<ROL::StdVector<RealT>>(Ps)->getVector();
169  e1 = (data[0]-static_cast<RealT>(0.5));
170  e2 = (data[1]+static_cast<RealT>(0.5));
171  e3 = (data[2]-static_cast<RealT>(0.5));
172  *outStream << " x1 = " << data[0] << " x2 = " << data[1] << " x3 = " << data[2] << std::endl;
173  err = std::max(std::max(std::abs(e1),std::abs(e2)),std::abs(e3));
174  *outStream << " Max-Error = " << err << std::endl;
175  errorFlag += (err > tol ? 1 : 0);
176 
177  *outStream << std::endl << "Hock and Schittkowski Problem #48" << std::endl << std::endl;
179  obj = HS48.getObjective();
180  sol = HS48.getInitialGuess();
181  con = HS48.getEqualityConstraint();
182  mul = HS48.getEqualityMultiplier();
183 
184  elc = ROL::makePtr<ROL::ExplicitLinearConstraint<RealT>>(con,obj,sol,mul);
185  tobj = elc->getTransformedObjective();
186  s = sol->clone(); s->randomize();
187  ds = sol->clone(); ds->randomize();
188 
189  obj->checkGradient(*s,*ds,true,*outStream);
190  obj->checkHessVec(*s,*ds,true,*outStream);
191  tobj->checkGradient(*s,*ds,true,*outStream);
192  tobj->checkHessVec(*s,*ds,true,*outStream);
193 
194  s->zero();
195  problem = ROL::makePtr<ROL::OptimizationProblem<RealT>>(tobj,s);
196  solver = ROL::makePtr<ROL::OptimizationSolver<RealT>>(*problem,list);
197  solver->solve(*outStream);
198 
199  Ps = s->clone();
200  elc->project(Ps,s);
201  Ps->plus(*elc->getFeasibleVector());
202 
203  data = *ROL::staticPtrCast<ROL::StdVector<RealT>>(Ps)->getVector();
204  e1 = (data[0]-static_cast<RealT>(1));
205  e2 = (data[1]-static_cast<RealT>(1));
206  e3 = (data[2]-static_cast<RealT>(1));
207  e4 = (data[3]-static_cast<RealT>(1));
208  e5 = (data[4]-static_cast<RealT>(1));
209  *outStream << " x1 = " << data[0] << " x2 = " << data[1]
210  << " x3 = " << data[2] << " x4 = " << data[3]
211  << " x5 = " << data[4] << std::endl;
212  err = std::max(std::max(std::max(std::max(std::abs(e1),std::abs(e2)),std::abs(e3)),std::abs(e4)),std::abs(e5));
213  *outStream << " Max-Error = " << err << std::endl;
214  errorFlag += (err > tol ? 1 : 0);
215 
216  *outStream << std::endl << "Hock and Schittkowski Problem #49" << std::endl << std::endl;
218  obj = HS49.getObjective();
219  sol = HS49.getInitialGuess();
220  con = HS49.getEqualityConstraint();
221  mul = HS49.getEqualityMultiplier();
222 
223  elc = ROL::makePtr<ROL::ExplicitLinearConstraint<RealT>>(con,obj,sol,mul);
224  tobj = elc->getTransformedObjective();
225  s = sol->clone(); s->randomize();
226  ds = sol->clone(); ds->randomize();
227 
228  obj->checkGradient(*s,*ds,true,*outStream);
229  obj->checkHessVec(*s,*ds,true,*outStream);
230  tobj->checkGradient(*s,*ds,true,*outStream);
231  tobj->checkHessVec(*s,*ds,true,*outStream);
232 
233  s->zero();
234  problem = ROL::makePtr<ROL::OptimizationProblem<RealT>>(tobj,s);
235  solver = ROL::makePtr<ROL::OptimizationSolver<RealT>>(*problem,list);
236  solver->solve(*outStream);
237 
238  Ps = s->clone();
239  elc->project(Ps,s);
240  Ps->plus(*elc->getFeasibleVector());
241 
242  data = *ROL::staticPtrCast<ROL::StdVector<RealT>>(Ps)->getVector();
243  e1 = (data[0]-static_cast<RealT>(1));
244  e2 = (data[1]-static_cast<RealT>(1));
245  e3 = (data[2]-static_cast<RealT>(1));
246  e4 = (data[3]-static_cast<RealT>(1));
247  e5 = (data[4]-static_cast<RealT>(1));
248  *outStream << " x1 = " << data[0] << " x2 = " << data[1]
249  << " x3 = " << data[2] << " x4 = " << data[3]
250  << " x5 = " << data[4] << std::endl;
251  err = std::max(std::max(std::max(std::max(std::abs(e1),std::abs(e2)),std::abs(e3)),std::abs(e4)),std::abs(e5));
252  *outStream << " Max-Error = " << err << std::endl;
253  errorFlag += (err > tol ? 1 : 0);
254 
255  *outStream << std::endl << "Hock and Schittkowski Problem #50" << std::endl << std::endl;
257  obj = HS50.getObjective();
258  sol = HS50.getInitialGuess();
259  con = HS50.getEqualityConstraint();
260  mul = HS50.getEqualityMultiplier();
261 
262  elc = ROL::makePtr<ROL::ExplicitLinearConstraint<RealT>>(con,obj,sol,mul);
263  tobj = elc->getTransformedObjective();
264  s = sol->clone(); s->randomize();
265  ds = sol->clone(); ds->randomize();
266 
267  obj->checkGradient(*s,*ds,true,*outStream);
268  obj->checkHessVec(*s,*ds,true,*outStream);
269  tobj->checkGradient(*s,*ds,true,*outStream);
270  tobj->checkHessVec(*s,*ds,true,*outStream);
271 
272  s->zero();
273  problem = ROL::makePtr<ROL::OptimizationProblem<RealT>>(tobj,s);
274  solver = ROL::makePtr<ROL::OptimizationSolver<RealT>>(*problem,list);
275  solver->solve(*outStream);
276 
277  Ps = s->clone();
278  elc->project(Ps,s);
279  Ps->plus(*elc->getFeasibleVector());
280 
281  data = *ROL::staticPtrCast<ROL::StdVector<RealT>>(Ps)->getVector();
282  e1 = (data[0]-static_cast<RealT>(1));
283  e2 = (data[1]-static_cast<RealT>(1));
284  e3 = (data[2]-static_cast<RealT>(1));
285  e4 = (data[3]-static_cast<RealT>(1));
286  e5 = (data[4]-static_cast<RealT>(1));
287  *outStream << " x1 = " << data[0] << " x2 = " << data[1]
288  << " x3 = " << data[2] << " x4 = " << data[3]
289  << " x5 = " << data[4] << std::endl;
290  err = std::max(std::max(std::max(std::max(std::abs(e1),std::abs(e2)),std::abs(e3)),std::abs(e4)),std::abs(e5));
291  *outStream << " Max-Error = " << err << std::endl;
292  errorFlag += (err > tol ? 1 : 0);
293 
294  *outStream << std::endl << "Hock and Schittkowski Problem #51" << std::endl << std::endl;
296  obj = HS51.getObjective();
297  sol = HS51.getInitialGuess();
298  con = HS51.getEqualityConstraint();
299  mul = HS51.getEqualityMultiplier();
300 
301  elc = ROL::makePtr<ROL::ExplicitLinearConstraint<RealT>>(con,obj,sol,mul);
302  tobj = elc->getTransformedObjective();
303  s = sol->clone(); s->randomize();
304  ds = sol->clone(); ds->randomize();
305 
306  obj->checkGradient(*s,*ds,true,*outStream);
307  obj->checkHessVec(*s,*ds,true,*outStream);
308  tobj->checkGradient(*s,*ds,true,*outStream);
309  tobj->checkHessVec(*s,*ds,true,*outStream);
310 
311  s->zero();
312  problem = ROL::makePtr<ROL::OptimizationProblem<RealT>>(tobj,s);
313  solver = ROL::makePtr<ROL::OptimizationSolver<RealT>>(*problem,list);
314  solver->solve(*outStream);
315 
316  Ps = s->clone();
317  elc->project(Ps,s);
318  Ps->plus(*elc->getFeasibleVector());
319 
320  data = *ROL::staticPtrCast<ROL::StdVector<RealT>>(Ps)->getVector();
321  e1 = (data[0]-static_cast<RealT>(1));
322  e2 = (data[1]-static_cast<RealT>(1));
323  e3 = (data[2]-static_cast<RealT>(1));
324  e4 = (data[3]-static_cast<RealT>(1));
325  e5 = (data[4]-static_cast<RealT>(1));
326  *outStream << " x1 = " << data[0] << " x2 = " << data[1]
327  << " x3 = " << data[2] << " x4 = " << data[3]
328  << " x5 = " << data[4] << std::endl;
329  err = std::max(std::max(std::max(std::max(std::abs(e1),std::abs(e2)),std::abs(e3)),std::abs(e4)),std::abs(e5));
330  *outStream << " Max-Error = " << err << std::endl;
331  errorFlag += (err > tol ? 1 : 0);
332 
333  *outStream << std::endl << "Hock and Schittkowski Problem #52" << std::endl << std::endl;
335  obj = HS52.getObjective();
336  sol = HS52.getInitialGuess();
337  con = HS52.getEqualityConstraint();
338  mul = HS52.getEqualityMultiplier();
339 
340  elc = ROL::makePtr<ROL::ExplicitLinearConstraint<RealT>>(con,obj,sol,mul);
341  tobj = elc->getTransformedObjective();
342  s = sol->clone(); s->randomize();
343  ds = sol->clone(); ds->randomize();
344 
345  obj->checkGradient(*s,*ds,true,*outStream);
346  obj->checkHessVec(*s,*ds,true,*outStream);
347  tobj->checkGradient(*s,*ds,true,*outStream);
348  tobj->checkHessVec(*s,*ds,true,*outStream);
349 
350  s->zero();
351  problem = ROL::makePtr<ROL::OptimizationProblem<RealT>>(tobj,s);
352  solver = ROL::makePtr<ROL::OptimizationSolver<RealT>>(*problem,list);
353  solver->solve(*outStream);
354 
355  Ps = s->clone();
356  elc->project(Ps,s);
357  Ps->plus(*elc->getFeasibleVector());
358 
359  data = *ROL::staticPtrCast<ROL::StdVector<RealT>>(Ps)->getVector();
360  e1 = (data[0]-static_cast<RealT>(-33.0/349.0));
361  e2 = (data[1]-static_cast<RealT>(11.0/349.0));
362  e3 = (data[2]-static_cast<RealT>(180.0/349.0));
363  e4 = (data[3]-static_cast<RealT>(-158.0/349.0));
364  e5 = (data[4]-static_cast<RealT>(11.0/349.0));
365  *outStream << " x1 = " << data[0] << " x2 = " << data[1]
366  << " x3 = " << data[2] << " x4 = " << data[3]
367  << " x5 = " << data[4] << std::endl;
368  err = std::max(std::max(std::max(std::max(std::abs(e1),std::abs(e2)),std::abs(e3)),std::abs(e4)),std::abs(e5));
369  *outStream << " Max-Error = " << err << std::endl;
370  errorFlag += (err > tol ? 1 : 0);
371 
372  *outStream << std::endl << "Hock and Schittkowski Problem #14" << std::endl << std::endl;
373  list.sublist("Step").set("Type","Moreau-Yosida Penalty");
375  obj = HS14.getObjective();
376  sol = HS14.getInitialGuess();
377  con = HS14.getEqualityConstraint();
378  mul = HS14.getEqualityMultiplier();
379  icon = HS14.getInequalityConstraint();
380  imul = HS14.getInequalityMultiplier();
381  ibnd = HS14.getSlackBoundConstraint();
382 
383  elc = ROL::makePtr<ROL::ExplicitLinearConstraint<RealT>>(con,obj,icon,sol,mul);
384  tobj = elc->getTransformedObjective();
385  tcon = elc->getTransformedConstraint();
386  s = sol->clone(); s->randomize();
387  ds = sol->clone(); ds->randomize();
388  c = imul->clone(); c->randomize();
389 
390  obj->checkGradient(*s,*ds,true,*outStream);
391  obj->checkHessVec(*s,*ds,true,*outStream);
392  tobj->checkGradient(*s,*ds,true,*outStream);
393  tobj->checkHessVec(*s,*ds,true,*outStream);
394  tcon->checkApplyJacobian(*s,*ds,*c,true,*outStream);
395  tcon->checkApplyAdjointJacobian(*s,*c,*c,*ds,true,*outStream);
396  tcon->checkApplyAdjointHessian(*s,*c,*ds,*s,true,*outStream);
397 
398  s->zero();
399  problem = ROL::makePtr<ROL::OptimizationProblem<RealT>>(tobj,s,tcon,imul,ibnd);
400  solver = ROL::makePtr<ROL::OptimizationSolver<RealT>>(*problem,list);
401  solver->solve(*outStream);
402 
403  Ps = s->clone();
404  elc->project(Ps,s);
405  Ps->plus(*elc->getFeasibleVector());
406 
407  data = *ROL::staticPtrCast<ROL::StdVector<RealT>>(Ps)->getVector();
408  e1 = (data[0]-static_cast<RealT>(0.5 *(std::sqrt(7)-1.0)));
409  e2 = (data[1]-static_cast<RealT>(0.25*(std::sqrt(7)+1.0)));
410  *outStream << " x1 = " << data[0] << " x2 = " << data[1] << std::endl;
411  err = std::max(std::abs(e1),std::abs(e2));
412  *outStream << " Max-Error = " << err << std::endl;
413  errorFlag += (err > tol ? 1 : 0);
414 
415  *outStream << std::endl << "Hock and Schittkowski Problem #42" << std::endl << std::endl;
416  list.sublist("Step").set("Type","Composite Step");
418  obj = HS42.getObjective();
419  sol = HS42.getInitialGuess();
420  con = ROL::staticPtrCast<ROL::Constraint_Partitioned<RealT>>(HS42.getEqualityConstraint())->get(0);
421  mul = ROL::staticPtrCast<ROL::PartitionedVector<RealT>>(HS42.getEqualityMultiplier())->get(0);
422  icon = ROL::staticPtrCast<ROL::Constraint_Partitioned<RealT>>(HS42.getEqualityConstraint())->get(1);
423  imul = ROL::staticPtrCast<ROL::PartitionedVector<RealT>>(HS42.getEqualityMultiplier())->get(1);
424 
425  elc = ROL::makePtr<ROL::ExplicitLinearConstraint<RealT>>(con,obj,icon,sol,mul);
426  tobj = elc->getTransformedObjective();
427  tcon = elc->getTransformedConstraint();
428  s = sol->clone(); s->randomize();
429  ds = sol->clone(); ds->randomize();
430  c = imul->clone(); c->randomize();
431 
432  obj->checkGradient(*s,*ds,true,*outStream);
433  obj->checkHessVec(*s,*ds,true,*outStream);
434  tobj->checkGradient(*s,*ds,true,*outStream);
435  tobj->checkHessVec(*s,*ds,true,*outStream);
436  tcon->checkApplyJacobian(*s,*ds,*c,true,*outStream);
437  tcon->checkApplyAdjointJacobian(*s,*c,*c,*ds,true,*outStream);
438  tcon->checkApplyAdjointHessian(*s,*c,*ds,*s,true,*outStream);
439 
440  s->zero();
441  problem = ROL::makePtr<ROL::OptimizationProblem<RealT>>(tobj,s,tcon,imul);
442  solver = ROL::makePtr<ROL::OptimizationSolver<RealT>>(*problem,list);
443  solver->solve(*outStream);
444 
445  Ps = s->clone();
446  elc->project(Ps,s);
447  Ps->plus(*elc->getFeasibleVector());
448 
449  data = *ROL::staticPtrCast<ROL::StdVector<RealT>>(Ps)->getVector();
450  e1 = (data[0]-static_cast<RealT>(2.0));
451  e2 = (data[1]-static_cast<RealT>(2.0));
452  e3 = (data[2]-static_cast<RealT>(0.6*std::sqrt(2.0)));
453  e4 = (data[3]-static_cast<RealT>(0.8*std::sqrt(2.0)));
454  *outStream << " x1 = " << data[0] << " x2 = " << data[1]
455  << " x3 = " << data[2] << " x4 = " << data[3] << std::endl;
456  err = std::max(std::max(std::max(std::abs(e1),std::abs(e2)),std::abs(e3)),std::abs(e4));
457  *outStream << " Max-Error = " << err << std::endl;
458  errorFlag += (err > tol ? 1 : 0);
459  }
460 
461  catch (std::logic_error& err) {
462  *outStream << err.what() << "\n";
463  errorFlag = -1000;
464  }; // end try
465 
466  if (errorFlag != 0)
467  std::cout << "End Result: TEST FAILED\n";
468  else
469  std::cout << "End Result: TEST PASSED\n";
470 
471  return 0;
472 }
473 
Contains definitions for W. Hock and K. Schittkowski 14th test function.
Contains definitions for W. Hock and K. Schittkowski 28th test function.
Contains definitions for W. Hock and K. Schittkowski 42th test function.
Contains definitions for W. Hock and K. Schittkowski 48th test function.
Contains definitions for W. Hock and K. Schittkowski 49th test function.
Contains definitions for W. Hock and K. Schittkowski 50th test function.
Contains definitions for W. Hock and K. Schittkowski 51th test function.
Contains definitions for W. Hock and K. Schittkowski 52nd test function.
Contains definitions for W. Hock and K. Schittkowski 9th test function.
Defines a no-output stream class ROL::NullStream and a function makeStreamPtr which either wraps a re...
Ptr< Objective< Real > > getObjective(void) const
Definition: ROL_HS14.hpp:159
Ptr< Constraint< Real > > getInequalityConstraint(void) const
Definition: ROL_HS14.hpp:184
Ptr< Vector< Real > > getEqualityMultiplier(void) const
Definition: ROL_HS14.hpp:180
Ptr< Vector< Real > > getInequalityMultiplier(void) const
Definition: ROL_HS14.hpp:188
Ptr< BoundConstraint< Real > > getSlackBoundConstraint(void) const
Definition: ROL_HS14.hpp:192
Ptr< Vector< Real > > getInitialGuess(void) const
Definition: ROL_HS14.hpp:163
Ptr< Constraint< Real > > getEqualityConstraint(void) const
Definition: ROL_HS14.hpp:176
Ptr< Vector< Real > > getInitialGuess(void) const
Definition: ROL_HS28.hpp:133
Ptr< Constraint< Real > > getEqualityConstraint(void) const
Definition: ROL_HS28.hpp:151
Ptr< Vector< Real > > getEqualityMultiplier(void) const
Definition: ROL_HS28.hpp:155
Ptr< Objective< Real > > getObjective(void) const
Definition: ROL_HS28.hpp:129
Ptr< Objective< Real > > getObjective(void) const
Definition: ROL_HS42.hpp:168
Ptr< Vector< Real > > getEqualityMultiplier(void) const
Definition: ROL_HS42.hpp:194
Ptr< Constraint< Real > > getEqualityConstraint(void) const
Definition: ROL_HS42.hpp:187
Ptr< Vector< Real > > getInitialGuess(void) const
Definition: ROL_HS42.hpp:172
Ptr< Constraint< Real > > getEqualityConstraint(void) const
Definition: ROL_HS48.hpp:157
Ptr< Vector< Real > > getInitialGuess(void) const
Definition: ROL_HS48.hpp:141
Ptr< Objective< Real > > getObjective(void) const
Definition: ROL_HS48.hpp:137
Ptr< Vector< Real > > getEqualityMultiplier(void) const
Definition: ROL_HS48.hpp:161
Ptr< Constraint< Real > > getEqualityConstraint(void) const
Definition: ROL_HS49.hpp:158
Ptr< Vector< Real > > getInitialGuess(void) const
Definition: ROL_HS49.hpp:142
Ptr< Vector< Real > > getEqualityMultiplier(void) const
Definition: ROL_HS49.hpp:162
Ptr< Objective< Real > > getObjective(void) const
Definition: ROL_HS49.hpp:138
Ptr< Vector< Real > > getEqualityMultiplier(void) const
Definition: ROL_HS50.hpp:164
Ptr< Objective< Real > > getObjective(void) const
Definition: ROL_HS50.hpp:140
Ptr< Constraint< Real > > getEqualityConstraint(void) const
Definition: ROL_HS50.hpp:160
Ptr< Vector< Real > > getInitialGuess(void) const
Definition: ROL_HS50.hpp:144
Ptr< Objective< Real > > getObjective(void) const
Definition: ROL_HS51.hpp:140
Ptr< Vector< Real > > getEqualityMultiplier(void) const
Definition: ROL_HS51.hpp:164
Ptr< Constraint< Real > > getEqualityConstraint(void) const
Definition: ROL_HS51.hpp:160
Ptr< Vector< Real > > getInitialGuess(void) const
Definition: ROL_HS51.hpp:144
Ptr< Constraint< Real > > getEqualityConstraint(void) const
Definition: ROL_HS52.hpp:160
Ptr< Objective< Real > > getObjective(void) const
Definition: ROL_HS52.hpp:140
Ptr< Vector< Real > > getInitialGuess(void) const
Definition: ROL_HS52.hpp:144
Ptr< Vector< Real > > getEqualityMultiplier(void) const
Definition: ROL_HS52.hpp:164
Ptr< Vector< Real > > getInitialGuess(void) const
Definition: ROL_HS9.hpp:134
Ptr< Objective< Real > > getObjective(void) const
Definition: ROL_HS9.hpp:129
Ptr< Constraint< Real > > getEqualityConstraint(void) const
Definition: ROL_HS9.hpp:150
Ptr< Vector< Real > > getEqualityMultiplier(void) const
Definition: ROL_HS9.hpp:154
int main(int argc, char *argv[])
double RealT
basic_nullstream< char, char_traits< char > > nullstream
Definition: ROL_Stream.hpp:72