Skip to content

Integrator

integrator

SDE Integrator.

The SDE integrator stands at the top of the composition hierarchy in PySDE. It is composed of a scheme and a storage object, and drives the SDE integration process. To stick to the overall design goal of simplicity, PySDE only supports integration with constant step size. Due to its modularity, however, adaptive schemes can easily implemented with the lower-level components.

Classes:

Name Description
SDEIntegrator

Static step size SDE integrator.

pysde.integrator.SDEIntegrator

Static step size SDE integrator.

Methods:

Name Description
run

Run the integration process.

__init__

__init__(scheme: schemes.BaseScheme, storage: storages.BaseStorage) -> None

Initialize with a scheme and a storage object.

Parameters:

Name Type Description Default
scheme schemes.BaseScheme

SDE Integration scheme

required
storage storages.BaseStorage

Data storage object

required

run

run(initial_state: Real | npt.NDArray[np.floating], initial_time: Real, step_size: Real, num_steps: Annotated[int, Is[lambda x: x > 0]], progress_bar: bool = False) -> storages.BaseStorage

Run the integration process.

Parameters:

Name Type Description Default
initial_state Real | npt.NDArray[np.floating]

Initial state of the system, given for all trajectories with shape \(d_X \times N\)

required
initial_time Real

Initial time \(t_0\) of the stochastic process

required
step_size Real

Discrete step size \(\Delta t\)

required
num_steps int

Number of steps to integrate

required
progress_bar bool

Whether to display a progress bar

False

Returns:

Type Description
storages.BaseStorage

storages.BaseStorage: Storage object containing the SDE trajectory data