MASON-INTEREST-L Archives

February 2013

MASON-INTEREST-L@LISTSERV.GMU.EDU

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

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

Print Reply
Mime-Version:
1.0
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Subject:
From:
Nick Malleson <[log in to unmask]>
Date:
Thu, 14 Feb 2013 10:37:51 -0500
Content-Transfer-Encoding:
8bit
Content-Type:
text/plain; charset="ISO-8859-1"
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (36 lines)
Hi,

I'm using GeoMason to make a city simulation (agents walking along roads
between houses) but might have come across a bug. I want to get the road
network (a sim.&#8203;field.&#8203;network.Network object) from the field (a sim.&#8203;util.&#8203;
geo.&#8203;GeomPlanarGraph object) to find out if the graph is connected or not.

But the call to 'network.getNetwork()' causes the ClassCastException below.
You can re-create this bug in CampusWorld but putting 
'network.getNetwork();' anywhere (e.g. I currently have it as the first
thing to be done after the super.start() call in the CampusWorld.start()
method). See the output from CapusWorld below.

Any ideas?

Thanks,
Nick


MASON Version 17.  For further options, try adding ' -help' at end.
reading buildings layer
reading roads layer
reading walkways layer
Done reading data
Job: 0 Seed: -648980294
Starting sim.app.geo.campusworld.CampusWorld
Exception in thread "MASON Model: class sim.app.geo.campusworld.CampusWorld"
java.lang.ClassCastException: sim.util.geo.GeomPlanarGraphEdge cannot be
cast to com.vividsolutions.jts.planargraph.DirectedEdge
	at sim.util.geo.GeomPlanarGraph.getNetwork(GeomPlanarGraph.java:151)
	at sim.app.geo.campusworld.CampusWorld.start(CampusWorld.java:162)
	at sim.engine.SimState.doLoop(SimState.java:545)
	at sim.engine.SimState.doLoop(SimState.java:342)
	at sim.app.geo.campusworld.CampusWorld.main(CampusWorld.java:202)
Java Result: 1

ATOM RSS1 RSS2