pNeuma_simulator.initialization.initialization module
- pNeuma_simulator.initialization.initialization.budget(v: float, lam: list[float], v0: list[float], s0: 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.
s0 – 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, s0: float) float[source]
Calculates the derivate of the OV function.
- Parameters:
x – float or numpy array, representing vehicle spacing.
lam – float, representing the slope.
v0 – float, representing the desired speed.
s0 – float, representing the jam spacing.
- Returns:
float or numpy array, representing the derivative.
- Return type:
y
- pNeuma_simulator.initialization.initialization.ov(x: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], lam: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], v0: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], s0: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes][source]
Calculates the optimal velocity of a vehicle.
- Parameters:
x – float or numpy array, representing vehicle spacing.
lam – float, representing the slope.
v0 – float, representing the desired speed.
s0 – float, representing the jam spacing.
- Returns:
float or numpy array, representing the optimal velocity.
- Return type:
y
- pNeuma_simulator.initialization.initialization.vo(x: float, lam: float, v0: float, s0: float) float[source]
Calculates the velocity of a vehicle in free flow.
- Parameters:
x – float or numpy array, representing vehicle velocity.
lam – float, representing the slope.
v0 – float, representing the desired speed.
s0 – float, representing the jam spacing.
- Returns:
float or numpy array, representing optimal spacing.
- Return type:
y