A simple implement for discrete events simulation.
Project description
Akatosh
This is a light weighted disceret event simulation library. The name is from the Dragon God of Time in Elder Scroll. :)
Install
pip install --upgrade Akatosh
How to use
Import modules:
from Akatosh import Mundus, Actor
create actors, aka event:
There are serveral ways that you can create an event:
-
Create an event with lambda expression
Actor(action = lambda: print("All hail dragonborn!"))
-
Create an event with defined functions:
#funtion without arguments def hail(): print("All hail dragonborn!") Actor(action = hail) #function with arguments def hail(message: str): print(message) Actor(action = hail, message = "All hail dragonborn!")
-
Create an event by subclass:
class Myevent(Actor): def action(self): print("All hail dragonborn!") Myevent()
To start the simulation,
Mundus.simulate(till=inf)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Akatosh-1.5.1.tar.gz
(8.5 kB
view hashes)
Built Distribution
Akatosh-1.5.1-py3-none-any.whl
(10.7 kB
view hashes)