Skip to main content

Simpy based simulation engine with a visualization layer.

Project description

DEStiny

DEStiny is a discrete event simulation engine built on top of SimPy. It adds a layer of abstraction for recording simulation events (movement, stays) to be visualized in a frontend application.

It is designed for:

  • Any discrete event simulation where spatial visualization is key

With examples in place for

  • AGV (Automated Guided Vehicle) simulations

Installation

pip install destiny-sim

Quick Start

Here is a minimal example of a simulation recording:

import json
from destiny_sim.core.environment import RecordingEnvironment
from destiny_sim.core.simulation_entity import SimulationEntity
from destiny_sim.core.rendering import RenderingInfo, SimulationEntityType

# 1. Define your entities
class Robot(SimulationEntity):
    def get_rendering_info(self):
        return RenderingInfo(entity_type=SimulationEntityType.ROBOT)

# 2. Create the environment
env = RecordingEnvironment()
robot = Robot()

# 3. Define simulation logic
def robot_process(env, robot):
    # Record initial position
    env.record_stay(robot, x=0, y=0, start_time=env.now)
    yield env.timeout(1)
    
    # Move to (10, 10) over 5 seconds
    env.record_motion(
        entity=robot,
        start_time=env.now,
        end_time=env.now + 5,
        start_x=0, start_y=0,
        end_x=10, end_y=10
    )
    yield env.timeout(5)

env.process(robot_process(env, robot))

# 4. Run and Export
env.run(until=10)
recording = env.get_recording()

with open("recording.json", "w") as f:
    json.dump(recording.to_dict(), f, indent=2)

print("Simulation complete! saved to recording.json")

Features

  • RecordingEnvironment: Drop-in replacement for simpy.Environment that tracks entity states.
  • Spatial Graph: Includes GridSiteGraph for navigation and pathfinding.
  • AGV Logic: Built-in support for AGVs, Tasks, and Fleet Management.

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

destiny_sim-0.1.1.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

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

destiny_sim-0.1.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file destiny_sim-0.1.1.tar.gz.

File metadata

  • Download URL: destiny_sim-0.1.1.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for destiny_sim-0.1.1.tar.gz
Algorithm Hash digest
SHA256 58deba9d1160d38eabf292851ae8980d8f9be8951b65dffed6e2809e4792f6bf
MD5 e4a2b15a4d63a664c88f1d4f072e27ce
BLAKE2b-256 2e8c5844130dee1c7cef9e8c29383ac66ab6295a186397f7fc3e80e4b7e3e447

See more details on using hashes here.

File details

Details for the file destiny_sim-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for destiny_sim-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 526a763f052329b27e2c9b99802ce4b8ac5698dafdf24258925094f694367568
MD5 ace8e530701eeeab0c4006fa837dfe61
BLAKE2b-256 7c3b1703d0329783cc9aabb8568c377bdc7940ffe8e13a3ddb779fee06dfcea2

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