It looks like you're new here. If you want to get involved, click one of these buttons!

- All Categories 2.2K
- Applied Category Theory Course 352
- Applied Category Theory Seminar 4
- Exercises 149
- Discussion Groups 49
- How to Use MathJax 15
- Chat 479
- Azimuth Code Project 108
- News and Information 145
- Azimuth Blog 148
- Azimuth Forum 29
- Azimuth Project 189
- - Strategy 108
- - Conventions and Policies 21
- - Questions 43
- Azimuth Wiki 710
- - Latest Changes 701
- - - Action 14
- - - Biodiversity 8
- - - Books 2
- - - Carbon 9
- - - Computational methods 38
- - - Climate 53
- - - Earth science 23
- - - Ecology 43
- - - Energy 29
- - - Experiments 30
- - - Geoengineering 0
- - - Mathematical methods 69
- - - Meta 9
- - - Methodology 16
- - - Natural resources 7
- - - Oceans 4
- - - Organizations 34
- - - People 6
- - - Publishing 4
- - - Reports 3
- - - Software 21
- - - Statistical methods 2
- - - Sustainability 4
- - - Things to do 2
- - - Visualisation 1
- General 39

Options

The premise here is the "continuous Petri net" approximation, which can be pictured as having buckets filled with fluid at the places; the transitions are like pumps that are draining their input buckets and supplying their output buckets.

Let's start with the simplest case of a Petri net, which has just one species $U$, and one transition $Z$. (I guess you could have a net with zero species that is completely vacant.) Suppose that $Z$ has $m$ input connections to $U$, and $n$ output connections to $U$. Let $\alpha$ be the rate constant for $Z$.

Let $u(t)$ be the continuous amount stored at $U$ at time $t$.

Then the firing rate for $Z$ at time $t$ is $\alpha u(t)^m$.

The general, time-invariant "direction vector" for $Z$ is $(n - m)$ — this is how many tokens would get added for each firing of the transition, back in the discrete model. Let's call this $DirVec(Z)$.

Then the rate equation states that:

$$u'(t) = rate(u(t)) \cdot DirVec(Z) = \alpha \cdot u(t)^m \cdot (n - m)$$ So the general form of the equation that is raised is:

$u'(t) = \beta \, u(t)^m$

When $m = 0$, the general solution is $u(t) =$ affine function of $t$.

When $m = 1$, the general solution is $u(t) =$ exponential function of $t$.

When $m = 2$, a solution is $u(t) = - 1 /(t + const)$. I found this one on the web. Is this the general form of the solution for $m = 2$?

I find this to be a curious sequence of functions: linear, exponential, reciprocal of a polynomial.

What's next?

Does anyone know a general solution, that covers all cases of $m$?

See, here is the pull of the formula-based approach.

## Comments

This can be solved by formula for all m. I'm badly out of practice with this sort of thing, but you can separate the variables:

$d u/d t = \beta u^m$

becomes

$u^{-m} d u = \beta d t$

then integrate

$u^{-m+1} / (m-1) = \beta t + \lambda$

where $ \lambda$ is a constant. Note $m=1$ is a special case that leads to a $log(u)$.

`This can be solved by formula for all m. I'm badly out of practice with this sort of thing, but you can separate the variables: $d u/d t = \beta u^m$ becomes $u^{-m} d u = \beta d t$ then integrate $u^{-m+1} / (m-1) = \beta t + \lambda$ where $ \lambda$ is a constant. Note $m=1$ is a special case that leads to a $log(u)$.`

Good explanation, right to the point, thanks.

A minor correction: the sign of the denominator is reversed.

`Good explanation, right to the point, thanks. A minor correction: the sign of the denominator is reversed.`

I see I missed out on the fun here. It's only when we have more species that we hit some differential equations that can't be solved analytically. With one species, even if we have a lot of transitions, our rate equation always looks like

$$ \frac{d u}{d t} = P(u) $$ and we can always solve the differential equation analytically if we can factor $P$, using the method of partial fractions. (We may have to find the roots of $P$ numerically to factor it, but from then on there are formulas for this stuff.)

By the way, I'm going to change David's original post here to TeX, since 1) I find it painful to read equations that aren't in TeX, and 2) then David can click "edit" to see how it works.

`I see I missed out on the fun here. It's only when we have more species that we hit some differential equations that can't be solved analytically. With one species, even if we have a lot of transitions, our rate equation always looks like $$ \frac{d u}{d t} = P(u) $$ and we can always solve the differential equation analytically if we can factor $P$, using the method of partial fractions. (We may have to find the roots of $P$ numerically to factor it, but from then on there are formulas for this stuff.) By the way, I'm going to change David's original post here to TeX, since 1) I find it painful to read equations that aren't in TeX, and 2) then David can click "edit" to see how it works.`

I am practicing my Tex now. Thanks

`I am practicing my Tex now. Thanks`