Group Abstract Group Abstract

Message Boards Message Boards

[?] Find the stationary states of an EDO system modelling the yellow fever?

Posted 8 years ago

I am modeling the yellow fever for an EDO system, in which I have to find the stationary states of the system, and I have great difficulty in finding something that can be very simple. I put the program to run and it keeps running forever. I thought it was the model, so I compiled another model in which I had already obtained the stationary states quickly, and the same one had the same problem. I tested on two other machines and the problem persists, including for the model I had compiled before and had got the points. I suppose it is error writing the system in wolfram to get the points of equilibrium, but the point is that this writing format I had already used to ober stationary states of the ODE in wolfram. What is wrong with calling the equations? Please tell me if you need the written template to try to help and excuse me for the English and if it is a trivial question, try to relieve me because I am new to the software.

Solve[-a*S[t]*P[t] + b*R[t] - c*S[t] + d*(S[t] + I1[t] + R[t]) == 0 &&  a*S[t]*P[t] - e*I1[t] - (I1[t]*(c + P[t])) == 0 &&  
e*I1 - b*R[t] ==  0 && -f*N1[t]*I1[t] + g*(N1[t] + P[t])*(1 - (N1[t] + P[t])/k) - h*N1[t] - c*N1[t] == 0 && 
  f*N1[t]*I1[t] - h*P[t] - c*P[t] == 0, {S[t], I1[t], R[t], N1[t], P[t]}, t]
3 Replies
POSTED BY: Marco Thiel

There is an issue with this formulation in that the ,t at the end should not be there (DSolve needs an independent variable, Solve has no notion of that). Also I1 appears in one place without the t dependency; I assume that was a mistake. But it is a difficult system to handle with all the symbolic parameters. It might be more effective to only solve when given numeric values for {a,b,...}. Could be done as below.

exprs = {-a*S[t]*P[t] + b*R[t] - c*S[t] + d*(S[t] + I1[t] + R[t]), 
   a*S[t]*P[t] - e*I1[t] - (I1[t]*(c + P[t])), 
   e*I1[t] - b*R[t], -f*N1[t]*I1[t] + 
    g*(N1[t] + P[t])*(1 - (N1[t] + P[t])/k) - h*N1[t] - c*N1[t], 
   f*N1[t]*I1[t] - h*P[t] - c*P[t]};

params = {a, b, c, d, e, f, g, h, k};
vars = {S[t], I1[t], R[t], N1[t], P[t]};

solns[a0_?NumberQ, b0_?NumberQ, c0_?NumberQ, d0_?NumberQ, e0_?NumberQ,
   f0_?NumberQ, g0_?NumberQ, h0_?NumberQ, k0_?NumberQ] := 
 NSolve[exprs /. 
   Thread[params -> {a0, b0, c0, d0, e0, f0, g0, h0, k0}]]

Example:

 solns[.1, .3, .2, .5, .6, .4, .7, .11, .6]

(* Out[460]= {{I1[t] -> -0.833013435701, N1[t] -> -4.46571428571, 
  P[t] -> 4.8, R[t] -> -1.6660268714, 
  S[t] -> -9.71849008317}, {I1[t] -> -0.775, N1[t] -> -4.8, 
  P[t] -> 4.8, R[t] -> -1.55, 
  S[t] -> -9.04166666667}, {I1[t] -> -0.775, N1[t] -> 0.5, 
  P[t] -> -0.5, R[t] -> -1.55, 
  S[t] -> 4.65}, {I1[t] -> -0.464469178082, N1[t] -> 0.834285714286, 
  P[t] -> -0.5, R[t] -> -0.928938356164, 
  S[t] -> 2.78681506849}, {I1[t] -> 0., N1[t] -> 0.334285714286, 
  P[t] -> 0., R[t] -> 0., S[t] -> 0.}, {I1[t] -> 0., N1[t] -> 0., 
  P[t] -> 0., R[t] -> 0., S[t] -> 0.}} *)
POSTED BY: Daniel Lichtblau

Sorry, your post hasn't shown up until I replied. The system sometimes has quite a delay... Perhaps I am sitting on the wrong side of the pond...

Cheers,

Marco

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard