0

I want to study on Agent Based Modeling in ArcGIS with Agent Analyst extension. I'm doing the tutorials of the book that is written by Kevin M.Johnston (http://resources.arcgis.com/en/help/agent-analyst/) In Chapter 6 there is an exercise about agents on network. I'm not experienced on Java therefore I can not make a comment about the errors Java give. I want to implement the codes on sample work into my study with changing the destination paths and parameters (Figures below).

enter image description here

enter image description here

It is compiled but it gives the error below.

"Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "Active" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1222) at java.lang.Float.valueOf(Float.java:388) at java.lang.Float.(Float.java:489) at default_package.Exercise3.setupPlaces(Unknown Source) at default_package.Exercise3.initAgents(Unknown Source) at default_package.Exercise3._build(Unknown Source) at uchicago.src.simbuilder.base.gis.GISSimModelImpl.begin(GISSimModelImpl.java:107) at uchicago.src.sim.engine.BaseController.beginModel(BaseController.java:331) at uchicago.src.sim.engine.AbstractGUIController.beginModel(AbstractGUIController.java:218) at uchicago.src.sim.engine.Controller.beginModel(Controller.java:646) at uchicago.src.sim.engine.BaseController.startSim(BaseController.java:346) at uchicago.src.sim.engine.Controller.startSim(Controller.java:602) at uchicago.src.sim.engine.Controller$2.actionPerformed(Controller.java:388) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.Component.processMouseEvent(Component.java:6297) at javax.swing.JComponent.processMouseEvent(JComponent.java:3275) at java.awt.Component.processEvent(Component.java:6062) at java.awt.Container.processEvent(Container.java:2039) at java.awt.Component.dispatchEventImpl(Component.java:4660) at java.awt.Container.dispatchEventImpl(Container.java:2097) at java.awt.Component.dispatchEvent(Component.java:4488) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166) at java.awt.Container.dispatchEventImpl(Container.java:2083) at java.awt.Window.dispatchEventImpl(Window.java:2489) at java.awt.Component.dispatchEvent(Component.java:4488) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:674) at java.awt.EventQueue.access$400(EventQueue.java:81) at java.awt.EventQueue$2.run(EventQueue.java:633) at java.awt.EventQueue$2.run(EventQueue.java:631) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98) at java.awt.EventQueue$3.run(EventQueue.java:647) at java.awt.EventQueue$3.run(EventQueue.java:645) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:644) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)"

enter image description here

Is there any one encountered this problem?

closed as unclear what you're asking by whyzar, aldo_tapia, nmtoken, xunilk, Dan C Apr 9 '18 at 17:25

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Please always present any code and error messages as text rather than pictures so that they are available to future searches by anyone with the same problem. – PolyGeo Feb 5 '18 at 8:42
  • 1
    Cross-posted as stackoverflow.com/q/48623517/820534 – PolyGeo Feb 6 '18 at 11:46
1

Due to my limited Java experience I can't really completely help you unfortunately, but seeing the answer is taking a bit of time, I hope to be able to get you on your way again.

The actual error is in the first line:

"Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "Active"

Where NumberFormatException is the error you're looking for. In the second line we can see what the problem is:

at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1222)

Where FloatingDecimal.readJavaFormatString comes up. At this point I'm not sure, I'm guessing that it is expecting a decimal (float) input, but getting something else? I would suggest reading further into this on SO, for a possible answer.

Otherwise: as Java is an object-oriented language try to use your IDE's debugger to step into the error and see what object is "Active" at the moment the error is thrown.

It might also be better to ask this question on StackOverflow instead, where the actual Java programmers are at. Java is used very little in GIS (from personal experience).

Not the answer you're looking for? Browse other questions tagged or ask your own question.