foxes.core.Engine.combine_results(algo, results, model_data, out_vars, out_coords, n_chunks_states, n_chunks_targets, goal_data, iterative)[source]

Combines chunk results into final Dataset

Parameters

algo: foxes.core.Algorithm

The algorithm object

results: dict

The results from the chunk calculations, key: (chunki_states, chunki_targets), value: dict with numpy.ndarray values

model_data: xarray.Dataset

The initial model data

out_vars: list of str

Names of the output variables

out_coords: list of str

Names of the output coordinates

n_chunks_states: int

The number of states chunks

n_chunks_targets: int

The number of targets chunks

goal_data: foxes.core.Data

Either fdata or tdata

iterative: bool

Flag for use within the iterative algorithm

Returns

ds: xarray.Dataset

The final results dataset