-
Notifications
You must be signed in to change notification settings - Fork 170
Open
Description
Issue overview
I've followed all of the set up steps. When I try to run the model (dgen_model.py) for New York State, I'm getting this error:
Traceback (most recent call last):
File "/Users/amywang/dgen/dgen_os/python/dgen_model.py", line 195, in main
solar_agents.on_frame(agent_mutation.elec.apply_export_tariff_params, [net_metering_state_df, net_metering_utility_df])
File "/Users/amywang/dgen/dgen_os/python/agents.py", line 137, in on_frame
results_df = self.run_with_runtime_tests(how_to_apply='on_frame', func=func, func_args=func_args, cores=None, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/amywang/dgen/dgen_os/python/agents.py", line 254, in run_with_runtime_tests
assert initial_len == post_len, "agent_df len changed by a function applied on_frame"
^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: agent_df len changed by a function applied on_frame
It appears that the function apply_export_tariff_params is changing the length of agent_df.
When I added some print statements, it appears that the length of agent_df is doubled:
Rows before function: 1147
Rows after function: 2294
Checking if agent_id duplicates exist: 1147
Details
Some additional details for this issue (if relevant):
- Platform: Mac
- Version of dGen: Most recent (forked on 3/15)
- Python version: Python 3.12.7
- matplotlib: 3.9.2
- pandas: 2.2.2
- numpy: 1.26.4
- scipy: 1.13.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working