fix running on windows

This commit is contained in:
Xuwznln
2025-09-28 14:21:48 +08:00
parent a8d4df9901
commit 297001221d
4 changed files with 5 additions and 4 deletions

0
README_CN.md Normal file
View File

View File

@@ -34,7 +34,7 @@ class ElevatorController(ABC):
self.debug = debug
self.elevators: List[Any] = []
self.floors: List[Any] = []
self.current_tick = 0
self.current_tick = -2
self.is_running = False
self.current_traffic_max_tick: Optional[int] = None
@@ -173,7 +173,7 @@ class ElevatorController(ABC):
"""内部初始化方法"""
self.elevators = elevators
self.floors = floors
self.current_tick = 0
self.current_tick = -2
# 调用用户的初始化方法
self.on_init(elevators, floors)

View File

@@ -186,7 +186,7 @@ class ElevatorSimulation:
traffic_file = self.traffic_files[self.current_traffic_index]
server_debug_log(f"Loading traffic from {traffic_file.name}")
try:
with open(traffic_file, "r") as f:
with open(traffic_file, "r", encoding="utf-8")as f:
file_data = json.load(f)
building_config = file_data["building"]
server_debug_log(f"Building config: {building_config}")

View File

@@ -36,7 +36,8 @@ setup(
"numpy>=1.20.0",
"matplotlib>=3.5.0",
"seaborn>=0.11.0",
"pandas>=1.3.0",
"pandas>=1.3.0",,
"flask
],
extras_require={
"dev": [