Context problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Context problem

cnietocoria
Hello, 

My project implements GIS agents, adding agents from the a shapefile. The problem is that I cannot schedule tasks in the context class. I tested it implementing a method that just print something on the console. Although it never on the console is showed. 

Then I tried to access a constant that is  declared in the context, and print it, but just is showing this: 

ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0

Now lets supose that I have to remove some agents from the context. Then I have got the next error: 

FATAL [Thread-27] 16:38:30,242 repast.simphony.ui.GUIScheduleRunner - RunTimeException when running the schedule
Current tick (26.0)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at repast.simphony.engine.schedule.DynamicTargetAction.execute(DynamicTargetAction.java:72)
at repast.simphony.engine.controller.ScheduledMethodControllerAction$ScheduleMethodAllAction.execute(ScheduledMethodControllerAction.java:333)
at repast.simphony.engine.schedule.DefaultAction.execute(DefaultAction.java:38)
at repast.simphony.engine.schedule.ScheduleGroup.executeList(ScheduleGroup.java:206)
at repast.simphony.engine.schedule.ScheduleGroup.execute(ScheduleGroup.java:227)
at repast.simphony.engine.schedule.Schedule.execute(Schedule.java:352)
at repast.simphony.ui.GUIScheduleRunner$ScheduleLoopRunnable.run(GUIScheduleRunner.java:52)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at context.Chronos$$FastClassByCGLIB$$522440d1.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at repast.simphony.engine.schedule.DynamicTargetAction.execute(DynamicTargetAction.java:69)
... 7 more
Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
at java.util.ArrayList$Itr.next(Unknown Source)
at repast.simphony.util.collections.DelegatedIterator.next(DelegatedIterator.java:44)
at org.apache.commons.collections15.iterators.IteratorChain.next(IteratorChain.java:271)
at context.Chronos.updatingHexagonalGrid(Chronos.java:170)
... 10 more

So, lets supose that I just take off the methods that has errors, well the model excutes without fail, but in the console when the excecution is stopped, shows this output: 


Exception in thread "AWT-EventQueue-0" org.jfree.data.general.SeriesException: X-value already exists.
at org.jfree.data.xy.XYSeries.add(XYSeries.java:539)
at org.jfree.data.xy.XYSeries.add(XYSeries.java:491)
at org.jfree.data.xy.XYSeries.add(XYSeries.java:412)
at repast.simphony.chart2.XYDataSinkSourceSeries$Updater.run(XYDataSinkSourceSeries.java:58)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Sorry for the long post, 

Cheers, 
--
--------------------------------------------------------------
PhD. Student at University of Camerino
Ing. Cesar Augusto Nieto Coria
skype: cnietocoria


------------------------------------------------------------------------------

_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Context problem

Tatara, Eric R.
The errors "SEVERE: Retrieval failed for http://" are due to an internet connectivity issue from the GIS display trying to get map data from one of the default satellite image layers.  This happens occasionally and is not related to any model behavior issues.

The second issue is due to a concurrent modification problem in one of the collection classes in your context.  I suspect you might be iterating over a collection and trying to remove agents from it at the same time, which will throw the error.  My usual approach to this is to create a second collection, say a list, and add the objects to be removed from the list during the iteration loop, and after the iteration loops is finished then iterate over the objects to be removed in the second list and remove them from the first.

Eric Tatara, PhD, PE
Software Engineer
Global Security Sciences Division
Argonne National Laboratory

From: Cesar Nieto Coria [[hidden email]]
Sent: Wednesday, August 31, 2016 9:50 AM
To: [hidden email]
Subject: [Repast-interest] Context problem

Hello, 

My project implements GIS agents, adding agents from the a shapefile. The problem is that I cannot schedule tasks in the context class. I tested it implementing a method that just print something on the console. Although it never on the console is showed. 

Then I tried to access a constant that is  declared in the context, and print it, but just is showing this: 

ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:29 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
ago 31, 2016 4:02:31 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for http://worldwind47.arc.nasa.gov/topo?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0

Now lets supose that I have to remove some agents from the context. Then I have got the next error: 

FATAL [Thread-27] 16:38:30,242 repast.simphony.ui.GUIScheduleRunner - RunTimeException when running the schedule
Current tick (26.0)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at repast.simphony.engine.schedule.DynamicTargetAction.execute(DynamicTargetAction.java:72)
at repast.simphony.engine.controller.ScheduledMethodControllerAction$ScheduleMethodAllAction.execute(ScheduledMethodControllerAction.java:333)
at repast.simphony.engine.schedule.DefaultAction.execute(DefaultAction.java:38)
at repast.simphony.engine.schedule.ScheduleGroup.executeList(ScheduleGroup.java:206)
at repast.simphony.engine.schedule.ScheduleGroup.execute(ScheduleGroup.java:227)
at repast.simphony.engine.schedule.Schedule.execute(Schedule.java:352)
at repast.simphony.ui.GUIScheduleRunner$ScheduleLoopRunnable.run(GUIScheduleRunner.java:52)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at context.Chronos$$FastClassByCGLIB$$522440d1.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at repast.simphony.engine.schedule.DynamicTargetAction.execute(DynamicTargetAction.java:69)
... 7 more
Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
at java.util.ArrayList$Itr.next(Unknown Source)
at repast.simphony.util.collections.DelegatedIterator.next(DelegatedIterator.java:44)
at org.apache.commons.collections15.iterators.IteratorChain.next(IteratorChain.java:271)
at context.Chronos.updatingHexagonalGrid(Chronos.java:170)
... 10 more

So, lets supose that I just take off the methods that has errors, well the model excutes without fail, but in the console when the excecution is stopped, shows this output: 


Exception in thread "AWT-EventQueue-0" org.jfree.data.general.SeriesException: X-value already exists.
at org.jfree.data.xy.XYSeries.add(XYSeries.java:539)
at org.jfree.data.xy.XYSeries.add(XYSeries.java:491)
at org.jfree.data.xy.XYSeries.add(XYSeries.java:412)
at repast.simphony.chart2.XYDataSinkSourceSeries$Updater.run(XYDataSinkSourceSeries.java:58)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Sorry for the long post, 

Cheers, 
--
--------------------------------------------------------------
PhD. Student at University of Camerino
Ing. Cesar Augusto Nieto Coria
skype: cnietocoria


------------------------------------------------------------------------------

_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Loading...