MASON-INTEREST-L Archives

August 2015

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Content-Type:
text/plain; charset=utf-8
Date:
Thu, 13 Aug 2015 14:38:30 +0200
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Subject:
MIME-Version:
1.0
Message-ID:
Content-Transfer-Encoding:
7bit
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
From:
Axel Kowald <[log in to unmask]>
Parts/Attachments:
text/plain (23 lines)
Hello Everybody,

as in chapter 2.9 of the MASON19 manual
I'm using a function like getAgitationDistribution() to display a
histogram of some variable of my model. But since it is computationally
costly to calculate, I would like that MASON only calls this function
every 10 seconds or every 100 steps.

Although I can specify in the histogram that it should only be updated
after 10 seconds, it seems that my function is still called every step
(only the graphical update is restricted to 10 second intervals). I then
added something like "if schedule.getSteps()%100==0" to my code to
perform the calculation only every 100 steps. In principle that works
but now the histogram is only correctly displayed at step 100,200,300,
etc. For all other steps it shows nonsense because in those cases I
return an empty double[].

So what is the best way to solve this problem ?

Many thanks,
  Axel
 

ATOM RSS1 RSS2