SimulationTaskManager
#
- class ansys.additive.core.simulation_task_manager.SimulationTaskManager#
Provides a manager for simulation tasks.
Overview#
Add a task to this manager. |
|
Get status of each operation stored in this manager. |
|
Wait for all simulations to finish. A simple loop that waits for each task will wait for the |
|
Cancel all simulations belonging to this simulation task manager. |
|
Get a list of the summaries of completed simulations only. |
Get the list of tasks managed by this manager. |
|
Get the list of the simulation ids managed by this manager. |
|
Check if all tasks are done. |
Import detail#
from ansys.additive.core.simulation_task_manager import SimulationTaskManager
Property detail#
- property SimulationTaskManager.tasks: list[ansys.additive.core.simulation_task.SimulationTask]#
Get the list of tasks managed by this manager.
Method detail#
- SimulationTaskManager.add_task(task: ansys.additive.core.simulation_task.SimulationTask)#
Add a task to this manager.
- Parameters:
- task: SimulationTask
The simulation task holding the long-running operation and corresponding server.
- SimulationTaskManager.status(progress_handler: ansys.additive.core.progress_handler.IProgressHandler | None = None) list[tuple[str, ansys.additive.core.progress_handler.Progress]] #
Get status of each operation stored in this manager.
- Parameters:
- progress_handler: IProgressHandler, None, default: None
Handler for progress updates. If
None
, no progress updates are provided.
- Returns:
List
of
tuples
with
each
tuple
containing
the
operation
name
and
an
instance
of
Progress
- SimulationTaskManager.wait_all(progress_handler: ansys.additive.core.progress_handler.IProgressHandler | None = None) None #
Wait for all simulations to finish. A simple loop that waits for each task will wait for the simulation that takes the longest. This works because wait returns immediately if operation is done.
- Parameters:
- progress_handler: IProgressHandler, None, default: None
Handler for progress updates. If
None
, no progress updates are provided.
- SimulationTaskManager.cancel_all() None #
Cancel all simulations belonging to this simulation task manager.
- SimulationTaskManager.summaries()#
Get a list of the summaries of completed simulations only.