The documentation for DESpy is rather minimal – partly due to my limited capacity (and the fact that I use Simkit for all my projects). However, it is does have all the essential features of Simkit in terms of modeling, with some exceptions due to limitations of Python itself. None of these are showstoppers, however. (For example, Python doesn’t support method overloading, which is a bit of a pain for directly porting Event Graph models that have overloaded event names.)
Specifically, it has the same event listener paradigm and the state notification features of Simkit, albeit with slightly different names. I try to code in the idioms of the language (although I’m sure that I code Python with a Java accent). I also uses the opportunity to correct some unfortunate names I used in Simkit. For example, the call to schedule an event is waitDelay() in Simkit, but schedule() in DESpy. Rather than firePropertyChange() in Simkit (which use Java’s PropertyChangeEvent objects), in DESpy the call is notify_state_change(). Also, I ditched the old value in these calls, since in Simkit that was something that came along with their PropertyChange approach.
So far, the material to get started is what I have presented in one or two lectures to the OA3302 class. I didn’t have time to go into the sim event listener approach, since only basic Event Graphs are taught, and I didn’t have time. I have put the materials on Gitlab here: https://github.com/ahbuss/Intro2DESpy.git
It has some slides, some documentation, and (probably most helpful) sample code in the oa3302 directory. Again, these are very basic examples.
The best way to install DESpy is from PyPi using pip (one of the best things about Python, in my opinion). In the DESpy Gihub repo, there are a number of examples that illustrate sim event listening and such (https://github.com/ahbuss/DESpy.git)
"SimPy is a process-based discrete-event simulation framework based on standard Python. Its event dispatcher is based on Python’s generators and can also be used for asynchronous networking or to implement multi-agent systems (with both, simulated and real communication)."
"Processes in SimPy are simple Python generator functions and are used to model active components like customers, vehicles or agents. SimPy also provides various types of shared resources to model limited capacity congestion points (like servers, checkout counters and tunnels). From version 3.1, it will also provide monitoring capabilities to aid in gathering statistics about resources and processes."
Good luck,
--
You received this message because you are subscribed to the Google Groups "python-simpy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-simpy...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-simpy/766bc8bb-2ddd-4514-9baa-5da1b14a47d5n%40googlegroups.com.