Module vickrey.travel_times
Collection of functions expressing a theoretical travel time profile.
Functions
def asymm_gaussian(sigma_l=0.9, sigma_r=0.2, mu=9.5)
-
Expand source code
def asymm_gaussian(sigma_l=0.9, sigma_r=0.2, mu=9.5): """Piecewise defined function, made of two different gaussians.""" def left_gau(x): return jnp.exp(-((x - mu) ** 2) / sigma_l**2) def right_gau(x): return jnp.exp(-((x - mu) ** 2) / sigma_r**2) return lambda t: jnp.where(t < mu, left_gau(t), right_gau(t))
Piecewise defined function, made of two different gaussians.
def asymm_gaussian_plateau(sigma_l=0.9, sigma_r=0.2, mu=9.5, plateau_len=3)
-
Expand source code
def asymm_gaussian_plateau(sigma_l=0.9, sigma_r=0.2, mu=9.5, plateau_len=3): """Asymmetric gaussian with a constant zone at the maximum.""" def left_gau(x): return jnp.exp(-((x - mu) ** 2) / sigma_l**2) def right_gau(x): return jnp.exp(-((x - mu) ** 2) / sigma_r**2) def right_fun(t): return jnp.where( t - mu > plateau_len / 2, right_gau(t - plateau_len / 2), 1 ) return lambda t: jnp.where( t - mu < -plateau_len / 2, left_gau(t + plateau_len / 2), right_fun(t) )
Asymmetric gaussian with a constant zone at the maximum.