Skip to content

simulate_toggle_switch

simulate_toggle_switch(model_params, vol, gr, nsamples, ndim, Dt, K, dt=0.01)

Simulate snapshots from stochastic toggle-switch dynamics.

Parameters:

  • model_params (array-like of shape (7,)) –

    Toggle-switch parameters [a1, a2, b1, b2, k1, k2, n].

  • vol (float) –

    System volume scaling the stochastic term.

  • gr (float) –

    Growth-rate scale. Growth is active only when gr > 0.

  • nsamples (int) –

    Number of particles sampled at the initial time.

  • ndim (int) –

    State dimension.

  • Dt (float) –

    Snapshot interval in simulation time.

  • K (int) –

    Number of snapshots.

  • dt (float, default: 0.01 ) –

    Euler-Maruyama integration step.

Returns:

  • samples_full ( list of length K ) –

    samples_full[k] is an ndarray of shape (n_k, ndim), where n_k can increase across snapshots when growth is active.

  • tt ( ndarray of shape (K,) ) –

    Snapshot times.