The BioCro C++ Library
development_index.h
Go to the documentation of this file.
1#ifndef DEVELOPMENT_INDEX_H
2#define DEVELOPMENT_INDEX_H
3
4#include "../framework/module.h"
5#include "../framework/state_map.h"
6
7namespace standardBML
8{
55class development_index : public differential_module
56{
57 public:
59 state_map const& input_quantities,
60 state_map* output_quantities)
61 : differential_module{},
62
63 // Get references to input quantities
64 development_rate_per_hour{get_input(input_quantities, "development_rate_per_hour")},
65
66 // Get pointers to output quantities
67 DVI_op{get_op(output_quantities, "DVI")}
68
69 {
70 }
71
72 static string_vector get_inputs();
73 static string_vector get_outputs();
74 static std::string get_name() { return "development_index"; }
75
76 private:
77 // References to input quantities
78 const double& development_rate_per_hour;
79
80 // Pointers to output quantities
81 double* DVI_op;
82
83 // Implement the pure virtual function do_operation():
84 void do_operation() const override final;
85};
86
88{
89 return {
90 "development_rate_per_hour" // hour^-1
91 };
92}
93
95{
96 return {
97 "DVI" // dimensionless
98 };
99}
100
101void development_index::do_operation() const
102{
103 // Update the output quantity list
104 update(DVI_op, development_rate_per_hour); // dimensionless
105}
106
107} // namespace standardBML
108#endif
Calculates the development index (DVI) corresponding to plant growth rate.
static string_vector get_outputs()
development_index(state_map const &input_quantities, state_map *output_quantities)
static string_vector get_inputs()
This is the standard BioCro module library; it includes the essential modules used in typical BioCro ...
Definition: aba_decay.h:8