MASON-INTEREST-L Archives

August 2015

MASON-INTEREST-L@LISTSERV.GMU.EDU

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

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

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Thu, 13 Aug 2015 16:48:27 +0200
Content-Type:
multipart/mixed
Parts/Attachments:
text/plain (266 bytes) , ChartingPropertyInspector.java (20 kB) , text/plain (20 kB)
On Aug 13, 2015, at 3:44 PM, Axel Kowald <[log in to unmask]> wrote:

> that does not seem to work :-(
> globalAttributes.interval is always 1, irrespective of what I specify in
> the histogram GUI.
> Is that what it should be like ?

Try this (or grab it off of GitHub):





I'd forgotten that you're using histograms, not time series. I have to think a bit more deeply about how to this "right", but here's what I've got so far.

The general process is as follows. Every timestep MASON decides whether to call your method to gather some data. Let's call that GATHERING. THEN it decides whether to add it to a current temporary collection of data. Let's call that ADDING. THEN when redrawing, it'll dump this temporary collection of data into the chart and redraw, then clear the collection. Let's call that REDRAWING.

If you're doing a time series, you're presented with the options:
Add Data every [...] timesteps
Using [Current/Min/Max/Mean]
Redraw [...]

If you're doing anything else, you're presented with the options:
Add Data every [...] timesteps
Redraw [...]

1. IF you're doing a time series, AND you're using "Current", then GATHERING only happens when your're ADDING. Otherwise, GATHERING happens every single timestep because it has to build a min/max/mean value over all the timesteps.

2. IF you're not doing a timeseries, then GATHERING only happens when you're ADDING.

So in your case you can do something like "Add Data every 1000 timesteps" and "Redraw when adding data", or whatnot, and you'll get what you're looking for.

The right way to do this is to separate out these three steps -- but I'm concerned that this will be too confusing in the name of features/gizmos.

The other right way to do this is to only do GATHERING and ADDING when you're doing REDRAWING in the case of non-timeseries. That's slightly nontrivial to code up so I'll have to think more about it. But at least this should work for the moment.

Sean






ATOM RSS1 RSS2