Skip to content

Pause/Resume simulation #94

@maxfischer2781

Description

@maxfischer2781

Short description of the feature
Allow to pause the simulation and later on resume it.

Describe the solution you'd like
Simulation code should be able to pause at any time. This freezes the current simulation state.

async def some_activity():
     if time == 20:
        await usim.resume  # new call to pause simulation until resumed

Each simulation is represented by an object. usim.run returns this object when the simulation is frozen. The object allows unfreezing:

simulation = usim.run(some_activity())
print("Current state:", simulation)
simulation.resume()

Describe alternatives and the context you have considered
There is currently no way to freeze a simulation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions