Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer columns-style network format to matrix format #591

Merged
merged 9 commits into from
Dec 5, 2023
Merged
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 Example_Systems/RealSystemExample/ISONE_Trizone/Network.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
NENGREST,z1,1,1,-1,0,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0
NENG_CT,z2,2,1,0,-1,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0
NENG_ME,z3,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
NENGREST,z1,1,1,2,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0
NENG_CT,z2,2,1,3,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0
NENG_ME,z3,,,,,,,,,,,,
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
NENGREST,z1,1,1,-1,0,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0
NENG_CT,z2,2,1,0,-1,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0
NENG_ME,z3,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
NENGREST,z1,1,1,2,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0
NENG_CT,z2,2,1,3,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0
NENG_ME,z3,,,,,,,,,,,,
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
NENGREST,z1,1,1,-1,0,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0,5900,0.062,30
NENG_CT,z2,2,1,0,-1,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0,4000,0.062,30
NENG_ME,z3,,,,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
NENGREST,z1,1,1,2,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0,5900,0.062,30
NENG_CT,z2,2,1,3,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0,4000,0.062,30
NENG_ME,z3,,,,,,,,,,,,,,,
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
NENGREST,z1,1,1,-1,0,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0,5900,0.062,30
NENG_CT,z2,2,1,0,-1,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0,4000,0.062,30
NENG_ME,z3,,,,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
NENGREST,z1,1,1,2,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0,5900,0.062,30
NENG_CT,z2,2,1,3,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0,4000,0.062,30
NENG_ME,z3,,,,,,,,,,,,,,,
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
NENGREST,z1,1,1,-1,0,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0,5900,0.062,30
NENG_CT,z2,2,1,0,-1,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0,4000,0.062,30
NENG_ME,z3,,,,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
NENGREST,z1,1,1,2,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0,5900,0.062,30
NENG_CT,z2,2,1,3,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0,4000,0.062,30
NENG_ME,z3,,,,,,,,,,,,,,,
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
NENGREST,z1,1,1,-1,0,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0
NENG_CT,z2,2,1,0,-1,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0
NENG_ME,z3,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
NENGREST,z1,1,1,2,2950,NENGREST_to_NENG_CT,123.0584,0.012305837,2950,12060,0.95,0,0
NENG_CT,z2,2,1,3,2000,NENGREST_to_NENG_ME,196.5385,0.019653847,2000,19261,0.95,0,0
NENG_ME,z3,,,,,,,,,,,,
8 changes: 4 additions & 4 deletions Example_Systems/SmallNewEngland/ThreeZones/Network.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
MA,z1,1,1,-1,0,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0
CT,z2,2,1,0,-1,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0
ME,z3,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
MA,z1,1,1,2,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0
CT,z2,2,1,3,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0
ME,z3,,,,,,,,,,,,
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
MA,z1,1,1,-1,0,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0,7000,0.062,30
CT,z2,2,1,0,-1,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0,5000,0.062,30
ME,z3,,,,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
MA,z1,1,1,2,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0,7000,0.062,30
CT,z2,2,1,3,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0,5000,0.062,30
ME,z3,,,,,,,,,,,,,,,
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
MA,z1,1,1,-1,0,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0,7000,0.062,30
CT,z2,2,1,0,-1,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0,5000,0.062,30
ME,z3,,,,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
MA,z1,1,1,2,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0,7000,0.062,30
CT,z2,2,1,3,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0,5000,0.062,30
ME,z3,,,,,,,,,,,,,,,
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
MA,z1,1,1,-1,0,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0,7000,0.062,30
CT,z2,2,1,0,-1,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0,5000,0.062,30
ME,z3,,,,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1,Line_Max_Flow_Possible_MW,WACC,Capital_Recovery_Period
MA,z1,1,1,2,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0,7000,0.062,30
CT,z2,2,1,3,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0,5000,0.062,30
ME,z3,,,,,,,,,,,,,,,
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
MA,z1,1,1,-1,0,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0
CT,z2,2,1,0,-1,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0
ME,z3,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
MA,z1,1,1,2,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0
CT,z2,2,1,3,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0
ME,z3,,,,,,,,,,,,
8 changes: 4 additions & 4 deletions Example_Systems/VREStor_Example/Network.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,Line_Min_Flow_MW,transmission_path_name,Line_Reinforcement_Cost_per_MWyr,Line_Reinforcement_Cost_per_MW,Line_Loss_Percentage,Line_Max_Reinforcement_MW,DerateCapRes_1,CapRes_Excl_1,DerateCapRes_2,CapRes_Excl_2,DerateCapRes_3,CapRes_Excl_3
z1,1.0,1.0,-1.0,0.0,820.0,820.0,EIC_to_TRE,45958.0,948772.0,0.0649,410.0,0.95,0.0,0.95,0.0,0.95,0.0
z2,2.0,1.0,0.0,-1.0,1830.0,1830.0,EIC_to_WECC,71600.0,1478140.0,0.1001,915.0,0.95,0.0,0.95,0.0,0.95,0.0
z3,,,,,,,,,,,,,,,,,
Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,Line_Min_Flow_MW,transmission_path_name,Line_Reinforcement_Cost_per_MWyr,Line_Reinforcement_Cost_per_MW,Line_Loss_Percentage,Line_Max_Reinforcement_MW,DerateCapRes_1,CapRes_Excl_1,DerateCapRes_2,CapRes_Excl_2,DerateCapRes_3,CapRes_Excl_3
z1,1.0,1,2,820.0,820.0,EIC_to_TRE,45958.0,948772.0,0.0649,410.0,0.95,0.0,0.95,0.0,0.95,0.0
z2,2.0,1,3,1830.0,1830.0,EIC_to_WECC,71600.0,1478140.0,0.1001,915.0,0.95,0.0,0.95,0.0,0.95,0.0
z3,,,,,,,,,,,,,,,,
18 changes: 9 additions & 9 deletions docs/src/data_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ This input file contains input parameters related to: 1) definition of model zon
|**Settings-specific Columns**|
|**Multiple zone model**||
|Network\_Lines | Numerical index for each network line. The length of this column is counted but the actual values are not used.|
| z* (Network map) **OR** Origin_Zone, Destination_Zone | See below |
| z* (Network map) **OR** Start_Zone, End_Zone | See below |
|Line\_Max\_Flow\_MW | Existing capacity of the inter-regional transmission line.|
|**NetworkExpansion = 1**||
|Line\_Max\_Reinforcement\_MW |Maximum allowable capacity addition to the existing transmission line.|
Expand All @@ -211,26 +211,26 @@ This input file contains input parameters related to: 1) definition of model zon
There are two interfaces implemented for specifying the network topology itself: a matrix interface and a list interface.
Only one choice is permitted in a given file.

