xso.create
- xso.create(components, time_unit='d')[source]
Creates xsimlab Model instance, from dict of XSO components, automatically adding the necessary model backend, solver and time components.
It is a simple wrapper of the xsimlab Model constructor, and returns a fully functional Xarray-simlab model object with the XSO core, Solver and Time components added.
- Parameters:
components (dict) – Dictionary with component names as keys and classes (decorated with
component()) as values.time_unit (str, optional) – Unit of time to be used in the model. Default is ‘d’ for days. This has to be supplied at model creation, since the time unit is written to the immutable metadata of the model object.
- Returns:
model – Xarray-simlab model object with the XSO core, Solver and Time components added.
- Return type:
xsimlab.Model