- class foxes.core.Engine(abc.ABC)[source]
Abstract base clas for foxes calculation engines
Attributes¶
- chunk_size_states: int
The size of a states chunk
- chunk_size_points: int
The size of a points chunk
- n_procs: int, optional
The number of processes to be used, or None for automatic
- verbosity: int
The verbosity level, 0 = silent
Public members¶
-
Engine(chunk_size_states=
None
, chunk_size_points=None
, ...)[source] Constructor.
- property entered
Flag that this model has been entered.
- property initialized
Initialization flag.
- initialize()[source]
Initializes the engine.
- property loop_dims
Gets the loop dimensions (possibly chunked)
-
select_subsets(*datasets, sel=
None
, isel=None
)[source] Takes subsets of datasets
-
calc_chunk_sizes(n_states, n_targets=
1
)[source] Computes the sizes of states and points chunks
- get_chunk_input_data(algo, model_data, farm_data, point_data, ...)[source]
Extracts the data for a single chunk calculation
- combine_results(algo, results, model_data, out_vars, ...)[source]
Combines chunk results into final Dataset
- abstract run_calculation(algo, model, model_data, farm_data, ...)[source]
Runs the model calculation
- classmethod new(engine_type, *args, **kwargs)[source]
Run-time engine factory.