pycityagent 2.0.0a26__py3-none-any.whl → 2.0.0a27__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.
| @@ -271,7 +271,6 @@ class AgentGroup: | |
| 271 271 | 
             
                                elif "lane_position" in position:
         | 
| 272 272 | 
             
                                    parent_id = position["lane_position"]["lane_id"]
         | 
| 273 273 | 
             
                                else:
         | 
| 274 | 
            -
                                    # BUG: 需要处理
         | 
| 275 274 | 
             
                                    parent_id = -1
         | 
| 276 275 | 
             
                                needs = await agent.memory.get("needs")
         | 
| 277 276 | 
             
                                action = await agent.memory.get("current_step")
         | 
| @@ -297,23 +296,66 @@ class AgentGroup: | |
| 297 296 | 
             
                        else:
         | 
| 298 297 | 
             
                            for agent in self.agents:
         | 
| 299 298 | 
             
                                _date_time = datetime.now(timezone.utc)
         | 
| 299 | 
            +
                                try:
         | 
| 300 | 
            +
                                    nominal_gdp = await agent.memory.get("nominal_gdp")
         | 
| 301 | 
            +
                                except:
         | 
| 302 | 
            +
                                    nominal_gdp = []
         | 
| 303 | 
            +
                                try:
         | 
| 304 | 
            +
                                    real_gdp = await agent.memory.get("real_gdp")
         | 
| 305 | 
            +
                                except:
         | 
| 306 | 
            +
                                    real_gdp = []
         | 
| 307 | 
            +
                                try:
         | 
| 308 | 
            +
                                    unemployment = await agent.memory.get("unemployment")
         | 
| 309 | 
            +
                                except:
         | 
| 310 | 
            +
                                    unemployment = []
         | 
| 311 | 
            +
                                try:
         | 
| 312 | 
            +
                                    wages = await agent.memory.get("wages")
         | 
| 313 | 
            +
                                except:
         | 
| 314 | 
            +
                                    wages = []
         | 
| 315 | 
            +
                                try:
         | 
| 316 | 
            +
                                    prices = await agent.memory.get("prices")
         | 
| 317 | 
            +
                                except:
         | 
| 318 | 
            +
                                    prices = []
         | 
| 319 | 
            +
                                try:
         | 
| 320 | 
            +
                                    inventory = await agent.memory.get("inventory")
         | 
| 321 | 
            +
                                except:
         | 
| 322 | 
            +
                                    inventory = 0
         | 
| 323 | 
            +
                                try:
         | 
| 324 | 
            +
                                    price = await agent.memory.get("price")
         | 
| 325 | 
            +
                                except:
         | 
| 326 | 
            +
                                    price = 0.0
         | 
| 327 | 
            +
                                try:
         | 
| 328 | 
            +
                                    interest_rate = await agent.memory.get("interest_rate")
         | 
| 329 | 
            +
                                except:
         | 
| 330 | 
            +
                                    interest_rate = 0.0
         | 
| 331 | 
            +
                                try:
         | 
| 332 | 
            +
                                    bracket_cutoffs = await agent.memory.get("bracket_cutoffs")
         | 
| 333 | 
            +
                                except:
         | 
| 334 | 
            +
                                    bracket_cutoffs = []
         | 
| 335 | 
            +
                                try:
         | 
| 336 | 
            +
                                    bracket_rates = await agent.memory.get("bracket_rates")
         | 
| 337 | 
            +
                                except:
         | 
| 338 | 
            +
                                    bracket_rates = []
         | 
| 339 | 
            +
                                try:
         | 
| 340 | 
            +
                                    employees = await agent.memory.get("employees")
         | 
| 341 | 
            +
                                except:
         | 
| 342 | 
            +
                                    employees = []
         | 
| 300 343 | 
             
                                avro = {
         | 
| 301 344 | 
             
                                    "id": agent._uuid,
         | 
| 302 345 | 
             
                                    "day": await self.simulator.get_simulator_day(),
         | 
| 303 346 | 
             
                                    "t": await self.simulator.get_simulator_second_from_start_of_day(),
         | 
| 304 347 | 
             
                                    "type": await agent.memory.get("type"),
         | 
| 305 | 
            -
                                    "nominal_gdp":  | 
| 306 | 
            -
                                    "real_gdp":  | 
| 307 | 
            -
                                    "unemployment":  | 
| 308 | 
            -
                                    "wages":  | 
| 309 | 
            -
                                    "prices":  | 
| 310 | 
            -
                                    "inventory":  | 
| 311 | 
            -
                                    "price":  | 
| 312 | 
            -
                                    "interest_rate":  | 
| 313 | 
            -
                                    "bracket_cutoffs":  | 
| 314 | 
            -
                                    "bracket_rates":  | 
| 315 | 
            -
                                    "employees":  | 
| 316 | 
            -
                                    "customers": await agent.memory.get("customers"),
         | 
| 348 | 
            +
                                    "nominal_gdp": nominal_gdp,
         | 
| 349 | 
            +
                                    "real_gdp": real_gdp,
         | 
| 350 | 
            +
                                    "unemployment": unemployment,
         | 
| 351 | 
            +
                                    "wages": wages,
         | 
| 352 | 
            +
                                    "prices": prices,
         | 
| 353 | 
            +
                                    "inventory": inventory,
         | 
| 354 | 
            +
                                    "price": price,
         | 
| 355 | 
            +
                                    "interest_rate": interest_rate,
         | 
| 356 | 
            +
                                    "bracket_cutoffs": bracket_cutoffs,
         | 
| 357 | 
            +
                                    "bracket_rates": bracket_rates,
         | 
| 358 | 
            +
                                    "employees": employees,
         | 
| 317 359 | 
             
                                }
         | 
| 318 360 | 
             
                                avros.append(avro)
         | 
| 319 361 | 
             
                                _statuses_time_list.append((avro, _date_time))
         | 
| @@ -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= | 
| 53 | 
            +
            pycityagent/simulation/agentgroup.py,sha256=0uMoRBektdK9WEXmqYT2gASg42CtS6JjaQ7slP8IWkY,22011
         | 
| 54 54 | 
             
            pycityagent/simulation/simulation.py,sha256=9kkdgXSEOAN8wiewVFyORksti4IdVNU0opObV6ZYa9k,23344
         | 
| 55 55 | 
             
            pycityagent/simulation/storage/pg.py,sha256=Ws04mUgRcbbvWi_eQm3PXYa6w7AQUbDPWhSU7HFtsD8,6026
         | 
| 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. | 
| 74 | 
            -
            pycityagent-2.0. | 
| 75 | 
            -
            pycityagent-2.0. | 
| 73 | 
            +
            pycityagent-2.0.0a27.dist-info/METADATA,sha256=a0J5mbDiwBkYcPqDwPFJCwwkSTAU1g-g-jqVCwDYVhE,8033
         | 
| 74 | 
            +
            pycityagent-2.0.0a27.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
         | 
| 75 | 
            +
            pycityagent-2.0.0a27.dist-info/RECORD,,
         | 
| 
            File without changes
         |