aryagraph.sim.monte_carlo_schedule#

aryagraph.sim.monte_carlo_schedule(dag: Any, *, runs: int = 1000, workers: int | None = None, duration: str | float | Mapping | Callable = 'duration', jitter: Any = 'auto', policy: str | Callable = 'critical_path', failure_rate: float | str | Mapping = 0.0, max_retries: int = 0, resources: Mapping[str, float] | None = None, percentiles: tuple[float, ...] = (50, 80, 95), seed: int | Generator | None = None) → MonteCarloResult[source]#

Makespan distribution and task criticality by Monte Carlo.

With workers=None, no resources and no failures this is a pure critical-path (CPM/PERT) Monte Carlo, vectorised over the runs (O(runs · (n + m))). Otherwise every run is a full simulate_schedule().

jitter="auto" (the default) uses PERT durations when every task has min / mode / max attributes and no jitter otherwise; without jitter or failures all runs are identical.