pycityagent 2.0.0a30__py3-none-any.whl → 2.0.0a31__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.
@@ -409,6 +409,50 @@ class AgentGroup:
409
409
  else:
410
410
  for agent in self.agents:
411
411
  _date_time = datetime.now(timezone.utc)
412
+ try:
413
+ nominal_gdp = await agent.memory.get("nominal_gdp")
414
+ except:
415
+ nominal_gdp = []
416
+ try:
417
+ real_gdp = await agent.memory.get("real_gdp")
418
+ except:
419
+ real_gdp = []
420
+ try:
421
+ unemployment = await agent.memory.get("unemployment")
422
+ except:
423
+ unemployment = []
424
+ try:
425
+ wages = await agent.memory.get("wages")
426
+ except:
427
+ wages = []
428
+ try:
429
+ prices = await agent.memory.get("prices")
430
+ except:
431
+ prices = []
432
+ try:
433
+ inventory = await agent.memory.get("inventory")
434
+ except:
435
+ inventory = 0
436
+ try:
437
+ price = await agent.memory.get("price")
438
+ except:
439
+ price = 0.0
440
+ try:
441
+ interest_rate = await agent.memory.get("interest_rate")
442
+ except:
443
+ interest_rate = 0.0
444
+ try:
445
+ bracket_cutoffs = await agent.memory.get("bracket_cutoffs")
446
+ except:
447
+ bracket_cutoffs = []
448
+ try:
449
+ bracket_rates = await agent.memory.get("bracket_rates")
450
+ except:
451
+ bracket_rates = []
452
+ try:
453
+ employees = await agent.memory.get("employees")
454
+ except:
455
+ employees = []
412
456
  _status_dict = {
413
457
  "id": agent._uuid,
414
458
  "day": await self.simulator.get_simulator_day(),
@@ -418,20 +462,17 @@ class AgentGroup:
418
462
  "parent_id": -1,
419
463
  "action": "",
420
464
  "type": await agent.memory.get("type"),
421
- "nominal_gdp": await agent.memory.get("nominal_gdp"),
422
- "real_gdp": await agent.memory.get("real_gdp"),
423
- "unemployment": await agent.memory.get("unemployment"),
424
- "wages": await agent.memory.get("wages"),
425
- "prices": await agent.memory.get("prices"),
426
- "inventory": await agent.memory.get("inventory"),
427
- "price": await agent.memory.get("price"),
428
- "interest_rate": await agent.memory.get("interest_rate"),
429
- "bracket_cutoffs": await agent.memory.get(
430
- "bracket_cutoffs"
431
- ),
432
- "bracket_rates": await agent.memory.get("bracket_rates"),
433
- "employees": await agent.memory.get("employees"),
434
- "customers": await agent.memory.get("customers"),
465
+ "nominal_gdp": nominal_gdp,
466
+ "real_gdp": real_gdp,
467
+ "unemployment": unemployment,
468
+ "wages": wages,
469
+ "prices": prices,
470
+ "inventory": inventory,
471
+ "price": price,
472
+ "interest_rate": interest_rate,
473
+ "bracket_cutoffs": bracket_cutoffs,
474
+ "bracket_rates": bracket_rates,
475
+ "employees": employees,
435
476
  "created_at": _date_time,
436
477
  }
437
478
  _statuses_time_list.append((_status_dict, _date_time))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycityagent
3
- Version: 2.0.0a30
3
+ Version: 2.0.0a31
4
4
  Summary: LLM-based城市环境agent构建库
5
5
  License: MIT
6
6
  Author: Yuwei Yan
@@ -50,7 +50,7 @@ pycityagent/metrics/__init__.py,sha256=X08PaBbGVAd7_PRGLREXWxaqm7nS82WBQpD1zvQzc
50
50
  pycityagent/metrics/mlflow_client.py,sha256=g_tHxWkWTDijtbGL74-HmiYzWVKb1y8-w12QrY9jL30,4449
51
51
  pycityagent/metrics/utils/const.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  pycityagent/simulation/__init__.py,sha256=P5czbcg2d8S0nbbnsQXFIhwzO4CennAhZM8OmKvAeYw,194
53
- pycityagent/simulation/agentgroup.py,sha256=0uMoRBektdK9WEXmqYT2gASg42CtS6JjaQ7slP8IWkY,22011
53
+ pycityagent/simulation/agentgroup.py,sha256=dyUnl76ZlO9ZDwCVtg6hB98dkXSurUsD0ADJyGIlP_I,23587
54
54
  pycityagent/simulation/simulation.py,sha256=9kkdgXSEOAN8wiewVFyORksti4IdVNU0opObV6ZYa9k,23344
55
55
  pycityagent/simulation/storage/pg.py,sha256=qGrYzJIAzjv8-d3-cle0rY0AN6XB6MgnHkFLBoLmKWU,7251
56
56
  pycityagent/survey/__init__.py,sha256=rxwou8U9KeFSP7rMzXtmtp2fVFZxK4Trzi-psx9LPIs,153
@@ -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.0a30.dist-info/METADATA,sha256=-90FMQJqglDQxlQnjqA8r0IA6DbCGA6qS-n78RIwWqE,8033
74
- pycityagent-2.0.0a30.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
75
- pycityagent-2.0.0a30.dist-info/RECORD,,
73
+ pycityagent-2.0.0a31.dist-info/METADATA,sha256=T-AOPv84-eFtT35uA3WvqIpCkQGoCuxR-Tl_zfSqefI,8033
74
+ pycityagent-2.0.0a31.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
75
+ pycityagent-2.0.0a31.dist-info/RECORD,,