Skip to content

Commit 453de90

Browse files
committed
Improve documentation for agent parameters
1 parent 4c3dbf4 commit 453de90

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

docs/inputs/agents.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,12 @@ Quantity
218218
A factor used to determine the demand share of "New" agents.
219219

220220
MaturityThreshold (optional)
221-
Required when using the :py:func:`maturity <muse.filters.maturity>` search rule.
221+
Only applies when using the :py:func:`maturity <muse.filters.maturity>` search rule.
222+
Allows agents to only consider technologies that have achieved a certain market share
223+
(e.g. if 0.5, the agent will only invest in technologies that have a current market share of 50% or more).
224+
Must be between 0 and 1.
222225

223226
SpendLimit (optional)
224-
Required when using the :py:func:`spend_limit <muse.filters.spend_limit>` search rule.
227+
Only applies when using the :py:func:`spend_limit <muse.filters.spend_limit>` search rule.
228+
Allows agents to only consider technologies with a unit capital cost (`cap_par`) lower than the spend limit.
229+
(e.g. if 10, the agent will only invest in technologies with a `cap_par` of 10 or lower, as listed in the :ref:`inputs-technodata` file).

src/muse/filters.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,10 @@ def spend_limit(
366366
enduse_label: str = "service",
367367
**kwargs,
368368
) -> xr.DataArray:
369-
"""Only allows technologies that have achieve a given market share.
370-
371-
Specifically, the market share refers to the capacity for each end- use.
372-
"""
373-
spend_limit = agent.spend_limit
369+
"""Only allows technologies with a unit capital cost lower than the spend limit."""
370+
limit = agent.spend_limit
374371
unit_capex = agent.filter_input(technologies.cap_par, year=agent.year)
375-
condition = (unit_capex <= spend_limit).rename("spend_limit")
372+
condition = (unit_capex <= limit).rename("spend_limit")
376373
techs = (
377374
condition.technology.where(condition, drop=True).drop_vars("technology").values
378375
)

0 commit comments

Comments
 (0)