Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ Examples:

```rezs: discrete_nodes```

### network.rez_to_sub_region_transmission_default_limit
### network.transmission_default_limit

Link capacity limit for rez to node connections that have their limit's modelled
through custom constraint (MW).
Default transmission capacity limit (MW) applied to a path with no explicit limit
in the inputs.

The export limits for some REZs are modelled via custom constraints which
incorporate multiple transmission line flows and/or generator dispatch levels. For these
Expand All @@ -226,7 +226,7 @@ export limit.

Examples:

```rez_to_sub_region_transmission_default_limit: 1e5```
```transmission_default_limit: 1e5```

## Temporal

Expand Down
6 changes: 3 additions & 3 deletions docs/ispypsa_runs/new_test_run/ispypsa_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ network:
# "discrete_nodes": REZs are added as network nodes to model REZ transmission limits
# "attached_to_parent_node": REZ resources are attached to their parent node (sub-region or NEM region)
rezs: discrete_nodes
# Line capacity limit for rez to node connections that have their limit's modelled
# through custom constraint (MW).
rez_to_sub_region_transmission_default_limit: 1e5
# Default transmission capacity limit (MW) for a path with no explicit limit in
# the inputs (e.g. REZ connections whose limit is modelled via custom constraints).
transmission_default_limit: 1e5
temporal:
year_type: fy
range:
Expand Down
2 changes: 1 addition & 1 deletion docs/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ both directions of flow:
`renewable_energy_zones` is used to set power flow limit.
- TODO: Implement time varying export limits making use of the peak demand and
winter limits provided in the IASR workbook.
- If a NA or blank value is provided then the `rez_to_sub_region_transmission_default_limit`
- If a NA or blank value is provided then the `transmission_default_limit`
from the config file is used to set the limit. This is typically set to high value (1e5). Using
the default limit is done for REZs where [custom contraints](#custom-constraints) are used to
model REZ export limits, such that the static limit will not influence the optimisation.
Expand Down
6 changes: 3 additions & 3 deletions ispypsa_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ network:
# Whether Renewable Energy Zones (REZs) are modelled as distinct nodes
# Only discrete_nodes implemented
rezs: discrete_nodes
# Line capacity limit for rez to node connections that have their limit's modelled
# through custom constraint (MW).
rez_to_sub_region_transmission_default_limit: 1e5
# Default transmission capacity limit (MW) for a path with no explicit limit in
# the inputs (e.g. REZ connections whose limit is modelled via custom constraints).
transmission_default_limit: 1e5


# ===== Temporal =======================================================================
Expand Down
6 changes: 3 additions & 3 deletions ispypsa_config_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ network:
# Whether Renewable Energy Zones (REZs) are modelled as distinct nodes
# Only discrete_nodes implemented
rezs: discrete_nodes
# Line capacity limit for rez to node connections that have their limit's modelled
# through custom constraint (MW).
rez_to_sub_region_transmission_default_limit: 1e5
# Default transmission capacity limit (MW) for a path with no explicit limit in
# the inputs (e.g. REZ connections whose limit is modelled via custom constraints).
transmission_default_limit: 1e5


# ===== Temporal =======================================================================
Expand Down
2 changes: 1 addition & 1 deletion src/ispypsa/config/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class NetworkConfig(BaseModel):
annuitisation_lifetime: int
transmission_expansion: bool
rez_transmission_expansion: bool
rez_to_sub_region_transmission_default_limit: float
transmission_default_limit: float


class TemporalAggregationConfig(BaseModel):
Expand Down
8 changes: 4 additions & 4 deletions src/ispypsa/translator/renewable_energy_zones.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _translate_renewable_energy_zone_build_limits_to_links(
# Create existing links from renewable energy zone build limits
existing_links = _translate_existing_rez_connections_to_links(
renewable_energy_zone_build_limits,
config.network.rez_to_sub_region_transmission_default_limit,
config.network.transmission_default_limit,
config.temporal.range.start_year,
)

Expand Down Expand Up @@ -62,15 +62,15 @@ def _translate_renewable_energy_zone_build_limits_to_links(

def _translate_existing_rez_connections_to_links(
renewable_energy_zone_build_limits: pd.DataFrame,
rez_to_sub_region_transmission_default_limit: float,
transmission_default_limit: float,
start_year: int,
) -> pd.DataFrame:
"""Process existing REZ connection limits to PyPSA links.

Args:
renewable_energy_zone_build_limits: `ISPyPSA` formatted pd.DataFrame detailing
Renewable Energy Zone transmission limits.
rez_to_sub_region_transmission_default_limit: float specifying the transmission
transmission_default_limit: float specifying the transmission
limit to use for rez to subregion connections when an explicit limit
is not given in the inputs.

Expand All @@ -86,7 +86,7 @@ def _translate_existing_rez_connections_to_links(
# custom constraints are given a very large capacity
links["isp_type"] = "rez"
links.loc[links["p_nom"].isna(), "isp_type"] = "rez_no_limit"
links["p_nom"] = links["p_nom"].fillna(rez_to_sub_region_transmission_default_limit)
links["p_nom"] = links["p_nom"].fillna(transmission_default_limit)

links["p_min_pu"] = -1.0
links["build_year"] = start_year - 1
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def sample_model_config():
annuitisation_lifetime=25,
transmission_expansion=True,
rez_transmission_expansion=True,
rez_to_sub_region_transmission_default_limit=1000000.0,
transmission_default_limit=1000000.0,
),
unserved_energy=UnservedEnergyConfig(cost=10000, max_per_node=10000),
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli/cli_test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def build_mock_config(
"nodes": {"regional_granularity": granularity, "rezs": "discrete_nodes"},
"transmission_expansion_limit_override": None,
"rez_connection_expansion_limit_override": None,
"rez_to_sub_region_transmission_default_limit": 1e6,
"transmission_default_limit": 1e6,
},
"temporal": {
"year_type": "fy",
Expand Down Expand Up @@ -329,7 +329,7 @@ def create_config_with_granularity(tmp_path, mock_workbook_file, granularity):
"nodes": {"regional_granularity": granularity, "rezs": "discrete_nodes"},
"transmission_expansion_limit_override": None,
"rez_connection_expansion_limit_override": None,
"rez_to_sub_region_transmission_default_limit": 1e6,
"transmission_default_limit": 1e6,
},
"temporal": {
"year_type": "fy",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_config/test_pydantic_model_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def get_valid_config():
"regional_granularity": "sub_regions",
"rezs": "discrete_nodes",
},
"rez_to_sub_region_transmission_default_limit": 1e6,
"transmission_default_limit": 1e6,
},
"temporal": {
"year_type": "fy",
Expand Down Expand Up @@ -167,7 +167,7 @@ def invalid_rez_transmission_expansion(config):


def invalid_rez_transmission_limit(config):
config["network"]["rez_to_sub_region_transmission_default_limit"] = "help"
config["network"]["transmission_default_limit"] = "help"
return config, ValidationError


Expand Down
6 changes: 3 additions & 3 deletions tests/test_translator/ispypsa_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ network:
# "discrete_nodes": REZs are added as network nodes to model REZ transmission limits
# "attached_to_parent_node": REZ resources are attached to their parent node (sub-region or NEM region)
rezs: discrete_nodes
# Line capacity limit for rez to node connections that have their limit's modelled
# through custom constraint (MW).
rez_to_sub_region_transmission_default_limit: 1e5
# Default transmission capacity limit (MW) for a path with no explicit limit in
# the inputs (e.g. REZ connections whose limit is modelled via custom constraints).
transmission_default_limit: 1e5
temporal:
year_type: fy
range:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def test_flow_path_expansion_limit_respected(csv_str_to_df, tmp_path, monkeypatc
"regional_granularity": "sub_regions",
"rezs": "attached_to_parent_node",
},
"rez_to_sub_region_transmission_default_limit": 1e5,
"transmission_default_limit": 1e5,
},
"temporal": {
"year_type": "fy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_link_expansion_economic_timing(csv_str_to_df, tmp_path, monkeypatch):
"regional_granularity": "sub_regions",
"rezs": "attached_to_parent_node",
},
"rez_to_sub_region_transmission_default_limit": 1e5,
"transmission_default_limit": 1e5,
},
"temporal": {
"year_type": "fy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_vre_build_limit_constraint(csv_str_to_df, tmp_path, monkeypatch):
"regional_granularity": "sub_regions",
"rezs": "discrete_nodes",
},
"rez_to_sub_region_transmission_default_limit": 1e5,
"transmission_default_limit": 1e5,
},
"temporal": {
"year_type": "fy",
Expand Down
Loading