|
From: Nick C. <vze...@ve...> - 2001-12-17 19:42:10
|
Hi, I've re-written and added some code to the repast parts responsible for visualizing network models. I'm writing because this changes the canonical way to write such code. The old system was to wrap nodes in drawable nodes such that all the network behavior was forward from the drawable to the wrapped node. This worked okay for simple models, but caused confusion in more complicated models and made it difficult for nodes to change their shape. All this was precipitated by comments Skye made last summer and more particularly trying to help a U. of C. student with her model. The new code works in a similar way, wrapping the drawable in a node. Drawable behavoir is forwarded from the node to the drawable. The drawables are bit different here and it is much easier to swap them in and out, changing the drawing behavior of the node. I've re-written jiggle to reflect the changes - a bit less code, and much cleaner and less confusing. Note that this only changes the canonical way to write such models, the old way still works fine as long as you can keep it straight. I'm going to re-write Skye's JinGirModel so that it uses the new mechanism and can be included as a demo in the next release as an example of a real network model, something we've needed for a while now. Nick -- Nick Collier Social Science Research Computing University of Chicago http://repast.sourceforge.net |