integrator_runge_kutta45.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(7,0.25){
54 
55  if( A != 0 ) initializeButcherTableau();
56 }
57 
59  :IntegratorRK(rhs_,7,0.25){
60 
61  if( A != 0 ) initializeButcherTableau();
62 }
63 
65  :IntegratorRK(arg){ }
66 
68 
70 
71  if( this != &arg ){
73  }
74  return *this;
75 }
76 
78 
79  return new IntegratorRK45(*this);
80 }
81 
82 
84 
85  A[0][0] = 0.0;
86  A[0][1] = 0.0;
87  A[0][2] = 0.0;
88  A[0][3] = 0.0;
89  A[0][4] = 0.0;
90  A[0][5] = 0.0;
91  A[0][6] = 0.0;
92 
93  A[1][0] = 1.0/5.0;
94  A[1][1] = 0.0;
95  A[1][2] = 0.0;
96  A[1][3] = 0.0;
97  A[1][4] = 0.0;
98  A[1][5] = 0.0;
99  A[1][6] = 0.0;
100 
101  A[2][0] = 3.0/40.0;
102  A[2][1] = 9.0/40.0;
103  A[2][2] = 0.0;
104  A[2][3] = 0.0;
105  A[2][4] = 0.0;
106  A[2][5] = 0.0;
107  A[2][6] = 0.0;
108 
109  A[3][0] = 44.0/45.0;
110  A[3][1] = -56.0/15.0;
111  A[3][2] = 32.0/9.0;
112  A[3][3] = 0.0;
113  A[3][4] = 0.0;
114  A[3][5] = 0.0;
115  A[3][6] = 0.0;
116 
117  A[4][0] = 19372.0/6561.0;
118  A[4][1] = -25360.0/2187.0;
119  A[4][2] = 64448.0/6561.0;
120  A[4][3] = -212.0/729.0;
121  A[4][4] = 0.0;
122  A[4][5] = 0.0;
123  A[4][6] = 0.0;
124 
125  A[5][0] = 9017.0/3168.0;
126  A[5][1] = -355.0/33.0;
127  A[5][2] = 46732.0/5247.0;
128  A[5][3] = 49.0/176.0;
129  A[5][4] = -5103.0/18656.0;
130  A[5][5] = 0.0;
131  A[5][6] = 0.0;
132 
133  A[6][0] = 35.0/384.0;
134  A[6][1] = 0.0;
135  A[6][2] = 500.0/1113.0;
136  A[6][3] = 125.0/192.0;
137  A[6][4] = -2187.0/6784.0;
138  A[6][5] = 11.0/84.0;
139  A[6][6] = 0.0;
140 
141  b4[0] = 5179.0/57600.0;
142  b4[1] = 0.0;
143  b4[2] = 7571.0/16695.0;
144  b4[3] = 393.0/640.0;
145  b4[4] = -92097.0/339200.0;
146  b4[5] = 187.0/2100.0;
147  b4[6] = 1.0/40.0;
148 
149  b5[0] = 35.0/384.0;
150  b5[1] = 0.0;
151  b5[2] = 500.0/1113.0;
152  b5[3] = 125.0/192.0;
153  b5[4] = -2187.0/6784.0;
154  b5[5] = 11.0/84.0;
155  b5[6] = 0.0;
156 
157  c[0] = 0.0;
158  c[1] = 0.2;
159  c[2] = 0.3;
160  c[3] = 0.8;
161  c[4] = 8.0/9.0;
162  c[5] = 1.0;
163  c[6] = 1.0;
164 }
165 
166 
168 
169 // end of file.
virtual void initializeButcherTableau()
virtual IntegratorRK45 & operator=(const IntegratorRK45 &arg)
#define CLOSE_NAMESPACE_ACADO
Abstract base class for all kinds of algorithms for integrating differential equations (ODEs or DAEs)...
Definition: integrator.hpp:61
virtual IntegratorRK & operator=(const IntegratorRK &arg)
Implements the Runge-Kutta-45 scheme for integrating ODEs.
#define BEGIN_NAMESPACE_ACADO
Abstract base class for all kinds of Runge-Kutta schemes for integrating ODEs.
virtual Integrator * clone() const
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