Datasets:
Add files using upload-large-folder tool
Browse files- PGLearn-Small-57_ieee.py +397 -0
- README.md +295 -0
- case.json.gz +3 -0
- config.toml +42 -0
- infeasible/ACOPF/dual.h5.gz +3 -0
- infeasible/ACOPF/meta.h5.gz +3 -0
- infeasible/ACOPF/primal.h5.gz +3 -0
- infeasible/DCOPF/dual.h5.gz +3 -0
- infeasible/DCOPF/meta.h5.gz +3 -0
- infeasible/DCOPF/primal.h5.gz +3 -0
- infeasible/SOCOPF/dual.h5.gz +3 -0
- infeasible/SOCOPF/meta.h5.gz +3 -0
- infeasible/SOCOPF/primal.h5.gz +3 -0
- infeasible/input.h5.gz +3 -0
- test/ACOPF/dual.h5.gz +3 -0
- test/ACOPF/meta.h5.gz +3 -0
- test/ACOPF/primal.h5.gz +3 -0
- test/DCOPF/dual.h5.gz +3 -0
- test/DCOPF/meta.h5.gz +3 -0
- test/DCOPF/primal.h5.gz +3 -0
- test/SOCOPF/dual.h5.gz +3 -0
- test/SOCOPF/meta.h5.gz +3 -0
- test/SOCOPF/primal.h5.gz +3 -0
- test/input.h5.gz +3 -0
- train/ACOPF/dual.h5.gz +3 -0
- train/ACOPF/meta.h5.gz +3 -0
- train/ACOPF/primal.h5.gz +3 -0
- train/DCOPF/dual.h5.gz +3 -0
- train/DCOPF/meta.h5.gz +3 -0
- train/DCOPF/primal.h5.gz +3 -0
- train/SOCOPF/dual.h5.gz +3 -0
- train/SOCOPF/meta.h5.gz +3 -0
- train/SOCOPF/primal.h5.gz +3 -0
- train/input.h5.gz +3 -0
PGLearn-Small-57_ieee.py
ADDED
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from __future__ import annotations
|
2 |
+
from dataclasses import dataclass
|
3 |
+
from pathlib import Path
|
4 |
+
import json
|
5 |
+
import gzip
|
6 |
+
|
7 |
+
import datasets as hfd
|
8 |
+
import h5py
|
9 |
+
import pyarrow as pa
|
10 |
+
|
11 |
+
# ┌──────────────┐
|
12 |
+
# │ Metadata │
|
13 |
+
# └──────────────┘
|
14 |
+
|
15 |
+
@dataclass
|
16 |
+
class CaseSizes:
|
17 |
+
n_bus: int
|
18 |
+
n_load: int
|
19 |
+
n_gen: int
|
20 |
+
n_branch: int
|
21 |
+
|
22 |
+
CASENAME = "57_ieee"
|
23 |
+
SIZES = CaseSizes(n_bus=57, n_load=42, n_gen=7, n_branch=80)
|
24 |
+
NUM_TRAIN = 799888
|
25 |
+
NUM_TEST = 199973
|
26 |
+
NUM_INFEASIBLE = 139
|
27 |
+
|
28 |
+
URL = "https://huggingface.co/datasets/PGLearn/PGLearn-Small-57_ieee"
|
29 |
+
DESCRIPTION = """\
|
30 |
+
The 57_ieee PGLearn optimal power flow dataset, part of the PGLearn-Small collection. \
|
31 |
+
"""
|
32 |
+
VERSION = hfd.Version("1.0.0")
|
33 |
+
DEFAULT_CONFIG_DESCRIPTION="""\
|
34 |
+
This configuration contains feasible input, metadata, primal solution, and dual solution data \
|
35 |
+
for the ACOPF, DCOPF, and SOCOPF formulations on the {case} system.
|
36 |
+
"""
|
37 |
+
USE_ML4OPF_WARNING = """
|
38 |
+
================================================================================================
|
39 |
+
Loading PGLearn-Small-57_ieee through the `datasets.load_dataset` function may be slow.
|
40 |
+
|
41 |
+
Consider using ML4OPF to directly convert to `torch.Tensor`; for more info see:
|
42 |
+
https://github.com/AI4OPT/ML4OPF?tab=readme-ov-file#manually-loading-data
|
43 |
+
|
44 |
+
Or, use `huggingface_hub.snapshot_download` and an HDF5 reader; for more info see:
|
45 |
+
https://huggingface.co/datasets/PGLearn/PGLearn-Small-57_ieee#downloading-individual-files
|
46 |
+
================================================================================================
|
47 |
+
"""
|
48 |
+
CITATION = """\
|
49 |
+
@article{klamkinpglearn,
|
50 |
+
title={{PGLearn - An Open-Source Learning Toolkit for Optimal Power Flow}},
|
51 |
+
author={Klamkin, Michael and Tanneau, Mathieu and Van Hentenryck, Pascal},
|
52 |
+
year={2025},
|
53 |
+
}\
|
54 |
+
"""
|
55 |
+
|
56 |
+
IS_COMPRESSED = True
|
57 |
+
|
58 |
+
# ┌──────────────────┐
|
59 |
+
# │ Formulations │
|
60 |
+
# └──────────────────┘
|
61 |
+
|
62 |
+
def acopf_features(sizes: CaseSizes, primal: bool, dual: bool, meta: bool):
|
63 |
+
features = {}
|
64 |
+
if primal: features.update(acopf_primal_features(sizes))
|
65 |
+
if dual: features.update(acopf_dual_features(sizes))
|
66 |
+
if meta: features.update({f"ACOPF/{k}": v for k, v in META_FEATURES.items()})
|
67 |
+
return features
|
68 |
+
|
69 |
+
def dcopf_features(sizes: CaseSizes, primal: bool, dual: bool, meta: bool):
|
70 |
+
features = {}
|
71 |
+
if primal: features.update(dcopf_primal_features(sizes))
|
72 |
+
if dual: features.update(dcopf_dual_features(sizes))
|
73 |
+
if meta: features.update({f"DCOPF/{k}": v for k, v in META_FEATURES.items()})
|
74 |
+
return features
|
75 |
+
|
76 |
+
def socopf_features(sizes: CaseSizes, primal: bool, dual: bool, meta: bool):
|
77 |
+
features = {}
|
78 |
+
if primal: features.update(socopf_primal_features(sizes))
|
79 |
+
if dual: features.update(socopf_dual_features(sizes))
|
80 |
+
if meta: features.update({f"SOCOPF/{k}": v for k, v in META_FEATURES.items()})
|
81 |
+
return features
|
82 |
+
|
83 |
+
FORMULATIONS_TO_FEATURES = {
|
84 |
+
"ACOPF": acopf_features,
|
85 |
+
"DCOPF": dcopf_features,
|
86 |
+
"SOCOPF": socopf_features,
|
87 |
+
}
|
88 |
+
|
89 |
+
# ┌───────────────────┐
|
90 |
+
# │ BuilderConfig │
|
91 |
+
# └───────────────────┘
|
92 |
+
|
93 |
+
class PGLearnSmall57_ieeeConfig(hfd.BuilderConfig):
|
94 |
+
"""BuilderConfig for PGLearn-Small-57_ieee.
|
95 |
+
By default, primal solution data, metadata, input, casejson, are included for the train and test splits.
|
96 |
+
|
97 |
+
To modify the default configuration, pass attributes of this class to `datasets.load_dataset`:
|
98 |
+
|
99 |
+
Attributes:
|
100 |
+
formulations (list[str]): The formulation(s) to include, e.g. ["ACOPF", "DCOPF"]
|
101 |
+
primal (bool, optional): Include primal solution data. Defaults to True.
|
102 |
+
dual (bool, optional): Include dual solution data. Defaults to False.
|
103 |
+
meta (bool, optional): Include metadata. Defaults to True.
|
104 |
+
input (bool, optional): Include input data. Defaults to True.
|
105 |
+
casejson (bool, optional): Include case.json data. Defaults to True.
|
106 |
+
train (bool, optional): Include training samples. Defaults to True.
|
107 |
+
test (bool, optional): Include testing samples. Defaults to True.
|
108 |
+
infeasible (bool, optional): Include infeasible samples. Defaults to False.
|
109 |
+
"""
|
110 |
+
def __init__(self,
|
111 |
+
formulations: list[str],
|
112 |
+
primal: bool=True, dual: bool=False, meta: bool=True, input: bool = True, casejson: bool=True,
|
113 |
+
train: bool=True, test: bool=True, infeasible: bool=False,
|
114 |
+
compressed: bool=IS_COMPRESSED, **kwargs
|
115 |
+
):
|
116 |
+
super(PGLearnSmall57_ieeeConfig, self).__init__(version=VERSION, **kwargs)
|
117 |
+
|
118 |
+
self.case = CASENAME
|
119 |
+
self.formulations = formulations
|
120 |
+
|
121 |
+
self.primal = primal
|
122 |
+
self.dual = dual
|
123 |
+
self.meta = meta
|
124 |
+
self.input = input
|
125 |
+
self.casejson = casejson
|
126 |
+
|
127 |
+
self.train = train
|
128 |
+
self.test = test
|
129 |
+
self.infeasible = infeasible
|
130 |
+
|
131 |
+
self.gz_ext = ".gz" if compressed else ""
|
132 |
+
|
133 |
+
@property
|
134 |
+
def size(self):
|
135 |
+
return SIZES
|
136 |
+
|
137 |
+
@property
|
138 |
+
def features(self):
|
139 |
+
features = {}
|
140 |
+
if self.casejson: features.update(case_features())
|
141 |
+
if self.input: features.update(input_features(SIZES))
|
142 |
+
for formulation in self.formulations:
|
143 |
+
features.update(FORMULATIONS_TO_FEATURES[formulation](SIZES, self.primal, self.dual, self.meta))
|
144 |
+
return hfd.Features(features)
|
145 |
+
|
146 |
+
@property
|
147 |
+
def splits(self):
|
148 |
+
splits: dict[hfd.Split, dict[str, str | int]] = {}
|
149 |
+
if self.train:
|
150 |
+
splits[hfd.Split.TRAIN] = {
|
151 |
+
"name": "train",
|
152 |
+
"num_examples": NUM_TRAIN
|
153 |
+
}
|
154 |
+
if self.test:
|
155 |
+
splits[hfd.Split.TEST] = {
|
156 |
+
"name": "test",
|
157 |
+
"num_examples": NUM_TEST
|
158 |
+
}
|
159 |
+
if self.infeasible:
|
160 |
+
splits[hfd.Split("infeasible")] = {
|
161 |
+
"name": "infeasible",
|
162 |
+
"num_examples": NUM_INFEASIBLE
|
163 |
+
}
|
164 |
+
return splits
|
165 |
+
|
166 |
+
@property
|
167 |
+
def urls(self):
|
168 |
+
urls: dict[str, None | str | list] = {
|
169 |
+
"case": None, "train": [], "test": [], "infeasible": [],
|
170 |
+
}
|
171 |
+
|
172 |
+
if self.casejson: urls["case"] = f"case.json" + self.gz_ext
|
173 |
+
|
174 |
+
split_names = []
|
175 |
+
if self.train: split_names.append("train")
|
176 |
+
if self.test: split_names.append("test")
|
177 |
+
if self.infeasible: split_names.append("infeasible")
|
178 |
+
|
179 |
+
for split in split_names:
|
180 |
+
if self.input: urls[split].append(f"{split}/input.h5" + self.gz_ext)
|
181 |
+
for formulation in self.formulations:
|
182 |
+
if self.primal: urls[split].append(f"{split}/{formulation}/primal.h5" + self.gz_ext)
|
183 |
+
if self.dual: urls[split].append(f"{split}/{formulation}/dual.h5" + self.gz_ext)
|
184 |
+
if self.meta: urls[split].append(f"{split}/{formulation}/meta.h5" + self.gz_ext)
|
185 |
+
return urls
|
186 |
+
|
187 |
+
# ┌────────────────────┐
|
188 |
+
# │ DatasetBuilder │
|
189 |
+
# └────────────────────┘
|
190 |
+
|
191 |
+
class PGLearnSmall57_ieee(hfd.ArrowBasedBuilder):
|
192 |
+
"""DatasetBuilder for PGLearn-Small-57_ieee.
|
193 |
+
The main interface is `datasets.load_dataset` with `trust_remote_code=True`, e.g.
|
194 |
+
|
195 |
+
```python
|
196 |
+
from datasets import load_dataset
|
197 |
+
ds = load_dataset("PGLearn/PGLearn-Small-57_ieee", trust_remote_code=True,
|
198 |
+
# modify the default configuration by passing kwargs
|
199 |
+
formulations=["DCOPF"],
|
200 |
+
dual=False,
|
201 |
+
meta=False,
|
202 |
+
)
|
203 |
+
```
|
204 |
+
"""
|
205 |
+
|
206 |
+
DEFAULT_WRITER_BATCH_SIZE = 10000
|
207 |
+
BUILDER_CONFIG_CLASS = PGLearnSmall57_ieeeConfig
|
208 |
+
DEFAULT_CONFIG_NAME=CASENAME
|
209 |
+
BUILDER_CONFIGS = [
|
210 |
+
PGLearnSmall57_ieeeConfig(
|
211 |
+
name=CASENAME, description=DEFAULT_CONFIG_DESCRIPTION.format(case=CASENAME),
|
212 |
+
formulations=list(FORMULATIONS_TO_FEATURES.keys()),
|
213 |
+
primal=True, dual=True, meta=True, input=True, casejson=True,
|
214 |
+
train=True, test=True, infeasible=False,
|
215 |
+
)
|
216 |
+
]
|
217 |
+
|
218 |
+
def _info(self):
|
219 |
+
return hfd.DatasetInfo(
|
220 |
+
features=self.config.features, splits=self.config.splits,
|
221 |
+
description=DESCRIPTION + self.config.description,
|
222 |
+
homepage=URL, citation=CITATION,
|
223 |
+
)
|
224 |
+
|
225 |
+
def _split_generators(self, dl_manager: hfd.DownloadManager):
|
226 |
+
hfd.logging.get_logger().warning(USE_ML4OPF_WARNING)
|
227 |
+
|
228 |
+
filepaths = dl_manager.download_and_extract(self.config.urls)
|
229 |
+
|
230 |
+
splits: list[hfd.SplitGenerator] = []
|
231 |
+
if self.config.train:
|
232 |
+
splits.append(hfd.SplitGenerator(
|
233 |
+
name=hfd.Split.TRAIN,
|
234 |
+
gen_kwargs=dict(case_file=filepaths["case"], data_files=tuple(filepaths["train"]), n_samples=NUM_TRAIN),
|
235 |
+
))
|
236 |
+
if self.config.test:
|
237 |
+
splits.append(hfd.SplitGenerator(
|
238 |
+
name=hfd.Split.TEST,
|
239 |
+
gen_kwargs=dict(case_file=filepaths["case"], data_files=tuple(filepaths["test"]), n_samples=NUM_TEST),
|
240 |
+
))
|
241 |
+
if self.config.infeasible:
|
242 |
+
splits.append(hfd.SplitGenerator(
|
243 |
+
name=hfd.Split("infeasible"),
|
244 |
+
gen_kwargs=dict(case_file=filepaths["case"], data_files=tuple(filepaths["infeasible"]), n_samples=NUM_INFEASIBLE),
|
245 |
+
))
|
246 |
+
return splits
|
247 |
+
|
248 |
+
def _generate_tables(self, case_file: str | None, data_files: tuple[hfd.utils.track.tracked_str], n_samples: int):
|
249 |
+
case_data: str | None = json.dumps(json.load(open_maybe_gzip(case_file))) if case_file is not None else None
|
250 |
+
|
251 |
+
opened_files = [open_maybe_gzip(file) for file in data_files]
|
252 |
+
data = {'/'.join(Path(df.get_origin()).parts[-2:]).split('.')[0]: h5py.File(of) for of, df in zip(opened_files, data_files)}
|
253 |
+
for k in list(data.keys()):
|
254 |
+
if "/input" in k: data[k.split("/", 1)[1]] = data.pop(k)
|
255 |
+
|
256 |
+
batch_size = self._writer_batch_size or self.DEFAULT_WRITER_BATCH_SIZE
|
257 |
+
for i in range(0, n_samples, batch_size):
|
258 |
+
effective_batch_size = min(batch_size, n_samples - i)
|
259 |
+
|
260 |
+
sample_data = {
|
261 |
+
f"{dk}/{k}":
|
262 |
+
hfd.features.features.numpy_to_pyarrow_listarray(v[i:i + effective_batch_size, ...])
|
263 |
+
for dk, d in data.items() for k, v in d.items() if f"{dk}/{k}" in self.config.features
|
264 |
+
}
|
265 |
+
|
266 |
+
if case_data is not None:
|
267 |
+
sample_data["case/json"] = pa.array([case_data] * effective_batch_size)
|
268 |
+
|
269 |
+
yield i, pa.Table.from_pydict(sample_data)
|
270 |
+
|
271 |
+
for f in opened_files:
|
272 |
+
f.close()
|
273 |
+
|
274 |
+
# ┌──────────────┐
|
275 |
+
# │ Features │
|
276 |
+
# └──────────────┘
|
277 |
+
|
278 |
+
FLOAT_TYPE = "float32"
|
279 |
+
INT_TYPE = "int64"
|
280 |
+
BOOL_TYPE = "bool"
|
281 |
+
STRING_TYPE = "string"
|
282 |
+
|
283 |
+
def case_features():
|
284 |
+
# FIXME: better way to share schema of case data -- need to treat jagged arrays
|
285 |
+
return {
|
286 |
+
"case/json": hfd.Value(STRING_TYPE),
|
287 |
+
}
|
288 |
+
|
289 |
+
META_FEATURES = {
|
290 |
+
"meta/seed": hfd.Value(dtype=INT_TYPE),
|
291 |
+
"meta/formulation": hfd.Value(dtype=STRING_TYPE),
|
292 |
+
"meta/primal_objective_value": hfd.Value(dtype=FLOAT_TYPE),
|
293 |
+
"meta/dual_objective_value": hfd.Value(dtype=FLOAT_TYPE),
|
294 |
+
"meta/primal_status": hfd.Value(dtype=STRING_TYPE),
|
295 |
+
"meta/dual_status": hfd.Value(dtype=STRING_TYPE),
|
296 |
+
"meta/termination_status": hfd.Value(dtype=STRING_TYPE),
|
297 |
+
"meta/build_time": hfd.Value(dtype=FLOAT_TYPE),
|
298 |
+
"meta/extract_time": hfd.Value(dtype=FLOAT_TYPE),
|
299 |
+
"meta/solve_time": hfd.Value(dtype=FLOAT_TYPE),
|
300 |
+
}
|
301 |
+
|
302 |
+
def input_features(sizes: CaseSizes):
|
303 |
+
return {
|
304 |
+
"input/pd": hfd.Sequence(length=sizes.n_load, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
305 |
+
"input/qd": hfd.Sequence(length=sizes.n_load, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
306 |
+
"input/gen_status": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=BOOL_TYPE)),
|
307 |
+
"input/branch_status": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=BOOL_TYPE)),
|
308 |
+
"input/seed": hfd.Value(dtype=INT_TYPE),
|
309 |
+
}
|
310 |
+
|
311 |
+
def acopf_primal_features(sizes: CaseSizes):
|
312 |
+
return {
|
313 |
+
"ACOPF/primal/vm": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
314 |
+
"ACOPF/primal/va": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
315 |
+
"ACOPF/primal/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
316 |
+
"ACOPF/primal/qg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
317 |
+
"ACOPF/primal/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
318 |
+
"ACOPF/primal/pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
319 |
+
"ACOPF/primal/qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
320 |
+
"ACOPF/primal/qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
321 |
+
}
|
322 |
+
def acopf_dual_features(sizes: CaseSizes):
|
323 |
+
return {
|
324 |
+
"ACOPF/dual/kcl_p": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
325 |
+
"ACOPF/dual/kcl_q": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
326 |
+
"ACOPF/dual/vm": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
327 |
+
"ACOPF/dual/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
328 |
+
"ACOPF/dual/qg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
329 |
+
"ACOPF/dual/ohm_pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
330 |
+
"ACOPF/dual/ohm_pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
331 |
+
"ACOPF/dual/ohm_qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
332 |
+
"ACOPF/dual/ohm_qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
333 |
+
"ACOPF/dual/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
334 |
+
"ACOPF/dual/pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
335 |
+
"ACOPF/dual/qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
336 |
+
"ACOPF/dual/qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
337 |
+
"ACOPF/dual/va_diff": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
338 |
+
"ACOPF/dual/sm_fr": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
339 |
+
"ACOPF/dual/sm_to": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
340 |
+
"ACOPF/dual/slack_bus": hfd.Value(dtype=FLOAT_TYPE),
|
341 |
+
}
|
342 |
+
def dcopf_primal_features(sizes: CaseSizes):
|
343 |
+
return {
|
344 |
+
"DCOPF/primal/va": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
345 |
+
"DCOPF/primal/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
346 |
+
"DCOPF/primal/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
347 |
+
}
|
348 |
+
def dcopf_dual_features(sizes: CaseSizes):
|
349 |
+
return {
|
350 |
+
"DCOPF/dual/kcl_p": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
351 |
+
"DCOPF/dual/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
352 |
+
"DCOPF/dual/ohm_pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
353 |
+
"DCOPF/dual/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
354 |
+
"DCOPF/dual/va_diff": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
355 |
+
"DCOPF/dual/slack_bus": hfd.Value(dtype=FLOAT_TYPE),
|
356 |
+
}
|
357 |
+
def socopf_primal_features(sizes: CaseSizes):
|
358 |
+
return {
|
359 |
+
"SOCOPF/primal/w": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
360 |
+
"SOCOPF/primal/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
361 |
+
"SOCOPF/primal/qg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
362 |
+
"SOCOPF/primal/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
363 |
+
"SOCOPF/primal/pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
364 |
+
"SOCOPF/primal/qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
365 |
+
"SOCOPF/primal/qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
366 |
+
"SOCOPF/primal/wr": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
367 |
+
"SOCOPF/primal/wi": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
368 |
+
}
|
369 |
+
def socopf_dual_features(sizes: CaseSizes):
|
370 |
+
return {
|
371 |
+
"SOCOPF/dual/kcl_p": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
372 |
+
"SOCOPF/dual/kcl_q": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
373 |
+
"SOCOPF/dual/w": hfd.Sequence(length=sizes.n_bus, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
374 |
+
"SOCOPF/dual/pg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
375 |
+
"SOCOPF/dual/qg": hfd.Sequence(length=sizes.n_gen, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
376 |
+
"SOCOPF/dual/ohm_pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
377 |
+
"SOCOPF/dual/ohm_pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
378 |
+
"SOCOPF/dual/ohm_qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
379 |
+
"SOCOPF/dual/ohm_qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
380 |
+
"SOCOPF/dual/jabr": hfd.Array2D(shape=(sizes.n_branch, 4), dtype=FLOAT_TYPE),
|
381 |
+
"SOCOPF/dual/sm_fr": hfd.Array2D(shape=(sizes.n_branch, 3), dtype=FLOAT_TYPE),
|
382 |
+
"SOCOPF/dual/sm_to": hfd.Array2D(shape=(sizes.n_branch, 3), dtype=FLOAT_TYPE),
|
383 |
+
"SOCOPF/dual/va_diff": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
384 |
+
"SOCOPF/dual/wr": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
385 |
+
"SOCOPF/dual/wi": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
386 |
+
"SOCOPF/dual/pf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
387 |
+
"SOCOPF/dual/pt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
388 |
+
"SOCOPF/dual/qf": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
389 |
+
"SOCOPF/dual/qt": hfd.Sequence(length=sizes.n_branch, feature=hfd.Value(dtype=FLOAT_TYPE)),
|
390 |
+
}
|
391 |
+
|
392 |
+
# ┌───────────────┐
|
393 |
+
# │ Utilities │
|
394 |
+
# └───────────────┘
|
395 |
+
|
396 |
+
def open_maybe_gzip(path):
|
397 |
+
return gzip.open(path, "rb") if path.endswith(".gz") else open(path, "rb")
|
README.md
ADDED
@@ -0,0 +1,295 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-sa-4.0
|
3 |
+
tags:
|
4 |
+
- energy
|
5 |
+
- optimization
|
6 |
+
- optimal_power_flow
|
7 |
+
- power_grid
|
8 |
+
pretty_name: PGLearn Optimal Power Flow (57_ieee)
|
9 |
+
task_categories:
|
10 |
+
- tabular-regression
|
11 |
+
dataset_info:
|
12 |
+
config_name: 57_ieee
|
13 |
+
features:
|
14 |
+
- name: case/json
|
15 |
+
dtype: string
|
16 |
+
- name: input/pd
|
17 |
+
sequence: float32
|
18 |
+
length: 42
|
19 |
+
- name: input/qd
|
20 |
+
sequence: float32
|
21 |
+
length: 42
|
22 |
+
- name: input/gen_status
|
23 |
+
sequence: bool
|
24 |
+
length: 7
|
25 |
+
- name: input/branch_status
|
26 |
+
sequence: bool
|
27 |
+
length: 80
|
28 |
+
- name: input/seed
|
29 |
+
dtype: int64
|
30 |
+
- name: ACOPF/primal/vm
|
31 |
+
sequence: float32
|
32 |
+
length: 57
|
33 |
+
- name: ACOPF/primal/va
|
34 |
+
sequence: float32
|
35 |
+
length: 57
|
36 |
+
- name: ACOPF/primal/pg
|
37 |
+
sequence: float32
|
38 |
+
length: 7
|
39 |
+
- name: ACOPF/primal/qg
|
40 |
+
sequence: float32
|
41 |
+
length: 7
|
42 |
+
- name: ACOPF/primal/pf
|
43 |
+
sequence: float32
|
44 |
+
length: 80
|
45 |
+
- name: ACOPF/primal/pt
|
46 |
+
sequence: float32
|
47 |
+
length: 80
|
48 |
+
- name: ACOPF/primal/qf
|
49 |
+
sequence: float32
|
50 |
+
length: 80
|
51 |
+
- name: ACOPF/primal/qt
|
52 |
+
sequence: float32
|
53 |
+
length: 80
|
54 |
+
- name: ACOPF/dual/kcl_p
|
55 |
+
sequence: float32
|
56 |
+
length: 57
|
57 |
+
- name: ACOPF/dual/kcl_q
|
58 |
+
sequence: float32
|
59 |
+
length: 57
|
60 |
+
- name: ACOPF/dual/vm
|
61 |
+
sequence: float32
|
62 |
+
length: 57
|
63 |
+
- name: ACOPF/dual/pg
|
64 |
+
sequence: float32
|
65 |
+
length: 7
|
66 |
+
- name: ACOPF/dual/qg
|
67 |
+
sequence: float32
|
68 |
+
length: 7
|
69 |
+
- name: ACOPF/dual/ohm_pf
|
70 |
+
sequence: float32
|
71 |
+
length: 80
|
72 |
+
- name: ACOPF/dual/ohm_pt
|
73 |
+
sequence: float32
|
74 |
+
length: 80
|
75 |
+
- name: ACOPF/dual/ohm_qf
|
76 |
+
sequence: float32
|
77 |
+
length: 80
|
78 |
+
- name: ACOPF/dual/ohm_qt
|
79 |
+
sequence: float32
|
80 |
+
length: 80
|
81 |
+
- name: ACOPF/dual/pf
|
82 |
+
sequence: float32
|
83 |
+
length: 80
|
84 |
+
- name: ACOPF/dual/pt
|
85 |
+
sequence: float32
|
86 |
+
length: 80
|
87 |
+
- name: ACOPF/dual/qf
|
88 |
+
sequence: float32
|
89 |
+
length: 80
|
90 |
+
- name: ACOPF/dual/qt
|
91 |
+
sequence: float32
|
92 |
+
length: 80
|
93 |
+
- name: ACOPF/dual/va_diff
|
94 |
+
sequence: float32
|
95 |
+
length: 80
|
96 |
+
- name: ACOPF/dual/sm_fr
|
97 |
+
sequence: float32
|
98 |
+
length: 80
|
99 |
+
- name: ACOPF/dual/sm_to
|
100 |
+
sequence: float32
|
101 |
+
length: 80
|
102 |
+
- name: ACOPF/dual/slack_bus
|
103 |
+
dtype: float32
|
104 |
+
- name: ACOPF/meta/seed
|
105 |
+
dtype: int64
|
106 |
+
- name: ACOPF/meta/formulation
|
107 |
+
dtype: string
|
108 |
+
- name: ACOPF/meta/primal_objective_value
|
109 |
+
dtype: float32
|
110 |
+
- name: ACOPF/meta/dual_objective_value
|
111 |
+
dtype: float32
|
112 |
+
- name: ACOPF/meta/primal_status
|
113 |
+
dtype: string
|
114 |
+
- name: ACOPF/meta/dual_status
|
115 |
+
dtype: string
|
116 |
+
- name: ACOPF/meta/termination_status
|
117 |
+
dtype: string
|
118 |
+
- name: ACOPF/meta/build_time
|
119 |
+
dtype: float32
|
120 |
+
- name: ACOPF/meta/extract_time
|
121 |
+
dtype: float32
|
122 |
+
- name: ACOPF/meta/solve_time
|
123 |
+
dtype: float32
|
124 |
+
- name: DCOPF/primal/va
|
125 |
+
sequence: float32
|
126 |
+
length: 57
|
127 |
+
- name: DCOPF/primal/pg
|
128 |
+
sequence: float32
|
129 |
+
length: 7
|
130 |
+
- name: DCOPF/primal/pf
|
131 |
+
sequence: float32
|
132 |
+
length: 80
|
133 |
+
- name: DCOPF/dual/kcl_p
|
134 |
+
sequence: float32
|
135 |
+
length: 57
|
136 |
+
- name: DCOPF/dual/pg
|
137 |
+
sequence: float32
|
138 |
+
length: 7
|
139 |
+
- name: DCOPF/dual/ohm_pf
|
140 |
+
sequence: float32
|
141 |
+
length: 80
|
142 |
+
- name: DCOPF/dual/pf
|
143 |
+
sequence: float32
|
144 |
+
length: 80
|
145 |
+
- name: DCOPF/dual/va_diff
|
146 |
+
sequence: float32
|
147 |
+
length: 80
|
148 |
+
- name: DCOPF/dual/slack_bus
|
149 |
+
dtype: float32
|
150 |
+
- name: DCOPF/meta/seed
|
151 |
+
dtype: int64
|
152 |
+
- name: DCOPF/meta/formulation
|
153 |
+
dtype: string
|
154 |
+
- name: DCOPF/meta/primal_objective_value
|
155 |
+
dtype: float32
|
156 |
+
- name: DCOPF/meta/dual_objective_value
|
157 |
+
dtype: float32
|
158 |
+
- name: DCOPF/meta/primal_status
|
159 |
+
dtype: string
|
160 |
+
- name: DCOPF/meta/dual_status
|
161 |
+
dtype: string
|
162 |
+
- name: DCOPF/meta/termination_status
|
163 |
+
dtype: string
|
164 |
+
- name: DCOPF/meta/build_time
|
165 |
+
dtype: float32
|
166 |
+
- name: DCOPF/meta/extract_time
|
167 |
+
dtype: float32
|
168 |
+
- name: DCOPF/meta/solve_time
|
169 |
+
dtype: float32
|
170 |
+
- name: SOCOPF/primal/w
|
171 |
+
sequence: float32
|
172 |
+
length: 57
|
173 |
+
- name: SOCOPF/primal/pg
|
174 |
+
sequence: float32
|
175 |
+
length: 7
|
176 |
+
- name: SOCOPF/primal/qg
|
177 |
+
sequence: float32
|
178 |
+
length: 7
|
179 |
+
- name: SOCOPF/primal/pf
|
180 |
+
sequence: float32
|
181 |
+
length: 80
|
182 |
+
- name: SOCOPF/primal/pt
|
183 |
+
sequence: float32
|
184 |
+
length: 80
|
185 |
+
- name: SOCOPF/primal/qf
|
186 |
+
sequence: float32
|
187 |
+
length: 80
|
188 |
+
- name: SOCOPF/primal/qt
|
189 |
+
sequence: float32
|
190 |
+
length: 80
|
191 |
+
- name: SOCOPF/primal/wr
|
192 |
+
sequence: float32
|
193 |
+
length: 80
|
194 |
+
- name: SOCOPF/primal/wi
|
195 |
+
sequence: float32
|
196 |
+
length: 80
|
197 |
+
- name: SOCOPF/dual/kcl_p
|
198 |
+
sequence: float32
|
199 |
+
length: 57
|
200 |
+
- name: SOCOPF/dual/kcl_q
|
201 |
+
sequence: float32
|
202 |
+
length: 57
|
203 |
+
- name: SOCOPF/dual/w
|
204 |
+
sequence: float32
|
205 |
+
length: 57
|
206 |
+
- name: SOCOPF/dual/pg
|
207 |
+
sequence: float32
|
208 |
+
length: 7
|
209 |
+
- name: SOCOPF/dual/qg
|
210 |
+
sequence: float32
|
211 |
+
length: 7
|
212 |
+
- name: SOCOPF/dual/ohm_pf
|
213 |
+
sequence: float32
|
214 |
+
length: 80
|
215 |
+
- name: SOCOPF/dual/ohm_pt
|
216 |
+
sequence: float32
|
217 |
+
length: 80
|
218 |
+
- name: SOCOPF/dual/ohm_qf
|
219 |
+
sequence: float32
|
220 |
+
length: 80
|
221 |
+
- name: SOCOPF/dual/ohm_qt
|
222 |
+
sequence: float32
|
223 |
+
length: 80
|
224 |
+
- name: SOCOPF/dual/jabr
|
225 |
+
dtype:
|
226 |
+
array2_d:
|
227 |
+
shape:
|
228 |
+
- 80
|
229 |
+
- 4
|
230 |
+
dtype: float32
|
231 |
+
- name: SOCOPF/dual/sm_fr
|
232 |
+
dtype:
|
233 |
+
array2_d:
|
234 |
+
shape:
|
235 |
+
- 80
|
236 |
+
- 3
|
237 |
+
dtype: float32
|
238 |
+
- name: SOCOPF/dual/sm_to
|
239 |
+
dtype:
|
240 |
+
array2_d:
|
241 |
+
shape:
|
242 |
+
- 80
|
243 |
+
- 3
|
244 |
+
dtype: float32
|
245 |
+
- name: SOCOPF/dual/va_diff
|
246 |
+
sequence: float32
|
247 |
+
length: 80
|
248 |
+
- name: SOCOPF/dual/wr
|
249 |
+
sequence: float32
|
250 |
+
length: 80
|
251 |
+
- name: SOCOPF/dual/wi
|
252 |
+
sequence: float32
|
253 |
+
length: 80
|
254 |
+
- name: SOCOPF/dual/pf
|
255 |
+
sequence: float32
|
256 |
+
length: 80
|
257 |
+
- name: SOCOPF/dual/pt
|
258 |
+
sequence: float32
|
259 |
+
length: 80
|
260 |
+
- name: SOCOPF/dual/qf
|
261 |
+
sequence: float32
|
262 |
+
length: 80
|
263 |
+
- name: SOCOPF/dual/qt
|
264 |
+
sequence: float32
|
265 |
+
length: 80
|
266 |
+
- name: SOCOPF/meta/seed
|
267 |
+
dtype: int64
|
268 |
+
- name: SOCOPF/meta/formulation
|
269 |
+
dtype: string
|
270 |
+
- name: SOCOPF/meta/primal_objective_value
|
271 |
+
dtype: float32
|
272 |
+
- name: SOCOPF/meta/dual_objective_value
|
273 |
+
dtype: float32
|
274 |
+
- name: SOCOPF/meta/primal_status
|
275 |
+
dtype: string
|
276 |
+
- name: SOCOPF/meta/dual_status
|
277 |
+
dtype: string
|
278 |
+
- name: SOCOPF/meta/termination_status
|
279 |
+
dtype: string
|
280 |
+
- name: SOCOPF/meta/build_time
|
281 |
+
dtype: float32
|
282 |
+
- name: SOCOPF/meta/extract_time
|
283 |
+
dtype: float32
|
284 |
+
- name: SOCOPF/meta/solve_time
|
285 |
+
dtype: float32
|
286 |
+
splits:
|
287 |
+
- name: train
|
288 |
+
num_bytes: 112505746990
|
289 |
+
num_examples: 799888
|
290 |
+
- name: test
|
291 |
+
num_bytes: 28126577400
|
292 |
+
num_examples: 199973
|
293 |
+
download_size: 14799215155
|
294 |
+
dataset_size: 140632324390
|
295 |
+
---
|
case.json.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f80a2fd57a2640543c52ac39d62a4d8d236ab43f759f023d3770f1472aa42e7b
|
3 |
+
size 45711
|
config.toml
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Name of the reference PGLib case. Must be a valid PGLib case name.
|
2 |
+
pglib_case = "pglib_opf_case57_ieee"
|
3 |
+
floating_point_type = "Float32"
|
4 |
+
|
5 |
+
[sampler]
|
6 |
+
# data sampler options
|
7 |
+
[sampler.load]
|
8 |
+
noise_type = "ScaledUniform"
|
9 |
+
l = 0.6 # Lower bound of base load factor
|
10 |
+
u = 1.0 # Upper bound of base load factor
|
11 |
+
sigma = 0.20 # Relative (multiplicative) noise level.
|
12 |
+
|
13 |
+
|
14 |
+
[OPF]
|
15 |
+
|
16 |
+
[OPF.ACOPF]
|
17 |
+
type = "ACOPF"
|
18 |
+
solver.name = "Ipopt"
|
19 |
+
solver.attributes.tol = 1e-6
|
20 |
+
solver.attributes.linear_solver = "ma27"
|
21 |
+
|
22 |
+
[OPF.DCOPF]
|
23 |
+
# Formulation/solver options
|
24 |
+
type = "DCOPF"
|
25 |
+
solver.name = "HiGHS"
|
26 |
+
|
27 |
+
[OPF.SOCOPF]
|
28 |
+
type = "SOCOPF"
|
29 |
+
solver.name = "Clarabel"
|
30 |
+
# Tight tolerances
|
31 |
+
solver.attributes.tol_gap_abs = 1e-6
|
32 |
+
solver.attributes.tol_gap_rel = 1e-6
|
33 |
+
solver.attributes.tol_feas = 1e-6
|
34 |
+
solver.attributes.tol_infeas_rel = 1e-6
|
35 |
+
solver.attributes.tol_ktratio = 1e-6
|
36 |
+
# Reduced accuracy settings
|
37 |
+
solver.attributes.reduced_tol_gap_abs = 1e-6
|
38 |
+
solver.attributes.reduced_tol_gap_rel = 1e-6
|
39 |
+
solver.attributes.reduced_tol_feas = 1e-6
|
40 |
+
solver.attributes.reduced_tol_infeas_abs = 1e-6
|
41 |
+
solver.attributes.reduced_tol_infeas_rel = 1e-6
|
42 |
+
solver.attributes.reduced_tol_ktratio = 1e-6
|
infeasible/ACOPF/dual.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6269912e562525d8678838fe7e2ac250c0d2cbc94dc0507a6db0b0174c2d010b
|
3 |
+
size 538865
|
infeasible/ACOPF/meta.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:27a94003515da14380fc3b43a7adad86208c73b7ce4b830db1625afd0638d0f2
|
3 |
+
size 6727
|
infeasible/ACOPF/primal.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:14413fa91c281d44151d6f8db8a4adbd65f449b78f8e04f39c5c4e63f223c75c
|
3 |
+
size 222187
|
infeasible/DCOPF/dual.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:31ea3e008c2b29308a112d9f218caf5d4ca0a534ae7799220abd9ce6c65cda92
|
3 |
+
size 4070
|
infeasible/DCOPF/meta.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9322f4cd466e42534e1a9830bc431e9fd15819e051949be8ba44cb9f27e8f98f
|
3 |
+
size 5965
|
infeasible/DCOPF/primal.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6c5e8225691c73e302f721451b6117a4a6d20511baa0ab63fa3dce9246353adc
|
3 |
+
size 69969
|
infeasible/SOCOPF/dual.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e7b38c583c018554e6c12cae630bcf866c50924c68c220f5ab3e21d7531e3b43
|
3 |
+
size 935676
|
infeasible/SOCOPF/meta.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e6da1fee912ba3839a67079ed017dd84f6a28759cd74a90533ebfba3bd022961
|
3 |
+
size 6630
|
infeasible/SOCOPF/primal.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d4e8ab2ea443de575a1c1a15f27dd48eccd21ce6bfe14310ab958b48438bb104
|
3 |
+
size 274549
|
infeasible/input.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cbdca03e3a4bc7a0fa2e2ce40a69d60bf65097bd39cd077b2a31c93d2b538dbd
|
3 |
+
size 43769
|
test/ACOPF/dual.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:474bdd9321e1b504045835d0ef9c72c4251c67a96d17e53d9e338696d8ce7082
|
3 |
+
size 725154412
|
test/ACOPF/meta.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b7e19fcb83117847817fe928df10136fc7eb05cad9da273374db4f83c565d0eb
|
3 |
+
size 6677088
|
test/ACOPF/primal.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7b4067531685667a03ee0f52390c97d4a2c8a68b8028bd6c1e4bf9b24d8ec840
|
3 |
+
size 319029219
|
test/DCOPF/dual.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2b97c3f16e9669a77adbca532385513f3eb71e97a60f6ee6cf4072881efcaee3
|
3 |
+
size 1456126
|
test/DCOPF/meta.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f1ceeecf87e0c0d30f0818dffe3013f8378afe070936cd83f5e4703d02ddc8c5
|
3 |
+
size 6499391
|
test/DCOPF/primal.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1095d19fe47feb4b52fbc35e9c943c1744afce226a0555088d2ac58e39215d24
|
3 |
+
size 99521518
|
test/SOCOPF/dual.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d0e8d2c5e0bd5f5b4fe47653167b54c265bb9c1313287682d13ecee1ef220320
|
3 |
+
size 1340764453
|
test/SOCOPF/meta.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:56e002629111c76475bf73cfaf29722f96f7e7197f267f5d0ab6cde509b6ef7a
|
3 |
+
size 6809607
|
test/SOCOPF/primal.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1bfe1f70f0b64346b166f25a57fac648ad7fa40b21ebf07624da39abbf580503
|
3 |
+
size 392701362
|
test/input.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dcc8247c77f84c8f884a91a8823a32a23f968a9aab5584190fabe5523a102c97
|
3 |
+
size 61285774
|
train/ACOPF/dual.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0d4ad86e6a06085090cf6ae79bbcce8909228733ccb1372152bcd85603841b60
|
3 |
+
size 2900618218
|
train/ACOPF/meta.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3c99033d5cbba5bb53d3ed8a964214f02d8bfd7ef3ff7a501ead375ee63774ae
|
3 |
+
size 26624315
|
train/ACOPF/primal.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:83788768456adcbf941f164322715312371d3b475d38193d8cadd43699c6cfb8
|
3 |
+
size 1276098780
|
train/DCOPF/dual.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:80c92e9cb495e34fe83763e863695cc2a0199fe716c32ef0b862422b0c393036
|
3 |
+
size 5838465
|
train/DCOPF/meta.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dad74f7b0107a5c4027b947b3316ee375ae21b7909c3e6bc4a3c6a26b0dbd567
|
3 |
+
size 25895349
|
train/DCOPF/primal.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4d2f3364767c7e07f25e1ea234d2076e65a5562a4a3314e9ab10691464961ebc
|
3 |
+
size 398080934
|
train/SOCOPF/dual.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1726f1d295fa997185fb22d27076329a229aa69c70fc59b59bb45391d09dce20
|
3 |
+
size 5363061271
|
train/SOCOPF/meta.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9afaf7934b52e6a52a63fe453fd385a95f37df63eebd929f1844e7a6508183fc
|
3 |
+
size 27148938
|
train/SOCOPF/primal.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:26dc57108d993b49e20cf8a94ab9054c5a1b44d8b7035a71c24ffec04dd6d40b
|
3 |
+
size 1570791098
|
train/input.h5.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e38fb5a8056e457c8f23ffadf0de6fa9177c3747655c32a22aea0f5d2eb3e02b
|
3 |
+
size 245113126
|