Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: Re: Problems with simulating society ch4 section 4.3

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35571] Re: [mg35546] Re: Problems with simulating society ch4 section 4.3
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Fri, 19 Jul 2002 06:08:47 -0400 (EDT)
  • References: <ah3305$t1r$1@smc.vnet.net> <200207180706.DAA05316@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

It is difficult to reproduce your problem if you don't send a small sample
of the kind of data you're using. BTW, why do you call
Graphics`MultipleListPlot` twice (once with << and again with Needs)?

Tomas Garza
Mexico City
----- Original Message -----
From: "Katherine Geel" <katherine at .burgercom.co.za>
To: mathgroup at smc.vnet.net
Subject: [mg35571] [mg35546] Re: Problems with simulating society ch4 section 4.3


> I have now managed to sort out my problem, however I still cannot get the
> graphical plot to run for either of these two simulations. If anyone has
any
> ideas as to why MultipleListPLots sometimes just hang without giving any
> indication, could you please let me know.
> thanks
> Katherine Geel
> This is the attempted plot:
> avgResourceLevel[lat_, strat_] :=
>     (Apply[Plus, #]/Length[#]) &[
>       Cases[lat, {_, _, strat, _, x_} :> x, 2]];
> << Graphics`Graphics`
> << Graphics`MultipleListPlot`
> Needs["Graphics`MultipleListPlot`"]
> MultipleListPlot[
>   Map[avgResourceLevel[#, 1] &, results],
>   Map[avgResourceLevel[#, 0] &, results],
>   SymbolShape -> None,
>   PlotJoined -> True,
>   PlotLegend -> {"Good Guy", "Bad Guy"},
>   AxesLabel -> {"Time", "Resource Level"},
>   LegendShadow -> {-0.05, -0.05}]
>
> "Katherine Geel" <katherine at removethis.burgercom.co.za> wrote in message
> news:ah3305$t1r$1 at smc.vnet.net...
> > Hi
> > I am hoping that someone can help me as I am fairly desperate for an
> answer.
> > I am attempting to do two things: one to run a simulation from the
gaylord
> > and d'andria book "simulating society", the one on page89, section 4.3.
> For
> > some unknown reason the simulation runs, however the graphical plot just
> > hangs for ever and ever. My computer does have the necessary power so I
> > don't know what the problem is. The second thing I am trying to do is
run
> my
> > own (partly) simulation of the repeated prisoner's dilemma, with two
> types,
> > Tit-for-tat players and defectors, and have the two types interact, then
> > change their type depending on the average payoff in their immediate
Moore
> > neighbourhood, and then walk. For some reason I get the following error
> > which I have no idea how to get rid of ( this is why I am attempting to
> run
> > the section 4.3 simulation as it does something similar).
> >
> > I've attached the code of section 4.3 on the off chance someone knows
what
> > the problem is.
> >
> > [Contact the author to get the code - moderator]
> >
> > Thanks
> > Katherine Geel
> >
> >
>
>
>



  • Prev by Date: RE: Pattern Matching in Lists
  • Next by Date: RE: Re: Factoring question
  • Previous by thread: Re: Problems with simulating society ch4 section 4.3
  • Next by thread: RE: simplifying operator experessions with Dot, Times a nd Plus