MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

mathematica comes of age as a scientific simulation tool.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8226] mathematica comes of age as a scientific simulation tool.
  • From: gaylord at ux1.cso.uiuc.edu (richard j. gaylord)
  • Date: Tue, 19 Aug 1997 21:12:06 -0400
  • Organization: university of illinois
  • Sender: owner-wri-mathgroup at wolfram.com

hi:

i just found that one big change between 2.2 and 3.0 is the memory useage
for Nest and NestList [this is very important for doing simulations.

the following program is used to model the social behavior of a society of
good and bad guys [for setails see the forthcoming book "Simulating
Society: A Mathematica Toolkit for Modeling Socioeconomic Behavior" to be
published by TELOS/Springer-Verlay.

the lattice is 50 by 50 [that's a matrix with 2500 values. 20% of the
elements are simply zero [representing empty sites] and 80% of the
elements are nested lists of the form {a, b, c, {list of 2000 numbers},
d}.

all of the elements (sites) this matrix (lattice) are updated
simulatnaeously (it's a cellular automata) over 1000 tiume steps.

the following results were obtained on an apple powerbook 3400/240 [a
phenomenal machine - may apple survive and thrive]

================

(* kernel quit and re-started here *)


the program using NestList is entered here:


MemoryInUse[]

845,848

SeedRandom[6]
Timing[dog = name[50, 0.8, {0.1, 0.2, 0.3, 0.4}, {4, 3, 1, 5}, 1000];]

{852.45 Second,Null}   

(* this took < 15 minutes. that's pretty good speed. note: this was done
on a 603e chip running at 240 MHtz. - imagine the speed on the new 604e
chip running at 350 MHtz. *)

MemoryInUse[]

69,663,584

MaxMemoryUsed[]

70,019,824   [70 Mb RAM needed to do calculation]

 69663584 - 845848

68,817,736   [69 Mb RAM consumed by calculation]


(* kernel quit and re-started here *)


the program using Nest is entered

MemoryInUse[]

845,832

SeedRandom[6]
Timing[cat = tit4tatNest[50, 0.8, {0.1, 0.2, 0.3, 0.4}, 
                         {4, 3, 1, 5}, 1000];]

{859.117 Second,Null}

MemoryInUse[]

1,196,008

MaxMemoryUsed[]

23,406,440   [24 Mb RAM needed to do calculation]

 1196008 - 845832

350,176   [350 K RAM consumed by calculation]

68817736/350176.

196.5


WOW!!!



another note: you can now watch 2-d simulations graphics  evolve within
the 3.0  notebook while the program is running [details are in the book
mentioned above]. this is REALLY useful [even essential] for simulation
epxeriments.


conclusion: 3.0.(.1.1) is an incredible improvement of mathematica for use
in computer simulations. i predict that within 5 years [maybe as soon as 1
year], it will be impossible [at least stupid] to use any other computer
environment to do this kind of stuff. mathematica is no longer useful for
only prototyping simulations that then have to be complelety re-written
and run in other [procedural, low-level language. 

i've been working with mathematica since 1987, waiting [and hoping] it
would eventually mature into a system for real [as opposed to
'toy']simulations.. it's finally reached early adulthood [post-teen].
part of this is of course the software and part of it is the hardware.

-- 
richard j. gaylord, university of illinois, gaylord at uiuc.edu

"What I cannot create, I do not understand"
           -Richard P. Feynman-


  • Prev by Date: L'Hopital's rule contradiction --- what am I messing up?
  • Next by Date: Re: Sorting Eigenvalues/EigenVectors
  • Previous by thread: Re: L'Hopital's rule contradiction --- what am I messing up?
  • Next by thread: Interpolation on irregular grid