pNeuma_simulator.initialization.initialization module

pNeuma_simulator.initialization.initialization.budget(v: float, lam: list[float], v0: list[float], d: list[float], lengths: list[float], L: float) float[source]

Calculates the remaining budget for road space allocation.

Parameters:
  • v – float or numpy array, representing the position of the vehicle(s).

  • lam – list of floats, representing the slopes for different vehicles.

  • v0 – list of floats, representing the desired speeds for different vehicles.

  • d – list of floats, representing the jam spacings for different vehicles.

  • lengths – list of floats, representing the lengths of different vehicles.

  • L – float, representing the total road space.

Returns:

float, representing the remaining budget for road space allocation.

Return type:

budget

pNeuma_simulator.initialization.initialization.f(x: float, lam: float, v0: float, d: float) float[source]

Calculates the flow of vehicles.

Parameters:
  • x – float or numpy array, representing the position of the vehicle(s).

  • lam – float, representing the slope.

  • v0 – float, representing the desired speed.

  • d – float, representing the jam spacing.

Returns:

float or numpy array, representing the flow of vehicles.

Return type:

y

pNeuma_simulator.initialization.initialization.ov(x: float, lam: float, v0: float, d: float) float[source]

Calculates the optimal velocity of a vehicle.

Parameters:
  • x – float or numpy array, representing the position of the vehicle(s).

  • lam – float, representing the slope.

  • v0 – float, representing the desired speed.

  • d – float, representing the jam spacing.

Returns:

float or numpy array, representing the optimal velocity of the vehicle(s).

Return type:

y

pNeuma_simulator.initialization.initialization.vo(x: float, lam: float, v0: float, d: float) float[source]

Calculates the velocity of a vehicle in free flow.

Parameters:
  • x – float or numpy array, representing the position of the vehicle(s).

  • lam – float, representing the slope.

  • v0 – float, representing the desired speed.

  • d – float, representing the jam spacing.

Returns:

float or numpy array, representing the velocity of the vehicle(s) in free flow.

Return type:

y