create_ODE_system
- cubie.odesystems.create_ODE_system(dxdt: str | Iterable[str] | Callable, precision: type[float16] | type[float32] | type[float64] | dtype[float16] | dtype[float32] | dtype[float64] = <class 'numpy.float32'>, states: dict[str, float] | ~typing.Iterable[str] | None=None, observables: Iterable[str] | None = None, parameters: dict[str, float] | ~typing.Iterable[str] | None=None, constants: dict[str, float] | ~typing.Iterable[str] | None=None, drivers: Iterable[str] | dict[str, ~typing.Any] | None=None, user_functions: dict[str, ~typing.Callable] | None=None, name: str | None = None, strict: bool = False) SymbolicODE[source]
Create a
SymbolicODEfrom SymPy definitions.- Parameters:
dxdt – System equations defined as a single string, an iterable of equation strings in
lhs = rhsform, or a Python callable. When a callable is provided its signature must bef(t, y, ...)wheretis time,yis the state vector, and additional arguments map to parameters or constants. State access patterns supported:y[0](positional),y["name"](string),y.name(attribute). The return value must be a list, tuple, or dict of derivative expressions.states – State labels either as an iterable or as a mapping to default initial values.
observables – Observable variable labels to expose from the generated system.
parameters – Parameter labels either as an iterable or as a mapping to default values.
constants – Constant labels either as an iterable or as a mapping to default values.
drivers – External driver variable labels required at runtime. Accepts either an iterable of driver symbol names or a dictionary mapping driver names to default values or driver-array samples and configuration entries.
user_functions – Custom callables referenced within
dxdtexpressions.name – Identifier used for generated files. Defaults to the hash of the system definition.
precision – Target floating-point precision used when compiling the system.
strict – When
Truerequire every symbol to be explicitly categorised.
- Returns:
Fully constructed symbolic system ready for compilation.
- Return type: