integrator_runge_kutta78.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 
45 
47 
48 
49 //
50 // PUBLIC MEMBER FUNCTIONS:
51 //
52 
54  :IntegratorRK(13,0.1428571428571428571){
55 
56  if( A != 0 ) initializeButcherTableau();
57 }
58 
60  :IntegratorRK(rhs_,13,0.1428571428571428571){
61 
62  if( A != 0 ) initializeButcherTableau();
63 }
64 
66  :IntegratorRK(arg){ }
67 
69 
71 
72  if( this != &arg ){
74  }
75  return *this;
76 }
77 
79 
80  return new IntegratorRK78(*this);
81 }
82 
83 
85 
86  A[0][ 0] = 0.0;
87  A[0][ 1] = 0.0;
88  A[0][ 2] = 0.0;
89  A[0][ 3] = 0.0;
90  A[0][ 4] = 0.0;
91  A[0][ 5] = 0.0;
92  A[0][ 6] = 0.0;
93  A[0][ 7] = 0.0;
94  A[0][ 8] = 0.0;
95  A[0][ 9] = 0.0;
96  A[0][10] = 0.0;
97  A[0][11] = 0.0;
98  A[0][12] = 0.0;
99 
100  A[1][ 0] = 1.0/18.0;
101  A[1][ 1] = 0.0;
102  A[1][ 2] = 0.0;
103  A[1][ 3] = 0.0;
104  A[1][ 4] = 0.0;
105  A[1][ 5] = 0.0;
106  A[1][ 6] = 0.0;
107  A[1][ 7] = 0.0;
108  A[1][ 8] = 0.0;
109  A[1][ 9] = 0.0;
110  A[1][10] = 0.0;
111  A[1][11] = 0.0;
112  A[1][12] = 0.0;
113 
114  A[2][ 0] = 1.0/48.0;
115  A[2][ 1] = 1.0/16.0;
116  A[2][ 2] = 0.0;
117  A[2][ 3] = 0.0;
118  A[2][ 4] = 0.0;
119  A[2][ 5] = 0.0;
120  A[2][ 6] = 0.0;
121  A[2][ 7] = 0.0;
122  A[2][ 8] = 0.0;
123  A[2][ 9] = 0.0;
124  A[2][10] = 0.0;
125  A[2][11] = 0.0;
126  A[2][12] = 0.0;
127 
128  A[3][ 0] = 1.0/32.0;
129  A[3][ 1] = 0.0;
130  A[3][ 2] = 3.0/32.0;
131  A[3][ 3] = 0.0;
132  A[3][ 4] = 0.0;
133  A[3][ 5] = 0.0;
134  A[3][ 6] = 0.0;
135  A[3][ 7] = 0.0;
136  A[3][ 8] = 0.0;
137  A[3][ 9] = 0.0;
138  A[3][10] = 0.0;
139  A[3][11] = 0.0;
140  A[3][12] = 0.0;
141 
142  A[4][ 0] = 5.0/16.0;
143  A[4][ 1] = 0.0;
144  A[4][ 2] = -75.0/64.0;
145  A[4][ 3] = 75.0/64.0;
146  A[4][ 4] = 0.0;
147  A[4][ 5] = 0.0;
148  A[4][ 6] = 0.0;
149  A[4][ 7] = 0.0;
150  A[4][ 8] = 0.0;
151  A[4][ 9] = 0.0;
152  A[4][10] = 0.0;
153  A[4][11] = 0.0;
154  A[4][12] = 0.0;
155 
156  A[5][ 0] = 3.0/80.0;
157  A[5][ 1] = 0.0;
158  A[5][ 2] = 0.0;
159  A[5][ 3] = 3.0/16.0;
160  A[5][ 4] = 3.0/20.0;
161  A[5][ 5] = 0.0;
162  A[5][ 6] = 0.0;
163  A[5][ 7] = 0.0;
164  A[5][ 8] = 0.0;
165  A[5][ 9] = 0.0;
166  A[5][10] = 0.0;
167  A[5][11] = 0.0;
168  A[5][12] = 0.0;
169 
170  A[6][ 0] = 29443841.0/614563906.0;
171  A[6][ 1] = 0.0;
172  A[6][ 2] = 0.0;
173  A[6][ 3] = 77736538.0/692538347.0;
174  A[6][ 4] = -28693883.0/1125000000.0;
175  A[6][ 5] = 23124283.0/1800000000.0;
176  A[6][ 6] = 0.0;
177  A[6][ 7] = 0.0;
178  A[6][ 8] = 0.0;
179  A[6][ 9] = 0.0;
180  A[6][10] = 0.0;
181  A[6][11] = 0.0;
182  A[6][12] = 0.0;
183 
184  A[7][ 0] = 16016141.0/946692911.0;
185  A[7][ 1] = 0.0;
186  A[7][ 2] = 0.0;
187  A[7][ 3] = 61564180.0/158732637.0;
188  A[7][ 4] = 22789713.0/633445777.0;
189  A[7][ 5] = 545815736.0/2771057229.0;
190  A[7][ 6] = -180193667.0/1043307555.0;
191  A[7][ 7] = 0.0;
192  A[7][ 8] = 0.0;
193  A[7][ 9] = 0.0;
194  A[7][10] = 0.0;
195  A[7][11] = 0.0;
196  A[7][12] = 0.0;
197 
198  A[8][ 0] = 39632708.0/573591083.0;
199  A[8][ 1] = 0.0;
200  A[8][ 2] = 0.0;
201  A[8][ 3] = -433636366.0/683701615.0;
202  A[8][ 4] = -421739975.0/2616292301.0;
203  A[8][ 5] = 100302831.0/723423059.0;
204  A[8][ 6] = 790204164.0/839813087.0;
205  A[8][ 7] = 800635310.0/3783071287.0;
206  A[8][ 8] = 0.0;
207  A[8][ 9] = 0.0;
208  A[8][10] = 0.0;
209  A[8][11] = 0.0;
210  A[8][12] = 0.0;
211 
212  A[9][ 0] = 246121993.0/1340847787.0;
213  A[9][ 1] = 0.0;
214  A[9][ 2] = 0.0;
215  A[9][ 3] = -37695042795.0/15268766246.0;
216  A[9][ 4] = -309121744.0/1061227803.0;
217  A[9][ 5] = -12992083.0/490766935.0;
218  A[9][ 6] = 6005943493.0/2108947869.0;
219  A[9][ 7] = 393006217.0/1396673457.0;
220  A[9][ 8] = 123872331.0/1001029789.0;
221  A[9][ 9] = 0.0;
222  A[9][10] = 0.0;
223  A[9][11] = 0.0;
224  A[9][12] = 0.0;
225 
226  A[10][ 0] = -1028468189.0/846180014.0;
227  A[10][ 1] = 0.0;
228  A[10][ 2] = 0.0;
229  A[10][ 3] = 8478235783.0/508512852.0;
230  A[10][ 4] = 1311729495.0/1432422823.0;
231  A[10][ 5] = -10304129995.0/1701304382.0;
232  A[10][ 6] = -48777925059.0/3047939560.0;
233  A[10][ 7] = 15336726248.0/1032824649.0;
234  A[10][ 8] = -45442868181.0/3398467696.0;
235  A[10][ 9] = 3065993473.0/597172653.0;
236  A[10][10] = 0.0;
237  A[10][11] = 0.0;
238  A[10][11] = 0.0;
239 
240  A[11][ 0] = 185892177.0/718116043.0;
241  A[11][ 1] = 0.0;
242  A[11][ 2] = 0.0;
243  A[11][ 3] = -3185094517.0/667107341.0;
244  A[11][ 4] = -477755414.0/1098053517.0;
245  A[11][ 5] = -703635378.0/230739211.0;
246  A[11][ 6] = 5731566787.0/1027545527.0;
247  A[11][ 7] = 5232866602.0/850066563.0;
248  A[11][ 8] = -4093664535.0/808688257.0;
249  A[11][ 9] = 3962137247.0/1805957418.0;
250  A[11][10] = 65686358.0/487910083.0;
251  A[11][11] = 0.0;
252  A[11][12] = 0.0;
253 
254  A[12][ 0] = 403863854.0/491063109.0;
255  A[12][ 1] = 0.0;
256  A[12][ 2] = 0.0;
257  A[12][ 3] = -5068492393.0/434740067.0;
258  A[12][ 4] = -411421997.0/543043805.0;
259  A[12][ 5] = 652783627.0/914296604.0;
260  A[12][ 6] = 11173962825.0/925320556.0;
261  A[12][ 7] = -13158990841.0/6184727034.0;
262  A[12][ 8] = 3936647629.0/1978049680.0;
263  A[12][ 9] = -160528059.0/685178525.0;
264  A[12][10] = 248638103.0/1413531060.0;
265  A[12][11] = 0.0;
266  A[12][12] = 0.0;
267 
268 
269 
270  b4[ 0] = 14005451.0/335480064.0;
271  b4[ 1] = 0.0;
272  b4[ 2] = 0.0;
273  b4[ 3] = 0.0;
274  b4[ 4] = 0.0;
275  b4[ 5] = -59238493.0/1068277825.0;
276  b4[ 6] = 181606767.0/758867731.0;
277  b4[ 7] = 561292985.0/797845732.0;
278  b4[ 8] = -1041891430.0/1371343529.0;
279  b4[ 9] = 760417239.0/1151165299.0;
280  b4[10] = 118820643.0/751138087.0;
281  b4[11] = -528747749.0/2220607170.0;
282  b4[12] = 1.0/4.0;
283 
284  b5[ 0] = 13451932.0/455176623.0;
285  b5[ 1] = 0.0;
286  b5[ 2] = 0.0;
287  b5[ 3] = 0.0;
288  b5[ 4] = 0.0;
289  b5[ 5] = -808719846.0/976000145.0;
290  b5[ 6] = 1757004468.0/5645159321.0;
291  b5[ 7] = 656045339.0/265891186.0;
292  b5[ 8] = -3867574721.0/1518517206.0;
293  b5[ 9] = 465885868.0/322736535.0;
294  b5[10] = 53011238.0/667516719.0;
295  b5[11] = 2.0/45.0;
296  b5[12] = 0.0;
297 
298  c[ 0] = 0.0;
299  c[ 1] = 1.0/18.0;
300  c[ 2] = 1.0/12.0;
301  c[ 3] = 1.0/8.0;
302  c[ 4] = 5.0/16.0;
303  c[ 5] = 3.0/8.0;
304  c[ 6] = 59.0/400.0;
305  c[ 7] = 93.0/200.0;
306  c[ 8] = 5490023248.0/9719169821.0;
307  c[ 9] = 13.0/20.0;
308  c[10] = 1201146811.0/1299019798.0;
309  c[11] = 1.0;
310  c[12] = 1.0;
311 }
312 
314 
315 // end of file.
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 void initializeButcherTableau()
Implements the Runge-Kutta-78 scheme for integrating ODEs.
virtual IntegratorRK & operator=(const IntegratorRK &arg)
#define BEGIN_NAMESPACE_ACADO
Abstract base class for all kinds of Runge-Kutta schemes for integrating ODEs.
virtual IntegratorRK78 & operator=(const IntegratorRK78 &arg)
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