Skip to content

Commit db6bf31

Browse files
committed
Add warning about retrofit agents
1 parent 909be5e commit db6bf31

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

docs/inputs/agents.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Type
4242
technologies. If only "New" agents are included, they will also invest to make up for
4343
decommissioned assets, but the end mix might be different than using a specialised
4444
"Retrofit" agent for that.
45+
*Note: Retrofit agents will be deprecated in a future release.*
4546

4647
AgentShare
4748
Name used to assign a fraction of existing capacity to the agent in the :ref:`inputs-technodata` file.

src/muse/readers/csv.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@ def read_csv_agent_parameters(filename) -> list:
482482
Returns a list of dictionaries, where each dictionary can be used to instantiate an
483483
agent in :py:func:`muse.agents.factories.factory`.
484484
"""
485+
from logging import getLogger
486+
485487
from muse.readers import camel_to_snake
486488

487489
if (
@@ -534,6 +536,15 @@ def read_csv_agent_parameters(filename) -> list:
534536
"agent": "agent",
535537
"default": "agent",
536538
}[getattr(row, "Type", "agent").lower()]
539+
540+
# Add warning about retrofit agents
541+
if agent_type == "retrofit":
542+
msg = (
543+
"Retrofit agents will be deprecated in a future release. "
544+
"Please modify your model to use only agents of the 'New' type."
545+
)
546+
getLogger(__name__).warning(msg)
547+
537548
data = {
538549
"name": row.Name,
539550
"region": row.RegionName,

0 commit comments

Comments
 (0)