|
From: Mark R. D. <mdi...@la...> - 2002-12-27 22:31:18
|
Nick, Is it possible to also enforce some rules that IControllers need to support at least an empty constructor for "Beanish" related capabilities? This is an issue because, while BaseController does have an empty constructor, it isn't automatically available to classes that extend it. The reason I suggest this is that having an empty constructor and get/set methods provides for a clean separation between the creating of an object and its "configuration", something that is valuable in other areas of repast such as constructing models and then setting the model's properties. As well, for my work in jelly to be extensible (and easier to code) it would be benifical to have empty constructors available for the construction of IControllers. This constructor issue can be seen in both BatchController and ThinController. -Mark >> Hi, >> >> The new IController interface defines methods for executing (starting, >> stopping etc.) a simulation. The BaseController implements this >> Interface in an asynchronous way, that is, it creates a thread and >> executes scheduled actions in this thread. Start, stop etc. merely >> (oversimplifying a bit) start and stop this thread. The batch controller >> and gui controller add parameter handling on top of this. A new >> controller, Thin Controller, adds a bit more that is necessary for a >> non-abstract controller, but it still relies on BaseController to set up >> the thread. >> >> So, if you want a controller that not so asynchronous then what repast >> supplies won't work. However, it would be fairly easy to construct such >> a thing using BaseController as a model. In fact it sounds like all you >> want is to create a Schedule add actions to it for execution and then >> iterate over the Schedule calling execute some number of times. Again, >> looking at the code in Schedule and ScheduleBase would might help you >> out here. |