integrator_runge_kutta12.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ACADO Toolkit.
3  *
4  * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
5  * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
6  * Milan Vukov, Rien Quirynen, KU Leuven.
7  * Developed within the Optimization in Engineering Center (OPTEC)
8  * under supervision of Moritz Diehl. All rights reserved.
9  *
10  * ACADO Toolkit is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 3 of the License, or (at your option) any later version.
14  *
15  * ACADO Toolkit is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with ACADO Toolkit; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 
26 
27 
42 
43 
44 
46 
47 
48 //
49 // PUBLIC MEMBER FUNCTIONS:
50 //
51 
53  :IntegratorRK(2,1.0){
54 
55  if( A != 0 ) initializeButcherTableau();
56 }
57 
59  :IntegratorRK(rhs_,2,1.0){
60 
61  if( A != 0 ) initializeButcherTableau();
62 }
63 
65  :IntegratorRK(arg){ }
66 
68 
69 
71 
72  if( this != &arg ){
74  }
75  return *this;
76 }
77 
78 
80 
81  return new IntegratorRK12(*this);
82 }
83 
84 
85 
87 {
88  return IntegratorRK::init( rhs_ );
89 }
90 
91 
92 
94  )
95 {
96  return IntegratorRK::step( number );
97 }
98 
99 
101 
102  A[0][0] = 0.0;
103  A[0][1] = 0.0;
104 
105  A[1][0] = 1.0;
106  A[1][1] = 0.0;
107 
108  b4[0] = 1.0;
109  b4[1] = 0.0;
110 
111  b5[0] = 3.0/2.0;
112  b5[1] = -1.0/2.0;
113 
114  c[0] = 0.0;
115  c[1] = 1.0;
116 
117  TOL = 0.1;
118 }
119 
120 
121 
123 
124 // end of file.
virtual IntegratorRK12 & operator=(const IntegratorRK12 &arg)
double TOL
Definition: integrator.hpp:645
virtual returnValue init(const DifferentialEquation &rhs_)
Allows to pass back messages to the calling function.
virtual returnValue init(const DifferentialEquation &rhs_)
virtual Integrator * clone() const
#define CLOSE_NAMESPACE_ACADO
Abstract base class for all kinds of algorithms for integrating differential equations (ODEs or DAEs)...
Definition: integrator.hpp:61
virtual returnValue step(int number)
Implements the Runge-Kutta-12 scheme for integrating ODEs.
virtual IntegratorRK & operator=(const IntegratorRK &arg)
#define BEGIN_NAMESPACE_ACADO
virtual returnValue step(int number)
Abstract base class for all kinds of Runge-Kutta schemes for integrating ODEs.
virtual void initializeButcherTableau()
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:42