additions to SimPy wiki.....
2009-07-04 10:03:12 GMT
I've been aware of SimPy for a number of years and have recently started to actively learn the feature set. Many problem domains I'm interested in would require simulation objects which do more that one thing at a time....so I've also been aware of the example that Klaus had posted for the Duck quacking and flying.
As part of my active learning, I converted the Duck example to the new OO API. It was a bit tricky getting the "zen" with simInstances usage in particular, so I've posted the converted example on the wiki to help anybody else who is in the learning stage.
I then extended the example so that the Duck had a chance to survive by parameterizing the hunter to be less than perfectly accurate on a shot, have limited ammunition, and get limited shots at a duck.
After than I extended THAT extension by adding a DuckFactory process to create a flock of ducks and added a second hunter.
All three examples are posted on the wiki as sections 4,5,6 here : http://www.mcs.vuw.ac.nz/cgi-bin/wiki/SimPy?SimPyHints
I had some fun doing this and hope it helps some others up the learning curve.
I'm thinking about doing some of the following: adding a HunterFactory, modifying Hunters to also be multiple process containers (like the Duck) and have them eat from stores of food, drink from levels of water, and (having known a few hunters)- "other beverages". Food/water stores would eventually be exhausted. So would "other beverages" but consumption there also could dynamically affecting their accuracy in shooting and give another interesting wrinkle in the simulation. Might be interesting to add some factors to add to the side-effect of steel shot build-up in the lake as a result of hunters missing their targets also.
--
Bob Dickenson
------------------------------------------------------------------------------
_______________________________________________ Simpy-users mailing list Simpy-users <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/simpy-users
RSS Feed