farmingpy.apsim.APSIMXEnsemble#
- class APSIMXEnsemble(model: str | IModel, N=50, Ncores=-1)[source]#
Ensemble of APSIM simulation models. Requires custom build of APSIM from: mpastell/ApsimX
- __init__(model: str | IModel, N=50, Ncores=-1)[source]#
- Parameters:
model – Union[str, IModel] Base model for the ensemble. Path to .apsimx file or C# Models.Core.Simulations object Should contain single simulation with single field and needs to use TwinClock.
N – Number of ensemble members
Ncores – Number of cores to use, if -1 all physical cores are used.
Methods
__init__
(model[, N, Ncores])apply_fertilizer
(fertilizer)commence
()Commence the simulation
done
()Call at the end of simulation
fertilize_on
(date, fertilizer)Schedule a fertilization event at the specified date with the given fertilizer.
irrigate
(amount)irrigate_on
(date, amount)Schedule an irrigation event at the specified date with the given amount.
run
([reportclass])Run the simulation, custom class can be used to control reporting.
step
()Proceed with one day
Attributes
enddate
returns: Simulation end date :rtype: np.datetime64
today
returns: Current simulation date :rtype: np.datetime64