Skip to content

Commit 84d415d

Browse files
committed
Update unit tests for generation perturbation
1 parent dc2db87 commit 84d415d

14 files changed

+61
-6
lines changed

gridfm_datakit/generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def generate_power_flow_data(
242242
# Prepare network and scenarios
243243
net, scenarios = _prepare_network_and_scenarios(args, file_paths)
244244

245-
# Initialize topology generator and data structures
245+
# Initialize topology and generation generators, and data structures
246246
topology_generator = initialize_topology_generator(args.topology_perturbation, net)
247247
generation_generator = initialize_generation_generator(
248248
args.generation_perturbation,

scripts/config/Texas2k_case1_2016summerpeak.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ topology_perturbation:
2323
n_topology_variants: 10 # Number of unique perturbed topologies per scenario
2424
elements: ["line", "trafo"] # elements to perturb options: line, trafo, gen, sgen
2525

26+
generation_perturbation:
27+
type: "cost_permutation" # Type of generation perturbation; options: cost_permutation, cost_perturbation, none
28+
sigma: 1.0 # Size of range use for sampling scaling factor
29+
2630
settings:
2731
num_processes: 12 # Number of parallel processes to use
2832
data_dir: "./data_out" # Directory to save generated data relative to the project root

scripts/config/case118_ieee.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ topology_perturbation:
2323
n_topology_variants: 20 # Number of unique perturbed topologies per scenario
2424
elements: ["line"] # elements to perturb options: line, trafo, gen, sgen
2525

26+
generation_perturbation:
27+
type: "cost_permutation" # Type of generation perturbation; options: cost_permutation, cost_perturbation, none
28+
sigma: 1.0 # Size of range use for sampling scaling factor
29+
2630
settings:
2731
num_processes: 10 # Number of parallel processes to use
2832
data_dir: "./data_out" # Directory to save generated data relative to the project root

scripts/config/case1354_pegase.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ topology_perturbation:
2323
n_topology_variants: 1 # Number of unique perturbed topologies per scenario
2424
elements: ["line"] # elements to perturb options: line, trafo, gen, sgen
2525

26+
generation_perturbation:
27+
type: "cost_perturbation" # Type of generation perturbation; options: cost_permutation, cost_perturbation, none
28+
sigma: 1.0 # Size of range use for sampling scaling factor
29+
2630
settings:
2731
num_processes: 10 # Number of parallel processes to use
2832
data_dir: "./data_out" # Directory to save generated data relative to the project root

scripts/config/case179_goc.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ topology_perturbation:
2323
n_topology_variants: 20 # Number of unique perturbed topologies per scenario
2424
elements: ["line"] # elements to perturb options: line, trafo, gen, sgen
2525

26+
generation_perturbation:
27+
type: "cost_perturbation" # Type of generation perturbation; options: cost_permutation, cost_perturbation, none
28+
sigma: 1.0 # Size of range use for sampling scaling factor
29+
2630
settings:
2731
num_processes: 10 # Number of parallel processes to use
2832
data_dir: "./data_out" # Directory to save generated data relative to the project root

scripts/config/case197_snem.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ topology_perturbation:
2323
n_topology_variants: 20 # Number of unique perturbed topologies per scenario
2424
elements: ["line"] # elements to perturb options: line, trafo, gen, sgen
2525

26+
generation_perturbation:
27+
type: "cost_perturbation" # Type of generation perturbation; options: cost_permutation, cost_perturbation, none
28+
sigma: 1.0 # Size of range use for sampling scaling factor
29+
2630
settings:
2731
num_processes: 10 # Number of parallel processes to use
2832
data_dir: "./data_out" # Directory to save generated data relative to the project root

scripts/config/case240_pserc.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ topology_perturbation:
2323
n_topology_variants: 20 # Number of unique perturbed topologies per scenario
2424
elements: ["line"] # elements to perturb options: line, trafo, gen, sgen
2525

26+
generation_perturbation:
27+
type: "cost_permutation" # Type of generation perturbation; options: cost_permutation, cost_perturbation, none
28+
sigma: 1.0 # Size of range use for sampling scaling factor
29+
2630
settings:
2731
num_processes: 10 # Number of parallel processes to use
2832
data_dir: "./data_out" # Directory to save generated data relative to the project root

scripts/config/case24_ieee_rts.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ topology_perturbation:
2323
n_topology_variants: 10 # Number of unique perturbed topologies per scenario
2424
elements: ["line", "trafo"] # elements to perturb options: line, trafo, gen, sgen
2525

26+
generation_perturbation:
27+
type: "cost_perturbation" # Type of generation perturbation; options: cost_permutation, cost_perturbation, none
28+
sigma: 1.0 # Size of range use for sampling scaling factor
29+
2630
settings:
2731
num_processes: 12 # Number of parallel processes to use
2832
data_dir: "./data_out" # Directory to save generated data relative to the project root

scripts/config/case300_ieee.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ topology_perturbation:
2323
n_topology_variants: 20 # Number of unique perturbed topologies per scenario
2424
elements: ["line"] # elements to perturb options: line, trafo, gen, sgen
2525

26+
generation_perturbation:
27+
type: "cost_perturbation" # Type of generation perturbation; options: cost_permutation, cost_perturbation, none
28+
sigma: 1.0 # Size of range use for sampling scaling factor
29+
2630
settings:
2731
num_processes: 10 # Number of parallel processes to use
2832
data_dir: "./data_out" # Directory to save generated data relative to the project root

scripts/config/default.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ topology_perturbation:
2424
n_topology_variants: 5 # Number of unique perturbed topologies per scenario
2525
elements: ["line", "trafo", "gen", "sgen"] # elements to perturb options: line, trafo, gen, sgen
2626

27+
generation_perturbation:
28+
type: "cost_perturbation" # Type of generation perturbation; options: cost_permutation, cost_perturbation, none
29+
sigma: 1.0 # Size of range use for sampling scaling factor
30+
2731
settings:
2832
num_processes: 10 # Number of parallel processes to use
2933
data_dir: "./data_out" # Directory to save generated data relative to the project root

0 commit comments

Comments
 (0)