solve_ivp

cubie.batchsolving.solver.solve_ivp(system: BaseODE | str | Callable | Iterable[str], y0: ndarray | Dict[str, ndarray], parameters: ndarray | Dict[str, ndarray] | None = None, drivers: Dict[str, object] | None = None, method: str = 'euler', duration: float = 1.0, settling_time: float = 0.0, t0: float = 0.0, save_variables: List[str] | None = None, summarise_variables: List[str] | None = None, grid_type: str = 'combinatorial', time_logging_level: str | None = None, nan_error_trajectories: bool = True, **kwargs: Any) SolveResult[source]

Solve a batch initial value problem.

Parameters:
  • system – System model defining the differential equations. Accepts a prebuilt BaseODE, or raw equations as a Python callable, an equation string, or an iterable of equation strings. Raw equations are converted with create_ODE_system(), taking state names and defaults from a y0 dict and parameter names and defaults from a parameters dict; for repeated solves of the same system, build it once with create_ODE_system and reuse a Solver instead.

  • y0 – Initial state values for each run as arrays or dictionaries mapping labels to arrays.

  • parameters – Parameter values for each run as arrays or dictionaries mapping labels to arrays.

  • drivers – Driver configuration to interpolate during integration.

  • method – Integration algorithm to use. Default is "euler".

  • duration – Total integration time. Default is 1.0.

  • settling_time – Warm-up period prior to storing outputs. Default is 0.0.

  • t0 – Initial integration time supplied to the solver. Default is 0.0.

  • save_variables (list of str, optional) – Variable names (states or observables) to save in time-domain output. None (default) saves all states and observables. An empty list [] explicitly saves no variables. When both save_variables and index parameters (saved_state_indices, saved_observable_indices) are provided, their union is used. For less overhead, you can provide indices directly, which don’t require the solver to look up variable names.

  • summarise_variables (list of str, optional) – Variable names (states or observables) to include in summary calculations. None (default) summarises the same variables that are saved. An empty list [] explicitly summarises no variables. When both summarise_variables and index parameters are provided, their union is used.

  • grid_type"verbatim" pairs each input vector while "combinatorial" produces every combination of provided values.

  • time_logging_level (str or None, default='default') – Time logging verbosity level. Options are ‘silent’, ‘default’, ‘verbose’, ‘debug’, None, or ‘None’ to disable timing.

  • nan_error_trajectories (bool, default=True) – When True (default), trajectories with nonzero solver status codes are automatically set to NaN, protecting users from analyzing invalid data. When False, all trajectories are returned with original values.

  • **kwargs – Additional keyword arguments passed to Solver.

Returns:

Result owning the solve’s host output buffers. as_numpy, as_numpy_per_summary, and as_pandas build RAM representations on demand; disk-backed results release their spill files on close() or context exit.

Return type:

SolveResult