Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MittelmannDistCntrlNeumB.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, 2006 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: MittelmannDistCntrlNeumB.hpp 2005 2011-06-06 12:55:16Z stefan $
6 //
7 // Authors: Andreas Waechter IBM 2005-10-18
8 // based on MyNLP.hpp
9
10 #ifndef __MITTELMANNDISTRCNTRLNEUMB_HPP__
11 #define __MITTELMANNDISTRCNTRLNEUMB_HPP__
12
13 #include "IpTNLP.hpp"
14 #include "RegisteredTNLP.hpp"
15
16 #ifdef HAVE_CONFIG_H
17 #include "config.h"
18 #else
19 #include "configall_system.h"
20 #endif
21
22 #ifdef HAVE_CMATH
23 # include <cmath>
24 #else
25 # ifdef HAVE_MATH_H
26 # include <math.h>
27 # else
28 # error "don't have header file for math"
29 # endif
30 #endif
31
32 #ifdef HAVE_CSTDIO
33 # include <cstdio>
34 #else
35 # ifdef HAVE_STDIO_H
36 # include <stdio.h>
37 # else
38 # error "don't have header file for stdio"
39 # endif
40 #endif
41
42 using namespace Ipopt;
43
50 class MittelmannDistCntrlNeumBBase : public RegisteredTNLP
51 {
52 public:
55 MittelmannDistCntrlNeumBBase();
56
58 virtual ~MittelmannDistCntrlNeumBBase();
59
63 virtual bool get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
64 Index& nnz_h_lag, IndexStyleEnum& index_style);
65
67 virtual bool get_bounds_info(Index n, Number* x_l, Number* x_u,
68 Index m, Number* g_l, Number* g_u);
69
71 virtual bool get_starting_point(Index n, bool init_x, Number* x,
72 bool init_z, Number* z_L, Number* z_U,
73 Index m, bool init_lambda,
74 Number* lambda);
75
77 virtual bool eval_f(Index n, const Number* x, bool new_x, Number& obj_value);
78
80 virtual bool eval_grad_f(Index n, const Number* x, bool new_x, Number* grad_f);
81
83 virtual bool eval_g(Index n, const Number* x, bool new_x, Index m, Number* g);
84
89 virtual bool eval_jac_g(Index n, const Number* x, bool new_x,
90 Index m, Index nele_jac, Index* iRow, Index *jCol,
91 Number* values);
92
97 virtual bool eval_h(Index n, const Number* x, bool new_x,
98 Number obj_factor, Index m, const Number* lambda,
99 bool new_lambda, Index nele_hess, Index* iRow,
100 Index* jCol, Number* values);
101
103
105 virtual bool get_scaling_parameters(Number& obj_scaling,
106 bool& use_x_scaling, Index n,
107 Number* x_scaling,
108 bool& use_g_scaling, Index m,
109 Number* g_scaling);
110
115 virtual void finalize_solution(SolverReturn status,
116 Index n, const Number* x, const Number* z_L, const Number* z_U,
117 Index m, const Number* g, const Number* lambda,
118 Number obj_value,
119 const IpoptData* ip_data,
120 IpoptCalculatedQuantities* ip_cq);
122
123 protected:
127 void SetBaseParameters(Index N, Number lb_y,
128 Number ub_y, Number lb_u, Number ub_u,
129 Number b_0j, Number b_1j, Number b_i0, Number b_i1,
130 Number u_init);
131
135 virtual Number y_d_cont(Number x1, Number x2) const =0;
137 virtual Number fint_cont(Number x1, Number x2, Number y, Number u) const =0;
139 virtual Number fint_cont_dy(Number x1, Number x2, Number y, Number u) const =0;
141 virtual Number fint_cont_du(Number x1, Number x2, Number y, Number u) const =0;
143 virtual Number fint_cont_dydy(Number x1, Number x2, Number y, Number u) const =0;
146 virtual bool fint_cont_dydy_alwayszero() const =0;
148 virtual Number fint_cont_dudu(Number x1, Number x2, Number y, Number u) const =0;
151 virtual bool fint_cont_dudu_alwayszero() const =0;
153 virtual Number fint_cont_dydu(Number x1, Number x2, Number y, Number u) const =0;
156 virtual bool fint_cont_dydu_alwayszero() const =0;
158 virtual Number d_cont(Number x1, Number x2, Number y, Number u) const =0;
160 virtual Number d_cont_dy(Number x1, Number x2, Number y, Number u) const =0;
162 virtual Number d_cont_du(Number x1, Number x2, Number y, Number u) const =0;
164 virtual Number d_cont_dydy(Number x1, Number x2, Number y, Number u) const =0;
167 virtual bool d_cont_dydy_alwayszero() const =0;
169 virtual Number d_cont_dudu(Number x1, Number x2, Number y, Number u) const =0;
172 virtual bool d_cont_dudu_alwayszero() const =0;
174 virtual Number d_cont_dydu(Number x1, Number x2, Number y, Number u) const =0;
177 virtual bool d_cont_dydu_alwayszero() const =0;
179
180 private:
192 MittelmannDistCntrlNeumBBase(const MittelmannDistCntrlNeumBBase&);
193 MittelmannDistCntrlNeumBBase& operator=(const MittelmannDistCntrlNeumBBase&);
195
199 Index N_;
201 Number h_;
203 Number hh_;
205 Number lb_y_;
207 Number ub_y_;
209 Number lb_u_;
211 Number ub_u_;
214 Number b_0j_;
217 Number b_1j_;
220 Number b_i0_;
223 Number b_i1_;
225 Number u_init_;
227 Number* y_d_;
229
234 inline Index y_index(Index i, Index j) const
235 {
236 return j + (N_+2)*i;
237 }
240 inline Index u_index(Index i, Index j) const
241 {
242 return (N_+2)*(N_+2) + (j-1) + (N_)*(i-1);
243 }
246 inline Index pde_index(Index i, Index j) const
247 {
248 return (j-1) + N_*(i-1);
249 }
251 inline Number x1_grid(Index i) const
252 {
253 return h_*(Number)i;
254 }
256 inline Number x2_grid(Index i) const
257 {
258 return h_*(Number)i;
259 }
261 };
262
264 class MittelmannDistCntrlNeumB1 : public MittelmannDistCntrlNeumBBase
265 {
266 public:
267 MittelmannDistCntrlNeumB1()
268 :
269 pi_(4.*atan(1.)),
270 alpha_(0.001)
271 {}
272
273 virtual ~MittelmannDistCntrlNeumB1()
274 {}
275
276 virtual bool InitializeProblem(Index N)
277 {
278 if (N<1) {
279 printf("N has to be at least 1.");
280 return false;
281 }
282 Number lb_y = -1e20;
283 Number ub_y = 0.371;
284 Number lb_u = -8.;
285 Number ub_u = 9.;
286 Number b_0j = 1.;
287 Number b_1j = 1.;
288 Number b_i0 = 1.;
289 Number b_i1 = 1.;
290 Number u_init = (ub_u + lb_u)/2.;
291
292 SetBaseParameters(N, lb_y, ub_y, lb_u, ub_u, b_0j, b_1j, b_i0, b_i1, u_init);
293 return true;
294 }
295 protected:
297 virtual Number y_d_cont(Number x1, Number x2) const
298 {
299 return sin(2.*pi_*x1)*sin(2.*pi_*x2);
300 }
302 virtual Number fint_cont(Number x1, Number x2, Number y, Number u) const
303 {
304 Number diff_y = y-y_d_cont(x1,x2);
305 return 0.5*(diff_y*diff_y + alpha_*u*u);
306 }
308 virtual Number fint_cont_dy(Number x1, Number x2, Number y, Number u) const
309 {
310 return y-y_d_cont(x1,x2);
311 }
312
314 virtual Number fint_cont_du(Number x1, Number x2, Number y, Number u) const
315 {
316 return alpha_*u;
317 }
319 virtual Number fint_cont_dydy(Number x1, Number x2, Number y, Number u) const
320 {
321 return 1.;
322 }
325 virtual bool fint_cont_dydy_alwayszero() const
326 {
327 return false;
328 }
330 virtual Number fint_cont_dudu(Number x1, Number x2, Number y, Number u) const
331 {
332 return alpha_;
333 }
336 virtual bool fint_cont_dudu_alwayszero() const
337 {
338 return false;
339 }
341 virtual Number fint_cont_dydu(Number x1, Number x2, Number y, Number u) const
342 {
343 return 0.;
344 }
347 virtual bool fint_cont_dydu_alwayszero() const
348 {
349 return true;
350 }
352 virtual Number d_cont(Number x1, Number x2, Number y, Number u) const
353 {
354 return -exp(y) - u;
355 }
357 virtual Number d_cont_dy(Number x1, Number x2, Number y, Number u) const
358 {
359 return -exp(y);
360 }
362 virtual Number d_cont_du(Number x1, Number x2, Number y, Number u) const
363 {
364 return -1.;
365 }
367 virtual Number d_cont_dydy(Number x1, Number x2, Number y, Number u) const
368 {
369 return -exp(y);
370 }
373 virtual bool d_cont_dydy_alwayszero() const
374 {
375 return false;
376 }
378 virtual Number d_cont_dudu(Number x1, Number x2, Number y, Number u) const
379 {
380 return 0.;
381 }
384 virtual bool d_cont_dudu_alwayszero() const
385 {
386 return true;
387 }
389 virtual Number d_cont_dydu(Number x1, Number x2, Number y, Number u) const
390 {
391 return 0.;
392 }
395 virtual bool d_cont_dydu_alwayszero() const
396 {
397 return true;
398 }
399 private:
402 MittelmannDistCntrlNeumB1(const MittelmannDistCntrlNeumB1&);
403 MittelmannDistCntrlNeumB1& operator=(const MittelmannDistCntrlNeumB1&);
405
406 const Number pi_;
408 const Number alpha_;
409 };
410
412 class MittelmannDistCntrlNeumB2 : public MittelmannDistCntrlNeumBBase
413 {
414 public:
415 MittelmannDistCntrlNeumB2()
416 :
417 pi_(4.*atan(1.))
418 {}
419
420 virtual ~MittelmannDistCntrlNeumB2()
421 {}
422
423 virtual bool InitializeProblem(Index N)
424 {
425 if (N<1) {
426 printf("N has to be at least 1.");
427 return false;
428 }
429 Number lb_y = -1e20;
430 Number ub_y = 0.371;
431 Number lb_u = -8.;
432 Number ub_u = 9.;
433 Number b_0j = 1.;
434 Number b_1j = 1.;
435 Number b_i0 = 1.;
436 Number b_i1 = 1.;
437 Number u_init = (ub_u + lb_u)/2.;
438
439 SetBaseParameters(N, lb_y, ub_y, lb_u, ub_u, b_0j, b_1j, b_i0, b_i1, u_init);
440 return true;
441 }
442 protected:
444 virtual Number y_d_cont(Number x1, Number x2) const
445 {
446 return sin(2.*pi_*x1)*sin(2.*pi_*x2);
447 }
449 virtual Number fint_cont(Number x1, Number x2, Number y, Number u) const
450 {
451 Number diff_y = y-y_d_cont(x1,x2);
452 return 0.5*diff_y*diff_y;
453 }
455 virtual Number fint_cont_dy(Number x1, Number x2, Number y, Number u) const
456 {
457 return y-y_d_cont(x1,x2);
458 }
459
461 virtual Number fint_cont_du(Number x1, Number x2, Number y, Number u) const
462 {
463 return 0.;
464 }
466 virtual Number fint_cont_dydy(Number x1, Number x2, Number y, Number u) const
467 {
468 return 1.;
469 }
472 virtual bool fint_cont_dydy_alwayszero() const
473 {
474 return false;
475 }
477 virtual Number fint_cont_dudu(Number x1, Number x2, Number y, Number u) const
478 {
479 return 0.;
480 }
483 virtual bool fint_cont_dudu_alwayszero() const
484 {
485 return true;
486 }
488 virtual Number fint_cont_dydu(Number x1, Number x2, Number y, Number u) const
489 {
490 return 0.;
491 }
494 virtual bool fint_cont_dydu_alwayszero() const
495 {
496 return true;
497 }
499 virtual Number d_cont(Number x1, Number x2, Number y, Number u) const
500 {
501 return -exp(y) - u;
502 }
504 virtual Number d_cont_dy(Number x1, Number x2, Number y, Number u) const
505 {
506 return -exp(y);
507 }
509 virtual Number d_cont_du(Number x1, Number x2, Number y, Number u) const
510 {
511 return -1.;
512 }
514 virtual Number d_cont_dydy(Number x1, Number x2, Number y, Number u) const
515 {
516 return -exp(y);
517 }
520 virtual bool d_cont_dydy_alwayszero() const
521 {
522 return false;
523 }
525 virtual Number d_cont_dudu(Number x1, Number x2, Number y, Number u) const
526 {
527 return 0.;
528 }
531 virtual bool d_cont_dudu_alwayszero() const
532 {
533 return true;
534 }
536 virtual Number d_cont_dydu(Number x1, Number x2, Number y, Number u) const
537 {
538 return 0.;
539 }
542 virtual bool d_cont_dydu_alwayszero() const
543 {
544 return true;
545 }
546 private:
549 MittelmannDistCntrlNeumB2(const MittelmannDistCntrlNeumB2&);
550 MittelmannDistCntrlNeumB2& operator=(const MittelmannDistCntrlNeumB2&);
552
553 const Number pi_;
554 };
555
557 class MittelmannDistCntrlNeumB3 : public MittelmannDistCntrlNeumBBase
558 {
559 public:
560 MittelmannDistCntrlNeumB3()
561 :
562 pi_(4.*atan(1.)),
563 M_(1.),
564 K_(0.8),
565 b_(1.)
566 {}
567
568 virtual ~MittelmannDistCntrlNeumB3()
569 {}
570
571 virtual bool InitializeProblem(Index N)
572 {
573 if (N<1) {
574 printf("N has to be at least 1.");
575 return false;
576 }
577 Number lb_y = 3.;//-1e20;
578 Number ub_y = 6.09;
579 Number lb_u = 1.4;
580 Number ub_u = 1.6;
581 Number b_0j = 1.;
582 Number b_1j = 0.;
583 Number b_i0 = 1.;
584 Number b_i1 = 0.;
585 Number u_init = (ub_u + lb_u)/2.;
586
587 SetBaseParameters(N, lb_y, ub_y, lb_u, ub_u, b_0j, b_1j, b_i0, b_i1, u_init);
588 return true;
589 }
590 protected:
592 virtual Number y_d_cont(Number x1, Number x2) const
593 {
594 return 6.;
595 }
597 virtual Number fint_cont(Number x1, Number x2, Number y, Number u) const
598 {
599 return u*(M_*u - K_*y);
600 }
602 virtual Number fint_cont_dy(Number x1, Number x2, Number y, Number u) const
603 {
604 return -K_*u;
605 }
606
608 virtual Number fint_cont_du(Number x1, Number x2, Number y, Number u) const
609 {
610 return 2.*M_*u - K_*y;
611 }
613 virtual Number fint_cont_dydy(Number x1, Number x2, Number y, Number u) const
614 {
615 return 0.;
616 }
619 virtual bool fint_cont_dydy_alwayszero() const
620 {
621 return true;
622 }
624 virtual Number fint_cont_dudu(Number x1, Number x2, Number y, Number u) const
625 {
626 return 2.*M_;
627 }
630 virtual bool fint_cont_dudu_alwayszero() const
631 {
632 return false;
633 }
635 virtual Number fint_cont_dydu(Number x1, Number x2, Number y, Number u) const
636 {
637 return -K_;
638 }
641 virtual bool fint_cont_dydu_alwayszero() const
642 {
643 return false;
644 }
646 virtual Number d_cont(Number x1, Number x2, Number y, Number u) const
647 {
648 return y*(u + b_*y - a(x1,x2));
649 }
651 virtual Number d_cont_dy(Number x1, Number x2, Number y, Number u) const
652 {
653 return (u + 2.*b_*y -a(x1,x2));
654 }
656 virtual Number d_cont_du(Number x1, Number x2, Number y, Number u) const
657 {
658 return y;
659 }
661 virtual Number d_cont_dydy(Number x1, Number x2, Number y, Number u) const
662 {
663 return 2.*b_;
664 }
667 virtual bool d_cont_dydy_alwayszero() const
668 {
669 return false;
670 }
672 virtual Number d_cont_dudu(Number x1, Number x2, Number y, Number u) const
673 {
674 return 0.;
675 }
678 virtual bool d_cont_dudu_alwayszero() const
679 {
680 return true;
681 }
683 virtual Number d_cont_dydu(Number x1, Number x2, Number y, Number u) const
684 {
685 return 1.;
686 }
689 virtual bool d_cont_dydu_alwayszero() const
690 {
691 return false;
692 }
693 private:
696 MittelmannDistCntrlNeumB3(const MittelmannDistCntrlNeumB3&);
697 MittelmannDistCntrlNeumB3& operator=(const MittelmannDistCntrlNeumB3&);
699
700 const Number pi_;
701 /*@name constrants appearing in problem formulation */
703 const Number M_;
704 const Number K_;
705 const Number b_;
707 //* Auxiliary function for state equation */
708 inline Number a(Number x1, Number x2) const
709 {
710 return 7. + 4.*sin(2.*pi_*x1*x2);
711 }
712 };
713
714 #endif
MittelmannDistCntrlNeumB2::InitializeProblem
virtual bool InitializeProblem(Index N)
Initialize internal parameters, where N is a parameter determining the problme size.
Definition: MittelmannDistCntrlNeumB.hpp:423
MittelmannDistCntrlNeumB1::pi_
const Number pi_
Value of pi (made available for convenience)
Definition: MittelmannDistCntrlNeumB.hpp:406
MittelmannDistCntrlNeumB3::d_cont_dydu_alwayszero
virtual bool d_cont_dydu_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:689
x
Number * x
Input: Starting point Output: Optimal solution.
Definition: IpStdCInterface.h:238
MittelmannDistCntrlNeumB3::d_cont_dydy_alwayszero
virtual bool d_cont_dydy_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:667
Ipopt::IpoptCalculatedQuantities
Class for all IPOPT specific calculated quantities.
Definition: IpIpoptCalculatedQuantities.hpp:81
index_style
Number Number Index Number Number Index Index Index index_style
indexing style for iRow &amp; jCol, 0 for C style, 1 for Fortran style
Definition: IpStdCInterface.h:137
MittelmannDistCntrlNeumBBase::b_1j_
Number b_1j_
Value of beta function (in Neumann boundary condition) for (1,x2) bounray.
Definition: MittelmannDistCntrlNeumB.hpp:217
MittelmannDistCntrlNeumB1::d_cont_dydu
virtual Number d_cont_dydu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:389
MittelmannDistCntrlNeumB3::d_cont
virtual Number d_cont(Number x1, Number x2, Number y, Number u) const
Forcing function for the elliptic equation.
Definition: MittelmannDistCntrlNeumB.hpp:646
m
Number Number Index m
Number of constraints.
Definition: IpStdCInterface.h:137
MittelmannDistCntrlNeumBBase::hh_
Number hh_
h_ squaredd
Definition: MittelmannDistCntrlNeumB.hpp:203
MittelmannDistCntrlNeumBBase
Base class for distributed control problems with homogeneous Neumann boundary conditions, as formulated by Hans Mittelmann as Examples 4-6 in "Optimization Techniques for Solving Elliptic Control Problems with Control and State Constraints.
Definition: MittelmannDistCntrlNeumB.hpp:50
MittelmannDistCntrlNeumB1::MittelmannDistCntrlNeumB1
MittelmannDistCntrlNeumB1()
Definition: MittelmannDistCntrlNeumB.hpp:267
MittelmannDistCntrlNeumB1::d_cont_dudu_alwayszero
virtual bool d_cont_dudu_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:384
MittelmannDistCntrlNeumB2::d_cont_dydu
virtual Number d_cont_dydu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:536
MittelmannDistCntrlNeumB3::fint_cont_dy
virtual Number fint_cont_dy(Number x1, Number x2, Number y, Number u) const
First partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:602
g
Number Number * g
Values of constraint at final point (output only - ignored if set to NULL)
Definition: IpStdCInterface.h:238
eval_h
Number Number Index Number Number Index Index Index Eval_F_CB Eval_G_CB Eval_Grad_F_CB Eval_Jac_G_CB Eval_H_CB eval_h
Callback function for evaluating Hessian of Lagrangian function.
Definition: IpStdCInterface.h:137
MittelmannDistCntrlNeumB1::d_cont_dydy_alwayszero
virtual bool d_cont_dydy_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:373
MittelmannDistCntrlNeumB1::d_cont_dudu
virtual Number d_cont_dudu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:378
MittelmannDistCntrlNeumB3::a
Number a(Number x1, Number x2) const
Definition: MittelmannDistCntrlNeumB.hpp:708
MittelmannDistCntrlNeumB2::d_cont
virtual Number d_cont(Number x1, Number x2, Number y, Number u) const
Forcing function for the elliptic equation.
Definition: MittelmannDistCntrlNeumB.hpp:499
MittelmannDistCntrlNeumB2::fint_cont
virtual Number fint_cont(Number x1, Number x2, Number y, Number u) const
Integrant in objective function.
Definition: MittelmannDistCntrlNeumB.hpp:449
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
MittelmannDistCntrlNeumB1::InitializeProblem
virtual bool InitializeProblem(Index N)
Initialize internal parameters, where N is a parameter determining the problme size.
Definition: MittelmannDistCntrlNeumB.hpp:276
MittelmannDistCntrlNeumB3::b_
const Number b_
Definition: MittelmannDistCntrlNeumB.hpp:705
MittelmannDistCntrlNeumBBase::ub_u_
Number ub_u_
overall upper bound on u
Definition: MittelmannDistCntrlNeumB.hpp:211
eval_grad_f
Number Number Index Number Number Index Index Index Eval_F_CB Eval_G_CB Eval_Grad_F_CB eval_grad_f
Callback function for evaluating gradient of objective function.
Definition: IpStdCInterface.h:137
MittelmannDistCntrlNeumB1::fint_cont_du
virtual Number fint_cont_du(Number x1, Number x2, Number y, Number u) const
First partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:314
MittelmannDistCntrlNeumB2::fint_cont_dydy
virtual Number fint_cont_dydy(Number x1, Number x2, Number y, Number u) const
Second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:466
MittelmannDistCntrlNeumB3::d_cont_dudu
virtual Number d_cont_dudu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:672
MittelmannDistCntrlNeumBBase::x2_grid
Number x2_grid(Index i) const
Compute the grid coordinate for given index in x2 direction.
Definition: MittelmannDistCntrlNeumB.hpp:256
MittelmannDistCntrlNeumB3::fint_cont_du
virtual Number fint_cont_du(Number x1, Number x2, Number y, Number u) const
First partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:608
MittelmannDistCntrlNeumB3::fint_cont_dydy_alwayszero
virtual bool fint_cont_dydy_alwayszero() const
returns true if second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:619
MittelmannDistCntrlNeumB2::d_cont_dydy
virtual Number d_cont_dydy(Number x1, Number x2, Number y, Number u) const
Second partial derivative of forcing function w.r.t y,y.
Definition: MittelmannDistCntrlNeumB.hpp:514
MittelmannDistCntrlNeumB1::fint_cont
virtual Number fint_cont(Number x1, Number x2, Number y, Number u) const
Integrant in objective function.
Definition: MittelmannDistCntrlNeumB.hpp:302
MittelmannDistCntrlNeumB2::fint_cont_dudu_alwayszero
virtual bool fint_cont_dudu_alwayszero() const
returns true if second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:483
MittelmannDistCntrlNeumB3::MittelmannDistCntrlNeumB3
MittelmannDistCntrlNeumB3()
Definition: MittelmannDistCntrlNeumB.hpp:560
MittelmannDistCntrlNeumB1::fint_cont_dydy_alwayszero
virtual bool fint_cont_dydy_alwayszero() const
returns true if second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:325
MittelmannDistCntrlNeumB2::fint_cont_dydu
virtual Number fint_cont_dydu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:488
MittelmannDistCntrlNeumB3::InitializeProblem
virtual bool InitializeProblem(Index N)
Initialize internal parameters, where N is a parameter determining the problme size.
Definition: MittelmannDistCntrlNeumB.hpp:571
eval_jac_g
Number Number Index Number Number Index Index Index Eval_F_CB Eval_G_CB Eval_Grad_F_CB Eval_Jac_G_CB eval_jac_g
Callback function for evaluating Jacobian of constraint functions.
Definition: IpStdCInterface.h:137
MittelmannDistCntrlNeumB3::fint_cont_dudu_alwayszero
virtual bool fint_cont_dudu_alwayszero() const
returns true if second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:630
MittelmannDistCntrlNeumB3::d_cont_du
virtual Number d_cont_du(Number x1, Number x2, Number y, Number u) const
First partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:656
Ipopt::SolverReturn
SolverReturn
enum for the return from the optimize algorithm (obviously we need to add more)
Definition: IpAlgTypes.hpp:22
MittelmannDistCntrlNeumBBase::b_i1_
Number b_i1_
Value of beta function (in Neumann boundary condition) for (x1,1) bounray.
Definition: MittelmannDistCntrlNeumB.hpp:223
MittelmannDistCntrlNeumB2::d_cont_dydy_alwayszero
virtual bool d_cont_dydy_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:520
MittelmannDistCntrlNeumBBase::ub_y_
Number ub_y_
overall upper bound on y
Definition: MittelmannDistCntrlNeumB.hpp:207
MittelmannDistCntrlNeumB3::d_cont_dydy
virtual Number d_cont_dydy(Number x1, Number x2, Number y, Number u) const
Second partial derivative of forcing function w.r.t y,y.
Definition: MittelmannDistCntrlNeumB.hpp:661
MittelmannDistCntrlNeumB3::fint_cont_dydu_alwayszero
virtual bool fint_cont_dydu_alwayszero() const
returns true if second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:641
MittelmannDistCntrlNeumB2::fint_cont_dudu
virtual Number fint_cont_dudu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:477
RegisteredTNLP.hpp
MittelmannDistCntrlNeumB3::K_
const Number K_
Definition: MittelmannDistCntrlNeumB.hpp:704
nele_jac
Number Number Index Number Number Index nele_jac
Number of non-zero elements in constraint Jacobian.
Definition: IpStdCInterface.h:137
MittelmannDistCntrlNeumBBase::u_init_
Number u_init_
Initial value for the constrols u.
Definition: MittelmannDistCntrlNeumB.hpp:225
MittelmannDistCntrlNeumB3::d_cont_dy
virtual Number d_cont_dy(Number x1, Number x2, Number y, Number u) const
First partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:651
MittelmannDistCntrlNeumB3::~MittelmannDistCntrlNeumB3
virtual ~MittelmannDistCntrlNeumB3()
Definition: MittelmannDistCntrlNeumB.hpp:568
MittelmannDistCntrlNeumB1::~MittelmannDistCntrlNeumB1
virtual ~MittelmannDistCntrlNeumB1()
Definition: MittelmannDistCntrlNeumB.hpp:273
MittelmannDistCntrlNeumB2::MittelmannDistCntrlNeumB2
MittelmannDistCntrlNeumB2()
Definition: MittelmannDistCntrlNeumB.hpp:415
MittelmannDistCntrlNeumB2::d_cont_dy
virtual Number d_cont_dy(Number x1, Number x2, Number y, Number u) const
First partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:504
MittelmannDistCntrlNeumB2::fint_cont_dy
virtual Number fint_cont_dy(Number x1, Number x2, Number y, Number u) const
First partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:455
MittelmannDistCntrlNeumB1::y_d_cont
virtual Number y_d_cont(Number x1, Number x2) const
Target profile function for y.
Definition: MittelmannDistCntrlNeumB.hpp:297
MittelmannDistCntrlNeumB1::fint_cont_dydy
virtual Number fint_cont_dydy(Number x1, Number x2, Number y, Number u) const
Second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:319
MittelmannDistCntrlNeumB2::fint_cont_dydu_alwayszero
virtual bool fint_cont_dydu_alwayszero() const
returns true if second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:494
MittelmannDistCntrlNeumB3
Class implementating Example 6.
Definition: MittelmannDistCntrlNeumB.hpp:557
MittelmannDistCntrlNeumB1::d_cont_dydy
virtual Number d_cont_dydy(Number x1, Number x2, Number y, Number u) const
Second partial derivative of forcing function w.r.t y,y.
Definition: MittelmannDistCntrlNeumB.hpp:367
Ipopt::IpoptData
Class to organize all the data required by the algorithm.
Definition: IpIpoptData.hpp:83
MittelmannDistCntrlNeumBBase::lb_y_
Number lb_y_
overall lower bound on y
Definition: MittelmannDistCntrlNeumB.hpp:205
MittelmannDistCntrlNeumB2::fint_cont_du
virtual Number fint_cont_du(Number x1, Number x2, Number y, Number u) const
First partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:461
MittelmannDistCntrlNeumB2::pi_
const Number pi_
Value of pi (made available for convenience)
Definition: MittelmannDistCntrlNeumB.hpp:553
eval_g
Number Number Index Number Number Index Index Index Eval_F_CB Eval_G_CB eval_g
Callback function for evaluating constraint functions.
Definition: IpStdCInterface.h:137
MittelmannDistCntrlNeumBBase::N_
Index N_
Number of mesh points in one dimension (excluding boundary)
Definition: MittelmannDistCntrlNeumB.hpp:199
MittelmannDistCntrlNeumB3::y_d_cont
virtual Number y_d_cont(Number x1, Number x2) const
Profile function for initial y.
Definition: MittelmannDistCntrlNeumB.hpp:592
MittelmannDistCntrlNeumB2::d_cont_dudu_alwayszero
virtual bool d_cont_dudu_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:531
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
MittelmannDistCntrlNeumBBase::h_
Number h_
Step size.
Definition: MittelmannDistCntrlNeumB.hpp:201
MittelmannDistCntrlNeumB3::fint_cont_dudu
virtual Number fint_cont_dudu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:624
MittelmannDistCntrlNeumB3::fint_cont
virtual Number fint_cont(Number x1, Number x2, Number y, Number u) const
Integrant in objective function.
Definition: MittelmannDistCntrlNeumB.hpp:597
MittelmannDistCntrlNeumB2::d_cont_dudu
virtual Number d_cont_dudu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:525
x_scaling
Number Number * x_scaling
Definition: IpStdCInterface.h:210
MittelmannDistCntrlNeumB1::alpha_
const Number alpha_
Value for parameter alpha in objective functin.
Definition: MittelmannDistCntrlNeumB.hpp:408
MittelmannDistCntrlNeumB1::d_cont_dy
virtual Number d_cont_dy(Number x1, Number x2, Number y, Number u) const
First partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:357
MittelmannDistCntrlNeumB1::d_cont_du
virtual Number d_cont_du(Number x1, Number x2, Number y, Number u) const
First partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:362
IpTNLP.hpp
MittelmannDistCntrlNeumB2::d_cont_dydu_alwayszero
virtual bool d_cont_dydu_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:542
nele_hess
Number Number Index Number Number Index Index nele_hess
Number of non-zero elements in Hessian of Lagrangian.
Definition: IpStdCInterface.h:137
MittelmannDistCntrlNeumB3::d_cont_dydu
virtual Number d_cont_dydu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:683
MittelmannDistCntrlNeumBBase::y_d_
Number * y_d_
Array for the target profile for y.
Definition: MittelmannDistCntrlNeumB.hpp:227
RegisteredTNLP
Class implemented the NLP discretization of.
Definition: RegisteredTNLP.hpp:20
MittelmannDistCntrlNeumB1::fint_cont_dudu
virtual Number fint_cont_dudu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:330
MittelmannDistCntrlNeumB3::fint_cont_dydy
virtual Number fint_cont_dydy(Number x1, Number x2, Number y, Number u) const
Second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:613
MittelmannDistCntrlNeumB1::d_cont_dydu_alwayszero
virtual bool d_cont_dydu_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:395
MittelmannDistCntrlNeumB2::fint_cont_dydy_alwayszero
virtual bool fint_cont_dydy_alwayszero() const
returns true if second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:472
MittelmannDistCntrlNeumBBase::b_i0_
Number b_i0_
Value of beta function (in Neumann boundary condition) for (x1,0) bounray.
Definition: MittelmannDistCntrlNeumB.hpp:220
MittelmannDistCntrlNeumB1::fint_cont_dydu_alwayszero
virtual bool fint_cont_dydu_alwayszero() const
returns true if second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:347
MittelmannDistCntrlNeumB2
Class implementating Example 5.
Definition: MittelmannDistCntrlNeumB.hpp:412
MittelmannDistCntrlNeumBBase::x1_grid
Number x1_grid(Index i) const
Compute the grid coordinate for given index in x1 direction.
Definition: MittelmannDistCntrlNeumB.hpp:251
g_scaling
Number Number Number * g_scaling
Definition: IpStdCInterface.h:210
MittelmannDistCntrlNeumB3::M_
const Number M_
Definition: MittelmannDistCntrlNeumB.hpp:703
Ipopt::TNLP::IndexStyleEnum
IndexStyleEnum
overload this method to return the number of variables and constraints, and the number of non-zeros i...
Definition: IpTNLP.hpp:80
MittelmannDistCntrlNeumB3::fint_cont_dydu
virtual Number fint_cont_dydu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:635
MittelmannDistCntrlNeumB1::fint_cont_dy
virtual Number fint_cont_dy(Number x1, Number x2, Number y, Number u) const
First partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:308
MittelmannDistCntrlNeumB3::pi_
const Number pi_
Value of pi (made available for convenience)
Definition: MittelmannDistCntrlNeumB.hpp:700
MittelmannDistCntrlNeumB1::fint_cont_dudu_alwayszero
virtual bool fint_cont_dudu_alwayszero() const
returns true if second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:336
MittelmannDistCntrlNeumBBase::y_index
Index y_index(Index i, Index j) const
Translation of mesh point indices to NLP variable indices for y(x_ij)
Definition: MittelmannDistCntrlNeumB.hpp:234
MittelmannDistCntrlNeumB3::d_cont_dudu_alwayszero
virtual bool d_cont_dudu_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:678
MittelmannDistCntrlNeumB2::y_d_cont
virtual Number y_d_cont(Number x1, Number x2) const
Target profile function for y.
Definition: MittelmannDistCntrlNeumB.hpp:444
MittelmannDistCntrlNeumBBase::u_index
Index u_index(Index i, Index j) const
Translation of mesh point indices to NLP variable indices for u(x_ij)
Definition: MittelmannDistCntrlNeumB.hpp:240
obj_scaling
Number obj_scaling
Definition: IpStdCInterface.h:210
MittelmannDistCntrlNeumBBase::pde_index
Index pde_index(Index i, Index j) const
Translation of interior mesh point indices to the corresponding PDE constraint number.
Definition: MittelmannDistCntrlNeumB.hpp:246
MittelmannDistCntrlNeumBBase::b_0j_
Number b_0j_
Value of beta function (in Neumann boundary condition) for (0,x2) bounray.
Definition: MittelmannDistCntrlNeumB.hpp:214
eval_f
Number Number Index Number Number Index Index Index Eval_F_CB eval_f
Callback function for evaluating objective function.
Definition: IpStdCInterface.h:137
MittelmannDistCntrlNeumB2::d_cont_du
virtual Number d_cont_du(Number x1, Number x2, Number y, Number u) const
First partial derivative of forcing function w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:509
MittelmannDistCntrlNeumB2::~MittelmannDistCntrlNeumB2
virtual ~MittelmannDistCntrlNeumB2()
Definition: MittelmannDistCntrlNeumB.hpp:420
MittelmannDistCntrlNeumB1::d_cont
virtual Number d_cont(Number x1, Number x2, Number y, Number u) const
Forcing function for the elliptic equation.
Definition: MittelmannDistCntrlNeumB.hpp:352
MittelmannDistCntrlNeumB1
Class implementating Example 4.
Definition: MittelmannDistCntrlNeumB.hpp:264
MittelmannDistCntrlNeumBBase::lb_u_
Number lb_u_
overall lower bound on u
Definition: MittelmannDistCntrlNeumB.hpp:209
MittelmannDistCntrlNeumB1::fint_cont_dydu
virtual Number fint_cont_dydu(Number x1, Number x2, Number y, Number u) const
Second partial derivative of fint_cont w.r.t.
Definition: MittelmannDistCntrlNeumB.hpp:341