diff --git a/src/muse/mca.py b/src/muse/mca.py index 662e51ba..58025b70 100644 --- a/src/muse/mca.py +++ b/src/muse/mca.py @@ -336,8 +336,7 @@ def run(self) -> None: if year_idx == 0: self.outputs(self.market, self.sectors, year=current_year) self.outputs(self.market, self.sectors, year=investment_year) - self.outputs_cache.consolidate_cache(year=current_year) - # TODO: change cache to investment_year (not working properly anyway) + self.outputs_cache.consolidate_cache(year=investment_year) getLogger(__name__).info( f"Finished simulation period {current_year} to {investment_year} " diff --git a/src/muse/outputs/cache.py b/src/muse/outputs/cache.py index 5f77aa70..ac9b8fee 100644 --- a/src/muse/outputs/cache.py +++ b/src/muse/outputs/cache.py @@ -354,9 +354,6 @@ def extract_agents_internal( info[aid]["category"] = agent.category info[aid]["sector"] = sector_name info[aid]["dst_region"] = agent.region - info[aid]["year"] = agent.year - info[aid]["installed"] = agent.year - return info diff --git a/tests/test_outputs.py b/tests/test_outputs.py index 9a810578..10c0ab9d 100644 --- a/tests/test_outputs.py +++ b/tests/test_outputs.py @@ -480,8 +480,6 @@ def test_extract_agents_internal(newcapa_agent, retro_agent): "category", "sector", "dst_region", - "year", - "installed", ) assert actual[agent.uuid]["agent"] == agent.name assert actual[agent.uuid]["category"] == agent.category @@ -552,12 +550,8 @@ def test_consolidate_quantity(newcapa_agent, retro_agent): actual = consolidate_quantity(quantity, [a, b], agents) - cols = set( - (*agents[retro_agent.uuid].keys(), "installed", "year", "technology", quantity) - ) + cols = set((*agents[retro_agent.uuid].keys(), "technology", quantity)) assert set(actual.columns) == cols - assert all(actual.year == newcapa_agent.year) - assert all(actual.installed == newcapa_agent.year) assert all( name in (newcapa_agent.name, retro_agent.name) for name in actual.agent.unique() )