Skip to content

Commit

Permalink
update pycityproto to version 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchenplus committed Nov 14, 2024
1 parent 87d53e8 commit 2996b76
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions mosstool/trip/generator/generate_from_od.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ def _get_mode_with_distribution(
V_bicycle = -0.1185 * bicycle_duration / 60
V = np.array([V_bus, V_subway, V_fuel, V_elec, V_bicycle])
V = np.exp(V)
_all_trip_modes = recalculate_trip_modes(profile, ALL_TRIP_MODES,available_trip_modes)
_all_trip_modes = recalculate_trip_modes(
profile, ALL_TRIP_MODES, available_trip_modes
)
V = recalculate_trip_mode_prob(profile, _all_trip_modes, V, available_trip_modes)
V = V / sum(V)
rng = np.random.default_rng(seed)
Expand Down Expand Up @@ -722,7 +724,7 @@ def generate_persons(
self,
od_matrix: np.ndarray,
areas: GeoDataFrame,
available_trip_modes: List[str] = ["drive", "walk", "bus", "subway","taxi"],
available_trip_modes: List[str] = ["drive", "walk", "bus", "subway", "taxi"],
departure_time_curve: Optional[list[float]] = None,
area_pops: Optional[list] = None,
person_profiles: Optional[list[dict]] = None,
Expand Down Expand Up @@ -958,7 +960,7 @@ def fill_person_schedules(
input_persons: List[Person],
od_matrix: np.ndarray,
areas: GeoDataFrame,
available_trip_modes: List[str] = ["drive", "walk", "bus", "subway","taxi"],
available_trip_modes: List[str] = ["drive", "walk", "bus", "subway", "taxi"],
departure_time_curve: Optional[list[float]] = None,
seed: int = 0,
) -> List[Person]:
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mosstool"
version = "1.0.22"
version = "1.0.23"
description = "MObility Simulation System toolbox "
authors = ["Jun Zhang <[email protected]>","Junbo Yan <[email protected]>"]
license = "MIT"
Expand Down Expand Up @@ -29,7 +29,7 @@ bs4 = "^0.0.2"
matplotlib = "^3.8.3"
generate-od = "^0.1"
path4gmns = "^0.9.8"
pycityproto = "^2.0.0a8"
pycityproto = "^2.0.1"

[tool.poetry.group.dev.dependencies]
pytest = "^8.1.1"
Expand Down

0 comments on commit 2996b76

Please sign in to comment.