MIMIC

From HandWiki

MIMIC, known in capitalized form only, is a former simulation computer language developed 1964 by H. E. Petersen, F. J. Sansom and L. M. Warshawsky of Systems Engineering Group within the Air Force Materiel Command at the Wright-Patterson AFB in Dayton, Ohio, United States.[1] It is an expression-oriented continuous block simulation language, but capable of incorporating blocks of FORTRAN-like algebra.

MIMIC is a further development from MIDAS (Modified Integration Digital Analog Simulator), which represented analog computer design. Written completely in FORTRAN but one routine in COMPASS, and ran on Control Data supercomputers, MIMIC is capable of solving much larger simulation models.

With MIMIC, ordinary differential equations describing mathematical models in several scientific disciplines as in engineering, physics, chemistry, biology, economics and as well as in social sciences can easily be solved by numerical integration and the results of the analysis are listed or drawn in diagrams. It also enables the analysis of nonlinear dynamic conditions.

The MIMIC software package, written as FORTRAN overlay programs, executes input statements of the mathematical model in six consecutive passes. Simulation programs written in MIMIC are compiled rather than interpreted. The core of the simulation package is a variable step numerical integrator of fourth-order Runge-Kutta method. Many useful functions related to electrical circuit elements exist besides some mathematical functions found in most scientific programming languages. There is no need to sort the statements in order of dependencies of the variables, since MIMIC does it internally.

Parts of the software organized in overlays are:

  • MIMIN (input)– reads in user simulation program and data,
  • MIMCO (compiler) – compiles the user program and creates an in-core array of instructions,
  • MIMSO (sort)– sorts the instructions array after dependencies of variables,
  • MIMAS (assembler) – converts the BCD instructions into machine-oriented code,
  • MIMEX (execute)– executes the user program by integrating,
  • MIMOUT (output)– puts out the data as a list or diagram of data.

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.[2]

If

f(t): Fish population over time (fish)
s(t): Shark population over time (sharks)
df / dt or [math]\displaystyle{ \dot f }[/math]: growth rate of fish population (fish/year)
ds / dt or [math]\displaystyle{ \dot s }[/math]: growth rate of shark population (sharks/year)
[math]\displaystyle{ \alpha }[/math]: growth rate of fish in the absence of sharks (1/year)
[math]\displaystyle{ \beta }[/math]: death rate per encounter of fish with sharks (1/sharks and year).
[math]\displaystyle{ \gamma }[/math]: death rate of sharks in the absence of their prey, fish (1/year)
[math]\displaystyle{ \epsilon }[/math]: efficiency of turning predated fish into sharks (sharks/fish)

then

[math]\displaystyle{ \dot f = \alpha f - \beta f s }[/math]
[math]\displaystyle{ \dot s = \epsilon \beta f s - \gamma s }[/math]

with initial conditions

[math]\displaystyle{ f(0) = f_o }[/math]
[math]\displaystyle{ s(0) = s_o }[/math]

The problem's constants are given as:

  • [math]\displaystyle{ f_o }[/math] = 600 fish
  • [math]\displaystyle{ s_o }[/math] = 50 sharks
  • [math]\displaystyle{ \alpha }[/math] = 0.7 fish/year
  • [math]\displaystyle{ \beta }[/math] = 0.007 fish/shark and year
  • [math]\displaystyle{ \gamma }[/math] = 0.5 shark/year
  • [math]\displaystyle{ \epsilon }[/math] = 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
<EOR>
600.       50.          50.
0.7        0.007        0.5         0.1
<EOF>

References

  1. Defense Technical Information Center[|permanent dead link|dead link}}]
  2. "Tutorial 2: Numerical Solutions of ODE's". Stanford University-Dept of Civil and Environmental Engineering, Environmental Fluid Mechanics Lab. 2002-08-19. Archived from the original on 2010-07-20. https://web.archive.org/web/20100720073318/http://fluid.stanford.edu/~fringer/teaching/numerical_methods_02/tutorials/tutorial2.pdf. Retrieved 2012-02-26. 
Notes