NTC Aggregated#

Zonal NTC-clearing algorithm on aggregated interzonal capacities.

API path: apem.unit_based_model.allocation.algorithms.zonal_clearing.zonal_ntc_aggregated

class Zonal_NTC_aggregated(zonal_configuration='zonal_DE3', factor=0.8)[source]#

Bases: PowerFlowModel

Implementation of the Zonal NTC model. A zonal NTC model includes a simple graph with at most one line between any two nodes, where the nodes represent the zones. Note: Works only with PyPSA data.

Initialize the aggregated zonal NTC model.

Parameters:
  • zonal_configuration (str) – Name of the zonal configuration used to map nodes to zones.

  • factor (float) – Scaling factor applied to aggregated cross-zonal transfer capacities.

create_zonal_scenario_NTC(base_scenario, results_root=None)[source]#

Construct a zonal scenario based on a given nodal base scenario.

The nodal network is aggregated so that each zone is represented by a single node and each pair of connected zones is represented by at most one interzonal edge.

Parameters:
  • base_scenario (Scenario) – Original nodal scenario to aggregate.

  • results_root (str | None) – Optional directory where the node-to-zone mapping CSV is written.

Returns:

Aggregated zonal scenario suitable for DCOPF solving.

Return type:

Scenario

solve(
scenario,
configuration,
results_file=None,
stats_file=None,
u_fixed=None,
)[source]#

Create the aggregated zonal scenario and solve the resulting DCOPF problem.

Parameters:
  • scenario (Scenario) – Original nodal scenario to convert and solve.

  • configuration (SolverConfiguration) – Optimizer configuration applied to the zonal DCOPF solve.

  • results_file (str | None) – Optional CSV file path for writing optimization results.

  • stats_file (str | None) – Optional file path for writing allocation statistics.

  • u_fixed (dict | None) – Unused placeholder kept for interface compatibility with other power-flow models.

Returns:

Tuple (zonal_scenario, allocation_or_error).

Return type:

Tuple[Scenario, Allocation | Error]