Skip to content

Commit

Permalink
fix bug in engine.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweetnow committed Jan 6, 2025
1 parent c581d2f commit 327e1d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "python-moss"
version = "1.1.2"
version = "1.1.3"
description = "MObility Simulation System"
authors = [
{ name = "Jun Zhang", email = "[email protected]" },
Expand Down
6 changes: 3 additions & 3 deletions python/src/moss/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def get_finished_person_count(self) -> int:
"""
persons = self.fetch_persons()
status: NDArray[np.uint8] = persons["status"]
return (status == PersonStatus.FINISHED.value).sum()
return (status == FINISHED).sum()

def get_finished_person_average_traveling_time(self) -> float:
"""
Expand All @@ -539,7 +539,7 @@ def get_finished_person_average_traveling_time(self) -> float:
persons = self.fetch_persons()
status: NDArray[np.uint8] = persons["status"]
traveling_time = persons["traveling_time"]
return traveling_time[status == PersonStatus.FINISHED.value].mean()
return traveling_time[FINISHED].mean()

def get_running_person_average_traveling_time(self) -> float:
"""
Expand All @@ -557,7 +557,7 @@ def get_departed_person_average_traveling_time(self) -> float:
persons = self.fetch_persons()
status: NDArray[np.uint8] = persons["status"]
traveling_time = persons["traveling_time"]
return traveling_time[status != PersonStatus.SLEEP.value].mean()
return traveling_time[status != SLEEP].mean()

def get_road_lane_plan_index(self, road_index: int) -> int:
"""
Expand Down

0 comments on commit 327e1d8

Please sign in to comment.