repast-simphony

Repast Java: Creating a custom edge agent to schedule specific actions

南笙酒味 提交于 2021-02-10 09:33:15
问题 I have a model with a lot of edges (links) between different sorts of other agents (objects). I would like to model these edges as agents where I could add attributes and schedule actions. It is helpful to see a simple example of how to do this job? update: I followed your instructions and get an error when running the model: FATAL [Thread-2] 12:45:02,901 repast.simphony.ui.GUIScheduleRunner - RunTimeException when running the schedule Current tick (1.0) java.lang.RuntimeException: java.lang

Repast - PropertyGreaterThanEquals/PropertyLessThanEquals cause slow running speed

删除回忆录丶 提交于 2020-05-16 05:53:14
问题 I found that using the query methods “PropertyGreaterThanEquals” or "PropertyLessThanEquals" runs very much slower than using the method “PropertyEquals”. below is a simple example about query a suitable dock for truck to unload goods. public void match_dock() { // Query<Object> pre_fit = new PropertyGreaterThanEquals(context, "unload_speed", 240); // Query<Object> pre_fit = new PropertyLessThanEquals(context, "unload_speed", 240); Query<Object> pre_fit = new PropertyEquals(context, "unload

Repast: how to get a particular agent set based on the specific conditions?

耗尽温柔 提交于 2019-12-11 02:31:00
问题 I am previously working with Netlogo and there are some very good built-in methods that allow me to filter and control the desired agents from the total population. (see: http://ccl.northwestern.edu/netlogo/docs/dictionary.html#agentsetgroup). For instance, I could very easily to command the different class of people agent in a simulation with simple codes like: ask peoples with [wealth_type = "rich"] [donate money...] ask peoples with [wealth_type = "poor"] [get money from rich people...] In