14 #ifndef __ORDINARYDIFFERENTIALEQUATIONS_H__
15 #define __ORDINARYDIFFERENTIALEQUATIONS_H__
30 #include "mathematical_model.h"
32 #include "neural_network.h"
36 #include "../tinyxml2/tinyxml2.h"
152 virtual tinyxml2::XMLDocument*
to_XML(
void)
const;
153 virtual void from_XML(
const tinyxml2::XMLDocument&);
virtual ~OrdinaryDifferentialEquations(void)
double final_independent_variable
Final value for the only independent variable.
const double & get_initial_independent_variable(void) const
Returns the initial value of the independent variable.
Vector< double > calculate_Runge_Kutta_final_solution(const NeuralNetwork &) const
SolutionMethod
Enumeration of available methods for numerical integration of ordinary differential equations...
virtual Vector< double > calculate_final_solutions(const NeuralNetwork &) const
void set_initial_independent_variable(const double &)
void set_points_number(const size_t &)
void set_solution_method(const SolutionMethod &)
void set_initial_size(const size_t &)
void set_final_independent_variable(const double &)
const size_t & get_error_size(void) const
Returns an error size for the solutions in the Runge-Kutta-Fehlberg method.
std::string write_solution_method(void) const
Returns a string with the name of the numerical method to be used for integration of the ordinary dif...
void set_initial_dependent_variable(const size_t &, const double &)
Matrix< double > calculate_Runge_Kutta_Fehlberg_solution(const NeuralNetwork &) const
const size_t & get_initial_size(void) const
Returns the initial size to be reserved for the solutions in the Runge-Kutta-Fehlberg method...
void set_tolerance(const double &)
virtual Vector< double > calculate_dependent_variables_dots(const NeuralNetwork &, const Vector< double > &) const =0
This pure virtual method calculates the derivatives of the dependent variables with respect to the in...
OrdinaryDifferentialEquations(void)
double initial_independent_variable
Initial value for the only independent variable.
size_t warning_size
Number of points at which the the Runge-Kutta-Fehlberg method displays a warning message.
void set_initial_dependent_variables(const Vector< double > &)
size_t error_size
Number of points at which the the Runge-Kutta-Fehlberg method throws an exception.
Matrix< double > calculate_Runge_Kutta_solution(const NeuralNetwork &) const
virtual void from_XML(const tinyxml2::XMLDocument &)
std::string to_string(void) const
Returns a string representation of the current ordinary differential equations object.
double tolerance
Tolerance in the Runge-Kutta-Fehlberg method.
virtual Matrix< double > calculate_solutions(const NeuralNetwork &) const
const SolutionMethod & get_solution_method(void) const
Returns the numerical method to be used for integration of the ordinary differential equation...
size_t points_number
Number of points in the Runge-Kutta method.
size_t initial_size
Initial number of points in the Runge-Kutta-Fehlberg method.
OrdinaryDifferentialEquations & operator=(const OrdinaryDifferentialEquations &)
const double & get_final_independent_variable(void) const
Returns the final value of the independent variable.
const double & get_tolerance(void) const
Returns the tolerance in the Runge-Kutta-Fehlberg method.
const double & get_initial_dependent_variable(const size_t &) const
virtual void set_default(void)
void set_error_size(const size_t &)
Vector< double > initial_dependent_variables
Initial values for the dependent variables.
void set_warning_size(const size_t &)
const size_t & get_points_number(void) const
Returns the number of integration points in the Runge-Kutta method.
void set(const OrdinaryDifferentialEquations &)
SolutionMethod solution_method
Numerical integration method (Runge-Kutta or Runge-Kutta-Fehlberg).
virtual void save_data(const NeuralNetwork &, const std::string &) const
const Vector< double > & get_initial_dependent_variables(void) const
Returns the initial values of the independent variables.
Vector< double > calculate_Runge_Kutta_Fehlberg_final_solution(const NeuralNetwork &) const
const size_t & get_warning_size(void) const
Returns a warning size for the solutions in the Runge-Kutta-Fehlberg method.
bool operator==(const OrdinaryDifferentialEquations &) const
virtual tinyxml2::XMLDocument * to_XML(void) const