Skip to content

Commit b03b631

Browse files
committed
fixed default
1 parent feab3fd commit b03b631

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

gridfm_datakit/network.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
import os
9+
import shutil
910
import requests
1011
from importlib import resources
1112
import pandas as pd
@@ -96,8 +97,8 @@ def correct_network(network_path: str, force: bool = False) -> str:
9697
if not os.path.exists(tmp_path) or os.path.getsize(tmp_path) == 0:
9798
raise RuntimeError("Julia produced empty MATPOWER file")
9899

99-
# Atomically replace target file
100-
os.replace(tmp_path, corrected_path)
100+
# Atomically replace target file (use shutil.move to allow cross-device)
101+
shutil.move(tmp_path, corrected_path)
101102
return corrected_path
102103

103104
finally:

scripts/config/default.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ network:
77
load:
88
generator: "agg_load_profile" # Name of the load generator; options: agg_load_profile, powergraph
99
agg_profile: "default" # Name of the aggregated load profile
10-
scenarios: 100 # Number of different load scenarios to generate
10+
scenarios: 10000 # Number of different load scenarios to generate
1111
# WARNING: the following parameters are only used if generator is "agg_load_profile"
1212
# if using generator "powergraph", these parameters are ignored
1313
sigma: 0.2 # max local noise
@@ -36,7 +36,7 @@ admittance_perturbation:
3636

3737
settings:
3838
num_processes: 16 # Number of parallel processes to use
39-
data_dir: "./data_out_seed_none2" # Directory to save generated data relative to the project root
39+
data_dir: "./data_out" # Directory to save generated data relative to the project root
4040
large_chunk_size: 1000 # Number of load scenarios processed before saving
4141
overwrite: true # If true, overwrites existing files, if false, appends to files
4242
mode: "pf" # Mode of the script; options: pf, opf. pf: power flow data where one or more operating limits – the inequality constraints defined in OPF, e.g., voltage magnitude or branch limits – may be violated. opf: generates datapoints for training OPF solvers, with cost-optimal dispatches that satisfy all operating limits (OPF-feasible)

0 commit comments

Comments
 (0)