MIMIC - Example

Example

Problem

Consider a predator-prey model from the field of marine biology to determine the dynamics of fish and shark populations. As a simple model, we choose the Lotka–Volterra equation and the constants given in a tutorial.

If

f(t): Fish population over time (fish)
s(t): Shark population over time (sharks)
df / dt or : growth rate of fish population (fish/year)
ds / dt or : growth rate of shark population (sharks/year)
: growth rate of fish in the absence of sharks (1/year)
: death rate per encounter of fish with sharks (1/sharks and year).
: death rate of sharks in the absence of their prey, fish (1/year)
: efficiency of turning predated fish into sharks (sharks/fish)

then

wlth initial conditions

The problem's constants are given as:

  • = 600 fish
  • = 50 sharks
  • = 0.7 fish/year
  • = 0.007 fish/shark and year
  • = 0.5 shark/year
  • = 0.1 shark/fish
  • tmax = 50 year
Code sample
Card columns 0 1 2 3 4 5 6 7 12345678901234567890123456789012345678901234567890123456789012345678901 ----------------------------------------------------------------------- * A SIMPLE PREDATOR-PREY MODEL FROM MARINE BIOLOGY / (TUTORIAL 2: NUMERICAL SOLUTION OF ODE'S - 19/08/02) / ENVIRONMENTAL FLUID MECHANICS LAB / DEPT OF CIVIL AND ENVIRONMENTAL ENGINEERİNG / STANFORD UNIVERSITY * * LOTKA–VOLTERRA EQUATION CON(F0,S0,TMAX) CON(ALPHA,BETA,GAMMA,EPS) 1DF = ALPHA*F-BETA*F*S F = INT(1DF,F0) 1DS = EPS*BETA*F*S-GAMMA*S S = INT(1DS,S0) HDR(TIME,FISH,SHARK) OUT(T,F,S) PLO(F,S) FIN(T,TMAX) END 600. 50. 50. 0.7 0.007 0.5 0.1




Read more about this topic:  MIMIC

Famous quotes containing the word example:

    Our intellect is not the most subtle, the most powerful, the most appropriate, instrument for revealing the truth. It is life that, little by little, example by example, permits us to see that what is most important to our heart, or to our mind, is learned not by reasoning but through other agencies. Then it is that the intellect, observing their superiority, abdicates its control to them upon reasoned grounds and agrees to become their collaborator and lackey.
    Marcel Proust (1871–1922)