Simulation
Interface for running simulations.
APISimulation
Bases: APISimulationInternal
Exposes functions for running simulations on server and adding simulation checkpoints.
Source code in src/rmlab/api/operations/simulation.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
trigger_simulation(scen_id, next=None)
async
Trigger a simulation run on a given scenario.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
next | Optional[datetime] | Checkpoint at which the simulation is stopped. Defaults to None. | None |
Raises:
Type | Description |
---|---|
ValueError | If the type of |
RuntimeError | If simulation failed for any reason |
Returns:
Type | Description |
---|---|
Tuple[ScenarioDates, ItemsCount, SchedulesCount, FlightsCount] | Summarized information of the scenario after the simulation finishes |
Source code in src/rmlab/api/operations/simulation.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
upload_checkpoints(scen_id, checkpoints)
async
Upload date checkpoints at which simulation is paused.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID in which the simulation is running | required |
checkpoints | List[datetime] | List of checkpoints | required |
Source code in src/rmlab/api/operations/simulation.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|