onstove.LPG.add_travel_time#
- LPG.add_travel_time(model: onstove.OnStove, lpg_path: str | None = None, friction_path: str | None = None, align: bool = False)[source]#
This method calculates the travel time needed to transport LPG.
The travel time is calculated as the time needed (in hours) to reach the closest LPG supplier from each population point. It uses a point layer for LPG suppliers, a friction layer and a population density layer. The function does not return anything but saves the travel time in the travel_time attribute of the LPG technology class.
- Parameters:
- model: OnStove model
Instance of the OnStove model containing the main data of the study case. See
onstove.OnStove
.- lpg_path: str
Path to the LPG supply points.
- friction_path: str
Path to the friction raster file describing the time needed (in minutes) to travel one meter within each cell using motorized transport.
- align: bool, default False
Boolean parameter to indicate if the friction layer need to be align with the population data in the model.