File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -325,8 +325,9 @@ def run(self) -> None:
325325 )
326326
327327 # Global outputs
328- self .outputs (self .market , self .sectors , year = self .time_framework [year_idx ]) # type: ignore
329- self .outputs_cache .consolidate_cache (year = self .time_framework [year_idx ])
328+ investment_year = years [1 ]
329+ self .outputs (self .market , self .sectors , year = investment_year )
330+ self .outputs_cache .consolidate_cache (year = investment_year )
330331
331332 getLogger (__name__ ).info (
332333 f"Finished simulation period { years [0 ]} to { years [1 ]} "
Original file line number Diff line number Diff line change @@ -102,10 +102,7 @@ def _factory(
102102 quantities = [_quantity_factory (param , registry ) for param in params ]
103103 sinks = [sink_factory (param , sector_name = sector_name ) for param in params ]
104104
105- def save_multiple_outputs (market , * args , year : int | None = None ) -> list [Any ]:
106- if year is None :
107- year = int (market .year .min ())
108-
105+ def save_multiple_outputs (market , * args , year : int ) -> list [Any ]:
109106 return [
110107 sink (quantity (market , * args ), year = year )
111108 for quantity , sink in zip (quantities , sinks )
Original file line number Diff line number Diff line change @@ -277,7 +277,8 @@ def group_assets(x: xr.DataArray) -> xr.DataArray:
277277
278278 def save_outputs (self ) -> None :
279279 """Calls the outputs function with the current output data."""
280- self .outputs (self .output_data , self .capacity )
280+ investment_year = self .output_data .year .values [1 ]
281+ self .outputs (self .output_data , self .capacity , year = investment_year )
281282
282283 def market_variables (self , market : xr .Dataset , technologies : xr .Dataset ) -> Any :
283284 """Computes resulting market: production, consumption, and costs."""
You can’t perform that action at this time.
0 commit comments