问题
I´m trying to use the NetLogo System Dynamics Modeler to control the behavior of individual agents. But when I set up the Modeler diagram, the code that is generated automatically includes variables (stocks, variables) as Global. Instead I would like these variable to be under turtles-own
, so that each agent runs the systems dynamic model autonomously.
If this is not possible, I guess I can go on writing the ODEs myself. But in doing this, is it best to solve the ODEs in R using the R-extension (I haven´t used R yet), or will this be slower than using Euler´s Method in the NetLogo Code?
回答1:
NetLogo's SDM doesn't allow this. (In general, the NetLogo SDM's capabilities are pretty rudimentary.)
But, if you already have an existing SDM model, you could at least use it as a starting point, by just copying the generated NetLogo code out of the SDM window's Code tab, pasting it into your model's main Code tab, and then taking it from there, starting with changing globals
to turtles-own
.
The output of the NetLogo SDM is just ordinary NetLogo code, no hidden magic, no special solver running in the background, just the code you see.
No idea about your second question — you might try asking that separately.
来源:https://stackoverflow.com/questions/29511719/netlogo-systems-dynamics-modeler-for-agents