integrator_runge_kutta23.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(3,0.5){
54 
55  if( A != 0 ) initializeButcherTableau();
56 }
57 
59  :IntegratorRK(rhs_,3,0.5){
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 IntegratorRK23(*this);
80 }
81 
83 
84  A[0][0] = 0.0;
85  A[0][1] = 0.0;
86  A[0][2] = 0.0;
87 
88  A[1][0] = 1.0/2.0;
89  A[1][1] = 0.0;
90  A[1][2] = 0.0;
91 
92  A[2][0] = -1.0;
93  A[2][1] = 2.0;
94  A[2][2] = 0.0;
95 
96  b4[0] = 0.0;
97  b4[1] = 1.0;
98  b4[2] = 0.0;
99 
100  b5[0] = 1.0/6.0;
101  b5[1] = 4.0/6.0;
102  b5[2] = 1.0/6.0;
103 
104  c[0] = 0.0;
105  c[1] = 1.0/2.0;
106  c[2] = 1.0;
107 
108  TOL = 0.01;
109 }
110 
111 
113 
114 // end of file.
double TOL
Definition: integrator.hpp:645
#define CLOSE_NAMESPACE_ACADO
Implements the Runge-Kutta-23 scheme for integrating ODEs.
Abstract base class for all kinds of algorithms for integrating differential equations (ODEs or DAEs)...
Definition: integrator.hpp:61
virtual IntegratorRK23 & operator=(const IntegratorRK23 &arg)
virtual Integrator * clone() const
virtual IntegratorRK & operator=(const IntegratorRK &arg)
virtual void initializeButcherTableau()
#define BEGIN_NAMESPACE_ACADO
Abstract base class for all kinds of Runge-Kutta schemes for integrating ODEs.
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