The list interface consists of a column for the lines origin zone and one for the line's destination zone.
The list interface consists of a column for the lines start zone and one for the line's end zone.
Here is a snippet of the Network.csv file for a map with three zones and two lines:
```
Network_Lines, Origin_Zone, Destination_Zone,
1, 1, 2,
2, 1, 3,
Network_Lines, Start_Zone, End_Zone,
1, 1, 2,
2, 1, 3,
```

The matrix interface requires N columns labeled `z1, z2, z3 ... zN`,
and L rows, one for each network line (or interregional path), with a `1` in the column corresponding to the 'origin' zone
and a `-1` in the column corresponding to the 'destination' zone for each line.
and L rows, one for each network line (or interregional path), with a `1` in the column corresponding to the 'start' zone
and a `-1` in the column corresponding to the 'end' zone for each line.
Here is the same network map implemented as a matrix:
```
Network_Lines, z1, z2, z3,
1, 1, -1, 0,
2, 1, 0, -1,
```

Note that in either case, positive flows indicate flow from origin to destination zone;
negative flows indicate flow from destination to origin zone.
Note that in either case, positive flows indicate flow from start to end zone;
negative flows indicate flow from end to start zone.


#### 2.1.3 Demand\_data.csv (Load\_data.csv)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/model_notation.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ $\mathcal{W} \subseteq \mathcal{G}$ | where $\mathcal{W}$ set of hydroelectric g
|$\rho_{y,z,t}^{max,pv}$ | Maximum available generation per unit of installed capacity for the solar PV component of a co-located VRE and storage resource during time step t for technology y in zone z [%]|
|$\rho_{y,z,t}^{max,wind}$ | Maximum available generation per unit of installed capacity for the wind component of a co-located VRE and storage resource during time step t for technology y in zone z [%]|
|$VREIndex_{y,z}$ | Resource bin index for VRE technology $y$ in zone $z$. $VREIndex_{y,z}=1$ for the first bin, and $VREIndex_{y,z}=0$ for remaining bins. Only defined for $y\in \mathcal{VRE}$ |
|$\varphi^{map}_{l,z}$ | Topology of the network, for line l: $\varphi^{map}_{l,z}=1$ for zone $z$ of origin, - 1 for zone $z$ of destination, 0 otherwise. |
|$\varphi^{map}_{l,z}$ | Topology of the network, for line l: $\varphi^{map}_{l,z}=1$ for start zone $z$, - 1 for end zone $z$, 0 otherwise. |
|$\eta_{y,z}^{loss}$ | Self discharge rate per time step per unit of installed capacity for storage technology $y$ in zone $z$ [%]|
|$\eta_{y,z}^{charge}$ | Single-trip efficiency of storage charging/demand deferral for technology $y$ in zone $z$ [%]|
|$\eta_{y,z}^{discharge}$ | Single-trip efficiency of storage (and hydro reservoir) discharging/demand satisfaction for technology $y$ in zone $z$ [%]|
Expand Down
24 changes: 18 additions & 6 deletions src/load_inputs/load_network_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ end

