## Maths - Integrals

Use this forum to discuss any issues relating to Systems Dynamics and Systems Thinking.
JoseG
Junior Member
Posts: 7
Joined: Mon Jul 06, 2020 8:19 am
Vensim version: PLE+

### Maths - Integrals

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?

Posts: 4638
Joined: Wed Mar 05, 2003 3:10 am

### Re: Maths - Integrals

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.
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
JoseG
Junior Member
Posts: 7
Joined: Mon Jul 06, 2020 8:19 am
Vensim version: PLE+

### Re: Maths - Integrals

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
BarryDawson
Junior Member
Posts: 2
Joined: Sat May 20, 2023 4:20 am
Vensim version: PLE

### Re: Maths - Integrals

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?

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.
If you want to find a safe and free AI Mirror APK Premium Unlocked drawing application on your phone, the getmodnow website will meet all your needs.
rdudley
Senior Member
Posts: 77
Joined: Mon Sep 08, 2003 2:16 am

### Re: Maths - Integrals

Not sure if this is helpful for what you want to do, but I suggest looking at the differential form of that equation. dx/dt=.....

That is , define the flows. Much easier. Also, I would not use "incidence" as a stock, but rather would start with uninfected plants and infected plants with a flow of plants per day becoming infected. Incidence, I assume, would then be infected plants/total plants.
R. G. Dudley