Skip to main content

A simple implement for discrete events simulation.

Project description

#Akatosh

Akatosh is a light-weighted disceret event simulation library. Unlike popular library Simpy which is progress-oriented and you have to write generator function for simulated events or events interaction, `Akatosh` is fully object-oriented that events are encapsulated as `InstantEvent`/`ContinousEvent` with states, priority and a life-cycle. The actual impact of events are simply regular python functions. You could create events all at once, or create event within event. In addition, `Akatosh` is async which means event that are happening at the same simulated time will be executed simultaneously for real, unless they have different priority.

Akatosh also support Resource, provide all functionalities as it is in Simpy with extra utilities for telemetries collection and interaction with Entity. The Entity is unique to Akatosh which represents a abstract entity with a life-cycle, for example a follower. The Entity supports utility functions to interact with `Resource` and automatically releases all its occupied resources upon termination.

You probably already noticed that Akatosh is the name of "Dragon God of Time" in elder scroll serie, therefore the singleton class Mundus is the core of the simulation. The Mundus will schedule the events, move forward time and engage async execution.

To use Akatosh:

pip install -U Akatosh

A basic example is showing below, for more information please look at Examples and API Reference, full documentation is available at https://ulfaric.github.io/Akatosh/.

import logging

from Akatosh import event, Mundus

# create two instant event at simulation time 1.0 and 5.0
@event(at=5)
def hellow_world_again():
    print(f"{Mundus.now}:\tHello World! Again!")


@event(at=1)
def hellow_world():
    print(f"{Mundus.now}:\tHello World!")

# enable debug message
Mundus.set_logger(logging.DEBUG)

# run simulation for 6s
Mundus.simulate(6)

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-2.1.3.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Akatosh-2.1.3-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file Akatosh-2.1.3.tar.gz.

File metadata

  • Download URL: Akatosh-2.1.3.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for Akatosh-2.1.3.tar.gz
Algorithm Hash digest
SHA256 b9a592c1d240e0f7ef2f74fb3ccf2d16e290d764e1d89ff95df0b660cc482459
MD5 3d7b1cd7c0f2093740e443c6bbf1abe5
BLAKE2b-256 b2ac48fdbe7f7578b3d5cea907d9514c327fee290b06d6edd43f60daf53ec76c

See more details on using hashes here.

File details

Details for the file Akatosh-2.1.3-py3-none-any.whl.

File metadata

  • Download URL: Akatosh-2.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for Akatosh-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 df14a3ebe6e8135a98ead8103511752fd9c3b77d34b8cf018702c55eb5072ddc
MD5 1e97fb86792e71c30afca1ee65fdea55
BLAKE2b-256 f73de392bb37882415c2d310bf07e7bc2e463b00e8304349b5c302961bed6a35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page