Loads the network map from a list-style interface
```
..., Network_Lines, Origin_Zone, Destination_Zone, ...
1, 1, 2,
2, 1, 3,
..., Network_Lines, Start_Zone, End_Zone, ...
1, 1, 2,
2, 1, 3,
```
"""
function load_network_map_from_list(network_var::DataFrame, Z, L, list_columns)
Expand All @@ -117,25 +117,26 @@ Loads the network map from a matrix-style interface
2, 1, 0, -1,
```
This is equivalent to the list-style interface where the zone zN with entry +1 is the
starting node of the line and the zone with entry -1 is the ending node of the line.
starting zone of the line and the zone with entry -1 is the ending zone of the line.
"""
function load_network_map_from_matrix(network_var::DataFrame, Z, L)
# Topology of the network source-sink matrix
network_map_matrix_format_deprecation_warning()
col = findall(s -> s == "z1", names(network_var))[1]
mat = Matrix{Float64}(network_var[1:L, col:col+Z-1])
end

function load_network_map(network_var::DataFrame, Z, L)
columns = names(network_var)

list_columns = ["Origin_Zone", "Destination_Zone"]
list_columns = ["Start_Zone", "End_Zone"]
has_network_list = all([c in columns for c in list_columns])

zones_as_strings = ["z" * string(i) for i in 1:Z]
has_network_matrix = all([c in columns for c in zones_as_strings])

instructions = """The transmission network should be specified in the form of a matrix
(with columns z1, z2, ... zN) or in the form of lists (with Start_Node, End_Node),
(with columns z1, z2, ... zN) or in the form of lists (with Start_Zone, End_Zone),
but not both. See the documentation for examples."""

if has_network_list && has_network_matrix
Expand All @@ -148,3 +149,14 @@ function load_network_map(network_var::DataFrame, Z, L)
load_network_map_from_matrix(network_var, Z, L)
end
end

function network_map_matrix_format_deprecation_warning()
@warn """Specifying the network map as a matrix is deprecated as of v0.4
and will be removed in v0.5. Instead, use the more compact list-style format.

..., Network_Lines, Start_Zone, End_Zone, ...
1, 1, 2,
2, 1, 3,
3, 2, 3,
""" maxlog=1
end
8 changes: 4 additions & 4 deletions test/ThreeZones/Network.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
,Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
MA,z1,1,1,-1,0,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0
CT,z2,2,1,0,-1,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0
ME,z3,,,,,,,,,,,,,
,Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,transmission_path_name,distance_mile,Line_Loss_Percentage,Line_Max_Reinforcement_MW,Line_Reinforcement_Cost_per_MWyr,DerateCapRes_1,CapRes_1,CapRes_Excl_1
MA,z1,1,1,2,2950,MA_to_CT,123.0584,0.012305837,2950,12060,0.95,0,0
CT,z2,2,1,3,2000,MA_to_ME,196.5385,0.019653847,2000,19261,0.95,0,0
ME,z3,,,,,,,,,,,,
8 changes: 4 additions & 4 deletions test/VREStor/Network.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Network_zones,Network_Lines,z1,z2,z3,Line_Max_Flow_MW,Line_Min_Flow_MW,transmission_path_name,Line_Reinforcement_Cost_per_MWyr,Line_Reinforcement_Cost_per_MW,Line_Loss_Percentage,Line_Max_Reinforcement_MW,DerateCapRes_1,CapRes_Excl_1,DerateCapRes_2,CapRes_Excl_2,DerateCapRes_3,CapRes_Excl_3
z1,1.0,1.0,-1.0,0.0,820.0,820.0,EIC_to_TRE,45958.0,948772.0,0.0649,410.0,0.95,0.0,0.95,0.0,0.95,0.0
z2,2.0,1.0,0.0,-1.0,1830.0,1830.0,EIC_to_WECC,71600.0,1478140.0,0.1001,915.0,0.95,0.0,0.95,0.0,0.95,0.0
z3,,,,,,,,,,,,,,,,,
Network_zones,Network_Lines,Start_Zone,End_Zone,Line_Max_Flow_MW,Line_Min_Flow_MW,transmission_path_name,Line_Reinforcement_Cost_per_MWyr,Line_Reinforcement_Cost_per_MW,Line_Loss_Percentage,Line_Max_Reinforcement_MW,DerateCapRes_1,CapRes_Excl_1,DerateCapRes_2,CapRes_Excl_2,DerateCapRes_3,CapRes_Excl_3
z1,1.0,1,2,820.0,820.0,EIC_to_TRE,45958.0,948772.0,0.0649,410.0,0.95,0.0,0.95,0.0,0.95,0.0
z2,2.0,1,3,1830.0,1830.0,EIC_to_WECC,71600.0,1478140.0,0.1001,915.0,0.95,0.0,0.95,0.0,0.95,0.0
z3,,,,,,,,,,,,,,,,