cecconifederico / BAMmodel

Agent-based computational economics (ACE)
0 stars 0 forks source link

Setting the parameter "v" to 0 cause a Division by zero error. #2

Open ambitious-octopus opened 4 years ago

ambitious-octopus commented 4 years ago

Setting the parameter "v" to 0 cause a Division by zero error.

Division by zero.
error while bank 604 running /
called by procedure CREDIT-MARKET
called by procedure GO
called by Button 'go'

org.nlogo.nvm.RuntimePrimitiveException: Division by zero.
at org.nlogo.prim._asm_procedurecreditmarket_setbreedvariable_1.perform(:2)
at org.nlogo.nvm.Context.runExclusive(Context.java:133)
at org.nlogo.nvm.ExclusiveJob.run(ExclusiveJob.scala:39)
at org.nlogo.nvm.Context.runExclusiveJob(Context.java:177)
at org.nlogo.prim._asm_procedurecreditmarket_ask_0.perform(:1)
at org.nlogo.nvm.Context.stepConcurrent(Context.java:107)
at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.scala:65)
at org.nlogo.job.JobThread.runPrimaryJobs(JobThread.scala:133)
at org.nlogo.job.JobThread.$anonfun$run$1(JobThread.scala:68)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.control.Exception$Catch.apply(Exception.scala:228)
at org.nlogo.api.Exceptions$.handling(Exceptions.scala:41)
at org.nlogo.job.JobThread.run(JobThread.scala:66)

NetLogo 6.1.1
main: org.nlogo.app.AppFrame
thread: JobThread
Java HotSpot(TM) 64-Bit Server VM 1.8.0_202 (Oracle Corporation; 1.8.0_202-b08)
operating system: Windows 10 10.0 (amd64 processor)
Scala version 2.12.8
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: [edit]bam_model

11:54:23.492 SwitchedTabsEvent (org.nlogo.app.Tabs) AWT-EventQueue-0
11:54:23.487 RuntimeErrorEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
11:54:23.470 JobRemovedEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) JobThread
11:54:23.441 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
11:54:23.441 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
11:54:23.441 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
11:54:23.441 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
11:54:23.441 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
11:54:23.441 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
11:54:23.441 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
StefSeSi commented 4 years ago

what if we just set the minimum of v at 0.01 (as 0.01 is the modification interval of the v slider)?