ra2ce.analysis.losses.traffic_analysis package#

Submodules#

ra2ce.analysis.losses.traffic_analysis.accumulated_traffic_dataclass module#

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class AccumulatedTraffic(utilitarian=0.0, egalitarian=0.0, prioritarian=0.0)[source]#

Bases: object

Parameters:
  • utilitarian (float)

  • egalitarian (float)

  • prioritarian (float)

egalitarian: float = 0.0#
prioritarian: float = 0.0#
utilitarian: float = 0.0#

ra2ce.analysis.losses.traffic_analysis.equity_analysis module#

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class EquityAnalysis(road_network, od_table, equity_data)[source]#

Bases: TrafficAnalysisBase

Specialization from TrafficAnalysisBase which takes into account the equity data (weights per region).

Parameters:
  • road_network (GeoDataFrame)

  • od_table (GeoDataFrame)

  • equity_data (DataFrame)

equity_data: DataFrame#
od_table: GeoDataFrame#
road_network: GeoDataFrame#

ra2ce.analysis.losses.traffic_analysis.traffic_analysis module#

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class TrafficAnalysis(road_network, od_table)[source]#

Bases: TrafficAnalysisBase

Parameters:
  • road_network (GeoDataFrame)

  • od_table (GeoDataFrame)

od_table: GeoDataFrame#
road_network: GeoDataFrame#

ra2ce.analysis.losses.traffic_analysis.traffic_analysis_base module#

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class TrafficAnalysisBase[source]#

Bases: ABC

od_table: GeoDataFrame#

Gets the optimal routes based on utilitarian, egalitarian and prioritarian traffic.

Return type:

DataFrame

Returns:

pd.DataFrame: Datafarme with the traffic indices for each of analysis.

road_network: GeoDataFrame#

ra2ce.analysis.losses.traffic_analysis.traffic_analysis_factory module#

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class TrafficAnalysisFactory[source]#

Bases: object

static get_analysis(road_network, od_table, equity_data)[source]#

Gets an instance of an TrafficAnalysisBase based on whether equity_data is provided or not.

Return type:

TrafficAnalysisBase

Parameters:
  • road_network (GeoDataFrame)

  • od_table (GeoDataFrame)

  • equity_data (DataFrame)

Args:

road_network (gpd.GeoDataFrame): General dataframe for the road network to analyze. od_table (gpd.GeoDataFrame): Origins - destination table dataframe. equity_data (pd.DataFrame): Dataframe contaning region - weight information.

Returns:

TrafficAnalysisBase: Object to make an equity analysis.

static read_equity_weights(equity_weight_file)[source]#

Reads the equity data from a geojson fileand loads it into a pandas dataframe.

Return type:

DataFrame

Parameters:

equity_weight_file (Path)

Args:

equity_weight_file (Path): File containing values of region and weight.

Returns:

pd.DataFrame: Dataframe representing the geojson data.

Module contents#