pycityagent 2.0.0a25__py3-none-any.whl → 2.0.0a26__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -104,6 +104,8 @@ class Simulator:
104
104
  self._bbox: tuple[float, float, float, float] = (-1, -1, -1, -1)
105
105
  self.poi_matrix_centers = []
106
106
  self._lock = asyncio.Lock()
107
+ # poi id dict
108
+ self.poi_id_2_aoi_id: dict[int, int] = {}
107
109
  # poi STRtree
108
110
  self.set_poi_tree()
109
111
 
@@ -146,6 +148,7 @@ class Simulator:
146
148
  for tree_id, poi in enumerate(self.map.pois.values()):
147
149
  tree_id_2_poi_and_catg[tree_id] = (poi, poi["category"])
148
150
  poi_geos.append(Point([poi["position"][k] for k in ["x", "y"]]))
151
+ self.poi_id_2_aoi_id[poi["id"]] = poi["aoi_id"]
149
152
  self.tree_id_2_poi_and_catg = tree_id_2_poi_and_catg
150
153
  self.pois_tree = STRtree(poi_geos)
151
154
 
@@ -250,12 +253,21 @@ class Simulator:
250
253
  _schedules = []
251
254
  for target_pos, _time, _mode in zip(target_positions, departure_times, modes):
252
255
  if isinstance(target_pos, int):
253
- aoi_id = target_pos
254
- end = {
255
- "aoi_position": {
256
- "aoi_id": aoi_id,
256
+ if target_pos >= POI_START_ID:
257
+ poi_id = target_pos
258
+ end = {
259
+ "aoi_position": {
260
+ "aoi_id": self.poi_id_2_aoi_id[poi_id],
261
+ "poi_id": poi_id,
262
+ }
263
+ }
264
+ else:
265
+ aoi_id = target_pos
266
+ end = {
267
+ "aoi_position": {
268
+ "aoi_id": aoi_id,
269
+ }
257
270
  }
258
- }
259
271
  else:
260
272
  aoi_id, poi_id = target_pos
261
273
  end = {"aoi_position": {"aoi_id": aoi_id, "poi_id": poi_id}}
@@ -1,3 +1,5 @@
1
+ from mosstool.map._map_util.const import AOI_START_ID, POI_START_ID
2
+
1
3
  POI_CATG_DICT = {
2
4
  "户外活动": [
3
5
  "bandstand",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycityagent
3
- Version: 2.0.0a25
3
+ Version: 2.0.0a26
4
4
  Summary: LLM-based城市环境agent构建库
5
5
  License: MIT
6
6
  Author: Yuwei Yan
@@ -21,10 +21,10 @@ pycityagent/environment/sim/person_service.py,sha256=5r1F2Itn7dKJ2U4hSLovrk5p4qy
21
21
  pycityagent/environment/sim/road_service.py,sha256=bKyn3_me0sGmaJVyF6eNeFbdU-9C1yWsa9L7pieDJzg,1285
22
22
  pycityagent/environment/sim/sim_env.py,sha256=HI1LcS_FotDKQ6vBnx0e49prXSABOfA20aU9KM-ZkCY,4625
23
23
  pycityagent/environment/sim/social_service.py,sha256=9EFJAwVdUuUQkNkFRn9qZRDfD1brh2fqkvasnXUEBhQ,2014
24
- pycityagent/environment/simulator.py,sha256=Vm8Rvczv20ETpAWhCYyxbnN25uoRyAv6DX7WoavjEVU,12446
24
+ pycityagent/environment/simulator.py,sha256=KVfwSwVGXPqUHQGyD9jv_RXRgGal2k7NloUFVdmWE8I,12943
25
25
  pycityagent/environment/utils/__init__.py,sha256=1m4Q1EfGvNpUsa1bgQzzCyWhfkpElnskNImjjFD3Znc,237
26
26
  pycityagent/environment/utils/base64.py,sha256=hoREzQo3FXMN79pqQLO2jgsDEvudciomyKii7MWljAM,374
27
- pycityagent/environment/utils/const.py,sha256=3RMNy7_bE7-23K90j9DFW_tWEzu8s7hSTgKbV-3BFl4,5327
27
+ pycityagent/environment/utils/const.py,sha256=1LqxnYJ8FSmq37fN5kIFlWLwycEDzFa8SFS-8plrFlU,5396
28
28
  pycityagent/environment/utils/geojson.py,sha256=LVHAdEhnZM8d0BoUnuPiIL_gaeXBIIglrLrfje5M0b4,661
29
29
  pycityagent/environment/utils/grpc.py,sha256=6EJwKXXktIWb1NcUiJzIRmfrY0S03QAXXGcCDHqAT00,1998
30
30
  pycityagent/environment/utils/map_utils.py,sha256=lYOEoCFFK6-e9N5txLMMq4HUlxMqc8Uw1YrGW5oJmgg,5749
@@ -70,6 +70,6 @@ pycityagent/workflow/block.py,sha256=l-z9iJo9_USZQRyj4TLMfihK0-tnNDG0a6jVk9WhG0o
70
70
  pycityagent/workflow/prompt.py,sha256=6jI0Rq54JLv3-IXqZLYug62vse10wTI83xvf4ZX42nk,2929
71
71
  pycityagent/workflow/tool.py,sha256=xADxhNgVsjNiMxlhdwn3xGUstFOkLEG8P67ez8VmwSI,8555
72
72
  pycityagent/workflow/trigger.py,sha256=Df-MOBEDWBbM-v0dFLQLXteLsipymT4n8vqexmK2GiQ,5643
73
- pycityagent-2.0.0a25.dist-info/METADATA,sha256=lB0qL357khfixTBH-M-cX2-FxCGhsD3IuUyPqVY07uI,8033
74
- pycityagent-2.0.0a25.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
75
- pycityagent-2.0.0a25.dist-info/RECORD,,
73
+ pycityagent-2.0.0a26.dist-info/METADATA,sha256=niz64Rm2ZNvVTtcluHfdvoGcTgtqGYUGrNqVb23L2us,8033
74
+ pycityagent-2.0.0a26.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
75
+ pycityagent-2.0.0a26.dist-info/RECORD,,