pyfracval.batch_runner ====================== .. py:module:: pyfracval.batch_runner .. autoapi-nested-parse:: Batch generation of multiple aggregates in parallel using Dask. This module provides functionality to generate multiple fractal aggregates in parallel via a Dask distributed scheduler — either a local cluster or a remote one (e.g. ``tcp://host:8786``). Each trial is submitted as an independent Dask task, so workers can be on any machine that is part of the Dask cluster. Module Contents --------------- .. py:function:: generate_aggregates_parallel(n_aggregates, config, output_base_dir = 'RESULTS', seed_start = 1000, n_workers = None, show_progress = True, scheduler_address = None) Generate multiple fractal aggregates in parallel via Dask. :param n_aggregates: Number of aggregates to generate. :param config: Simulation configuration dictionary (N, Df, kf, rp_g, rp_gstd, …). :param output_base_dir: Base directory for output files (default: ``"RESULTS"``). :param seed_start: Starting random seed. Aggregate *i* uses ``seed_start + i``. :param n_workers: Workers for a local cluster. Ignored when *scheduler_address* is set. :param show_progress: Show a ``tqdm`` progress bar while futures complete. :param scheduler_address: Remote Dask scheduler address (e.g. ``"tcp://host:8786"``). ``None`` → start a ``LocalCluster``. :returns: One ``(success, coords, radii)`` tuple per aggregate, in submission order. :rtype: list[tuple[bool, np.ndarray | None, np.ndarray | None]] .. py:function:: generate_aggregates_sequential(n_aggregates, config, output_base_dir = 'RESULTS', seed_start = 1000) Generate multiple aggregates sequentially (for comparison/debugging). :param n_aggregates: Number of aggregates to generate. :param config: Simulation configuration dictionary. :param output_base_dir: Base directory for output files (default: ``"RESULTS"``). :param seed_start: Starting random seed. :returns: One ``(success, coords, radii)`` tuple per aggregate. :rtype: list[tuple[bool, np.ndarray | None, np.ndarray | None]]