Skip to content

Commit 339ea03

Browse files
authored
Limit prices used for objectives to investment year (#602)
* Pass objectives only prices from investment year * Add inline comment for clarity
1 parent 1ad7e03 commit 339ea03

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/muse/agents/agent.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,14 @@ def compute_decision(
390390
# Filter prices according to the region
391391
prices = self.filter_input(market.prices)
392392

393+
# Select prices for the investment year
394+
investment_year_prices = prices.isel(year=1)
395+
393396
# Compute the objectives
394397
objectives = self.objectives(
395398
technologies=techs,
396399
demand=reduced_demand,
397-
prices=prices,
400+
prices=investment_year_prices,
398401
timeslice_level=self.timeslice_level,
399402
)
400403

0 commit comments

Comments
 (0)