1 #ifndef STAN_LANG_AST_NODE_INTEGRATE_ODE_CONTROL_HPP
2 #define STAN_LANG_AST_NODE_INTEGRATE_ODE_CONTROL_HPP
3 
4 #include <stan/lang/ast/node/expression.hpp>
5 #include <string>
6 
7 namespace stan {
8   namespace lang {
9 
10     struct expression;
11 
12     /**
13      * Structure for a diff eq integration statement with control
14      * parameters for the integrator.
15      */
16     struct integrate_ode_control {
17       /**
18        * The name of the integrator.
19        */
20       std::string integration_function_name_;
21 
22       /**
23        * Name of the ODE system.
24        */
25       std::string system_function_name_;
26 
27       /**
28        * Initial state (array of real).
29        */
30       expression y0_;
31 
32       /**
33        * Initial time (real).
34        */
35       expression t0_;
36 
37       /**
38        * Solution times (array of real).
39        */
40       expression ts_;
41 
42       /**
43        * Parameters (array of real).
44        */
45       expression theta_;
46 
47       /**
48        * Real-valued data (array of real).
49        */
50       expression x_;
51 
52       /**
53        * Integer-valued data (array of int).
54        */
55       expression x_int_;  // integer data
56 
57       /**
58        * Relative tolerance (real).
59        */
60       expression rel_tol_;
61 
62       /**
63        * Absolute tolerance (real).
64        */
65       expression abs_tol_;
66 
67       /**
68        * Maximum number of steps (integer).
69        */
70       expression max_num_steps_;
71 
72       /**
73        * Construct a default ODE integrator object with control.
74        */
75       integrate_ode_control();
76 
77       /**
78        * Construt an ODE integrator with control parameter with the
79        * specified values.
80        *
81        * @param integration_function_name name of integrator
82        * @param system_function_name name of ODE system
83        * @param y0 initial value
84        * @param t0 initial time
85        * @param ts solution times
86        * @param theta parameters
87        * @param x real-valued data
88        * @param x_int integer-valued data
89        * @param rel_tol relative tolerance of integrator
90        * @param abs_tol absolute tolerance of integrator
91        * @param max_steps max steps in integrator
92        */
93       integrate_ode_control(const std::string& integration_function_name,
94                             const std::string& system_function_name,
95                             const expression& y0,
96                             const expression& t0,
97                             const expression& ts,
98                             const expression& theta,
99                             const expression& x,
100                             const expression& x_int,
101                             const expression& rel_tol,
102                             const expression& abs_tol,
103                             const expression& max_steps);
104     };
105 
106   }
107 }
108 #endif
109