<< Chapter < Page Chapter >> Page >

Dynamic simulation on a digital computer

If a system is modeled by a differential equation, and if the equations are numerically solved on a digital computer or calculator,the system is said to be simulated on the computer. If the model is valid and the numerical methods accurate, experimentscan be performed on the computer simulation that might be impossible to conduct otherwise.

Consider several examples that use the models already discussed. If a population is governed by a linear first-order equation

dp d t = r p

one would not be able to "solve" this equation on a computer. If, however, we use Euler's method as was done in (14) by approximating the derivative as

d p d t = p ( n T + T ) - p ( n T ) T

where time is considered at intervals of T ,

t = n T n = 0 , 1 , 2 , . . .

This gives for (1) .EQ (34)

p ( n T + T ) = p ( n T ) + T r p ( n T ) p ( n T + T ) = ( 1 + r T ) p ( n T )

If we include the time interval T in the functional notation by

p ( n T ) = x ( n )

then (3) becomes

x ( n + 1 ) = ( 1 + r T ) x ( n )

which is now in a form that one can easily calculate successive values of x ( n ) given any initial value. This can be programmed on a computer or simply done on a handcalculator.

Next, consider the nonlinear equation that models a population with a simple limit given by (23).

d p d t = 1 - p k r o p

Using Euler's method again gives

x ( n + 1 ) = x ( n ) + T r o x ( n ) - T r o k x ( n ) 2

This equation is complex enough to illustrate several points; therefore, we will examine several numerical solutions. [link] was programmed on a Tektronix 31 programmable calculator with a plotter automatically plotting the solutions by drawing straightlines between successive x ( n ) .

First, consider a low-density growth rate of r o = 0 . 1 or 10% per year for an initial populationof p o = 100 over a time period of 100 years. We will use for the reducing effect on the growth rate in (2), a valueof β = 0 . 0001 , which implies a carrying capacity for the system of k = 10 , 000 . For the Euler method, a time interval of T = 2 years is used, which means 50 calculations of (6) will be necessary for the 100-yearperiod.

The curves in Figure A are the output of the simulation for the above parameters and also for other growth rates of 5% and 20%.Note the solution always approaching the same limit but requiring different amounts of time.

In Figure B, the model is run assuming several different initial populations.Again, the solutions always approach the limit of k , even if the initial population is greater than k .

Figure C shows the effects of various amounts of limiting by considering various values for the factor β , and therefore k , the carrying capacity. When the limit is removed ( k = ), the growth is exponential.

These examples illustrate the kinds of questions that can be pursued by running experiments on the computer simulation.There is one more point that should be considered. It has nothing to do with the differential equation model (23) but withthe numerical procedure, Euler's method. Consider the effects of using various time intervals T while holding everything else constant. Figure D shows the results of this experiment.The curve resulting from using a time interval of T = 0 . 2 years looks essentially the same as the exact solution of the differential equation.The numerical solution deviates more as T is increased until, for T = 20 years, it has lost the character of the exact solution. A method for checking to see if T is sufficiently small is to try halving it until the change is small.

One last point should be made concerning this numerical simulation. Euler's method is the only approach to numerically solve (23) that hasbeen discussed. That is not because it is the best – there are far more efficientand sophisticated methods – but that is not our subject here, so we will continue with the straightforward algorithm of Euler.

The super-exponential logistic equation of (31) was simulated on the calculator and run with a low population growth rateof r o = 0 . 1 , a maximum rate of M = . 2 , and a carrying capacity of k = 10 , 000 . This solution is shown in Figure E and compared with an exponentialof the same r o , and a simple logistic of the same r o and k . The model was run again with a maximum growth rate of M = . 5 , and the results are shown in Figure F.Note the initial exponential growth which becomes super-exponential, growing extremely rapidly, then abruptly leveling off to anequilibrium.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Dynamics of social systems. OpenStax CNX. Aug 07, 2015 Download for free at https://legacy.cnx.org/content/col10587/1.9
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Dynamics of social systems' conversation and receive update notifications?

Ask