Page 1 of 1

Maths - Integrals

Posted: Tue Aug 17, 2021 10:05 am
by JoseG
Hi all,

I am trying to represent this mathematical expression into a SD-Vensim model:

X(t)=∫X(t,r)f(r)dr

The integral is defined between zero and R=2 (for example)
X(t,r) represent a variable (disease incidence) at time t with a rate r, and is defined by the logistic equation X(t)=1/(1+(1-Yo/Yo)*EXP(-r*t)).
Yo is a parameter constant.
f(r) is a density function, specifically, the exponential distribution: f(r)=EXP(-r/d)/d.
d is a parameter constant

Is it possible to translate this into a stock-and-flows diagram model in Vensim?

Thanks in advance

Re: Maths - Integrals

Posted: Tue Aug 17, 2021 10:28 am
by Administrator
Have you tried implementing this yourself? If yes, feel free to upload the model and explain why you think it's not correct.

1. What is "disease incidence" measured in?
2. What is the rate "r" measured in?

You would usually calculate the rate at which disease occurs, then put this into a level which would be the number of people/animals/whatever that have the disease at a point in time.

Re: Maths - Integrals

Posted: Tue Aug 17, 2021 12:39 pm
by JoseG
Disease incidence represents the proportion of plants diseased out of the total of a plot, and therefore is dimensionless.
the rate of disease, r, is 1/time (e.g., 1/day)

I create a model with a stock (level) for disease incidence, but I have problems in including the exponential distribution of r on it

Re: Maths - Integrals

Posted: Sat May 20, 2023 6:40 am
by BarryDawson
JoseG wrote: Tue Aug 17, 2021 10:05 am Hi all,

I am trying to represent this mathematical expression into a SD-Vensim model:

X(t)=∫X(t,r)f(r)dr

The integral is defined between zero and R=2 (for example)
X(t,r) represent a variable (disease incidence) at time t with a rate r, and is defined by the logistic equation X(t)=1/(1+(1-Yo/Yo)*EXP(-r*t)).
Yo is a parameter constant.
f(r) is a density function, specifically, the exponential distribution: f(r)=EXP(-r/d)/d.
d is a parameter constant

Is it possible to translate this into a stock-and-flows diagram model in Vensim?

Thanks in advance
Here's how you can approach it:

Start by identifying the stocks, flows, and variables in your model.
Stock: X(t) (disease incidence)
Flow: ∫X(t,r)f(r)dr (accumulation of disease incidence over time)
Variable: X(t,r) (disease incidence at time t with a rate r)
Represent the stocks and flows in the Vensim software.
Create a stock variable in Vensim and name it X(t). This stock represents the disease incidence over time.
Create a flow variable and name it ∫X(t,r)f(r)dr. This flow represents the accumulation of disease incidence over time.
Define the relationships between the variables.
Define the relationship for X(t,r) using the logistic equation you provided: X(t) = 1 / (1 + (1 - Yo/Yo) * EXP(-r*t)). Yo is a constant parameter.
Define the density function f(r) as the exponential distribution: f(r) = EXP(-r/d)/d. d is a constant parameter.
Integrate X(t,r)f(r)dr over the range [0, R=2] to calculate the accumulation of disease incidence over time: ∫X(t,r)f(r)dr.
Connect the variables in the model.
Connect the flow variable ∫X(t,r)f(r)dr to the stock variable X(t). This indicates that the accumulation of disease incidence contributes to the disease incidence over time.