Skip to content

Commit f48b6d0

Browse files
committed
Remove more forecast features
1 parent caf4d29 commit f48b6d0

3 files changed

Lines changed: 0 additions & 24 deletions

File tree

src/muse/agents/agent.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ def __init__(
113113
decision: Callable | None = None,
114114
year: int = 2010,
115115
maturity_threshold: float = 0,
116-
forecast: int = 5,
117116
housekeeping: Callable | None = None,
118117
merge_transform: Callable | None = None,
119118
demand_threshold: float | None = None,
@@ -137,7 +136,6 @@ def __init__(
137136
year: year the agent is created / current year
138137
maturity_threshold: threshold when filtering replacement
139138
technologies with respect to market share
140-
forecast: Number of years the agent will forecast
141139
housekeeping: transform applied to the assets at the start of
142140
iteration. Defaults to doing nothing.
143141
merge_transform: transform merging current and newly invested assets
@@ -170,9 +168,6 @@ def __init__(
170168
""" Current year. Incremented by one every time next is called."""
171169
self.year = year
172170

173-
"""Number of years to look into the future for forecating purposed."""
174-
self.forecast = forecast
175-
176171
"""Search rule(s) determining potential replacement technologies.
177172
178173
This is a string referring to a filter, or a sequence of strings
@@ -234,11 +229,6 @@ def __init__(
234229
"""Threshold below which assets are not added."""
235230
self.asset_threshold = asset_threshold
236231

237-
@property
238-
def forecast_year(self):
239-
"""Year to consider when forecasting."""
240-
return self.year + self.forecast
241-
242232
def asset_housekeeping(self):
243233
"""Reduces memory footprint of assets.
244234

src/muse/sectors/sector.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,6 @@ def __init__(
169169
"""Full supply, consumption and costs data for the most recent year."""
170170
self.output_data: xr.Dataset
171171

172-
@property
173-
def forecast(self):
174-
"""Maximum forecast horizon across agents.
175-
176-
It cannot be lower than 1 year.
177-
"""
178-
forecasts = [getattr(agent, "forecast") for agent in self.agents]
179-
return max(1, max(forecasts))
180-
181172
def next(
182173
self,
183174
mca_market: xr.Dataset,

src/muse/sectors/subsector.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def __init__(
2424
constraints: Callable | None = None,
2525
investment: Callable | None = None,
2626
name: str = "subsector",
27-
forecast: int = 5,
2827
expand_market_prices: bool = False,
2928
timeslice_level: str | None = None,
3029
):
@@ -37,7 +36,6 @@ def __init__(
3736
self.demand_share = demand_share or ds.factory()
3837
self.constraints = constraints or cs.factory()
3938
self.investment = investment or iv.factory()
40-
self.forecast = forecast
4139
self.name = name
4240
self.expand_market_prices = expand_market_prices
4341
self.timeslice_level = timeslice_level
@@ -142,7 +140,6 @@ def factory(
142140
asset_threshold=getattr(settings, "asset_threshold", 1e-12),
143141
# only used by self-investing agents
144142
investment=getattr(settings, "lpsolver", "scipy"),
145-
forecast=getattr(settings, "forecast", 5),
146143
constraints=getattr(settings, "constraints", ()),
147144
timeslice_level=timeslice_level,
148145
)
@@ -181,7 +178,6 @@ def factory(
181178
constraints = cs.factory(getattr(settings, "constraints", None))
182179
# only used by non-self-investing agents
183180
investment = iv.factory(getattr(settings, "lpsolver", "scipy"))
184-
forecast = getattr(settings, "forecast", 5)
185181

186182
expand_market_prices = getattr(settings, "expand_market_prices", None)
187183
if expand_market_prices is None:
@@ -195,7 +191,6 @@ def factory(
195191
demand_share=demand_share,
196192
constraints=constraints,
197193
investment=investment,
198-
forecast=forecast,
199194
name=name,
200195
expand_market_prices=expand_market_prices,
201196
timeslice_level=timeslice_level,

0 commit comments

Comments
 (0)