EridanusQ commited on
Commit ·
854c968
1
Parent(s): 41b556c
update dataset repository README
Browse files
README.md
CHANGED
|
@@ -4,6 +4,7 @@ task_categories:
|
|
| 4 |
- other
|
| 5 |
language:
|
| 6 |
- en
|
|
|
|
| 7 |
tags:
|
| 8 |
- mixed-integer-programming
|
| 9 |
- power-systems
|
|
@@ -12,189 +13,135 @@ tags:
|
|
| 12 |
- mps
|
| 13 |
- benchmark
|
| 14 |
size_categories:
|
| 15 |
-
-
|
| 16 |
-
|
| 17 |
---
|
| 18 |
|
| 19 |
-
# UnitCommitment Trajectory
|
| 20 |
-
|
| 21 |
-
本仓库用于从 UnitCommitment.jl 的 Matpower 机组组合(UC)实例生成标准 `.mps` 文件,供混合整数规划(MIP)、机组组合(UC)及安全约束机组组合(SCUC)模型求解器测试与基准研究使用。
|
| 22 |
-
|
| 23 |
-
仓库地址:[EridanusQ/UnitCommitment_Trajectory · Datasets at Hugging Face](https://huggingface.co/datasets/EridanusQ/UnitCommitment_Trajectory)
|
| 24 |
-
|
| 25 |
-
## 1. 数据规模
|
| 26 |
-
|
| 27 |
-
`UnitCommitment_Trajectory_Test/instances/matpower` 下共有 **26** 个 Matpower case,**9487** 个 `.json.gz` 输入实例。每个实例生成 4 个 `.mps`,全量输出预计 **37948** 个文件。
|
| 28 |
-
|
| 29 |
-
| Case | 输入实例数 |
|
| 30 |
-
| :-------------- | ---------: |
|
| 31 |
-
| case118 | 365 |
|
| 32 |
-
| case1354pegase | 365 |
|
| 33 |
-
| case13659pegase | 365 |
|
| 34 |
-
| case14 | 365 |
|
| 35 |
-
| case1888rte | 365 |
|
| 36 |
-
| case1951rte | 365 |
|
| 37 |
-
| case2383wp | 365 |
|
| 38 |
-
| case2736sp | 365 |
|
| 39 |
-
| case2737sop | 365 |
|
| 40 |
-
| case2746wop | 365 |
|
| 41 |
-
| case2746wp | 365 |
|
| 42 |
-
| case2848rte | 365 |
|
| 43 |
-
| case2868rte | 365 |
|
| 44 |
-
| case2869pegase | 365 |
|
| 45 |
-
| case30 | 365 |
|
| 46 |
-
| case300 | 365 |
|
| 47 |
-
| case3012wp | 365 |
|
| 48 |
-
| case3120sp | 365 |
|
| 49 |
-
| case3375wp | 365 |
|
| 50 |
-
| case57 | 362 |
|
| 51 |
-
| case6468rte | 365 |
|
| 52 |
-
| case6470rte | 365 |
|
| 53 |
-
| case6495rte | 365 |
|
| 54 |
-
| case6515rte | 365 |
|
| 55 |
-
| case89pegase | 365 |
|
| 56 |
-
| case9241pegase | 365 |
|
| 57 |
-
|
| 58 |
-
## 2. 目录结构
|
| 59 |
-
|
| 60 |
-
```text
|
| 61 |
-
UnitCommitment_Trajectory/
|
| 62 |
-
├── README.md
|
| 63 |
-
├── UnitCommitment_Trajectory_Test/
|
| 64 |
-
│ ├── Project.toml
|
| 65 |
-
│ ├── Manifest.toml
|
| 66 |
-
│ ├── generate_dataset.jl # 批量生成 MPS 主脚本
|
| 67 |
-
│ ├── create_scuc_mps_files.jl # 单算例调试脚本
|
| 68 |
-
│ ├── instances/
|
| 69 |
-
│ │ └── matpower/ # 原始 .json.gz 输入实例
|
| 70 |
-
│ ├── benchmark/
|
| 71 |
-
│ │ └── scripts/
|
| 72 |
-
│ │ └── download_matpower_instances.py
|
| 73 |
-
│ ├── src/ # 修改版 UnitCommitment.jl 源码
|
| 74 |
-
│ └── ...
|
| 75 |
-
└── UnitCommitment_Trajectory_Dataset/ # 输出的 .mps 文件目录
|
| 76 |
-
```
|
| 77 |
-
|
| 78 |
-
> 后文所有命令均在 `UnitCommitment_Trajectory_Test` 目录下执行,路径均相对于该目录。
|
| 79 |
-
|
| 80 |
-
## 3. 环境准备
|
| 81 |
|
| 82 |
-
|
| 83 |
-
- **Python 3**:仅用于下载脚本,无需额外依赖。
|
| 84 |
|
| 85 |
-
|
| 86 |
-
cd UnitCommitment_Trajectory\UnitCommitment_Trajectory_Test
|
| 87 |
-
julia --project=. -e "using Pkg; Pkg.instantiate()"
|
| 88 |
-
```
|
| 89 |
-
|
| 90 |
-
## 4. 下载原始 Matpower 输入数据
|
| 91 |
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
|
| 95 |
-
# 下载全年数据(最常用)
|
| 96 |
-
python benchmark\scripts\download_matpower_instances.py
|
| 97 |
|
| 98 |
-
|
| 99 |
-
python benchmark\scripts\download_matpower_instances.py --list-cases
|
| 100 |
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
```
|
|
|
|
|
|
|
| 104 |
|
| 105 |
-
|
| 106 |
|
| 107 |
-
```
|
| 108 |
-
|
|
|
|
|
|
|
| 109 |
```
|
| 110 |
|
| 111 |
-
##
|
| 112 |
|
| 113 |
-
|
| 114 |
|
| 115 |
```text
|
| 116 |
case_name/
|
| 117 |
-
├── hourly_noline/
|
| 118 |
-
├── hourly_withline/
|
| 119 |
-
├── subhourly_noline/
|
| 120 |
-
└── subhourly_withline/
|
| 121 |
```
|
| 122 |
|
| 123 |
-
|
| 124 |
-
例如:`case30_2017-01-01_h_noline.mps`(`h` = hourly,`s` = subhourly)。
|
| 125 |
|
| 126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
| 128 |
-
|
| 129 |
|
| 130 |
-
```
|
| 131 |
-
|
| 132 |
```
|
| 133 |
|
| 134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
-
|
| 137 |
|
| 138 |
-
##
|
| 139 |
|
| 140 |
-
|
| 141 |
|
| 142 |
```powershell
|
| 143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
```
|
| 145 |
|
| 146 |
-
|
| 147 |
|
| 148 |
-
###
|
| 149 |
|
| 150 |
```powershell
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
Remove-Item Env:\UC_CASES
|
| 154 |
```
|
| 155 |
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
## 8. 检查 MPS 输出结果
|
| 159 |
-
|
| 160 |
-
在 `UnitCommitment_Trajectory_Test` 目录下执行:
|
| 161 |
|
| 162 |
```powershell
|
| 163 |
-
|
| 164 |
-
Get-ChildItem ..\UnitCommitment_Trajectory_Dataset -Recurse -Filter *.mps | Measure-Object
|
| 165 |
```
|
| 166 |
|
| 167 |
-
##
|
| 168 |
|
| 169 |
-
``
|
| 170 |
-
cd UnitCommitment_Trajectory\UnitCommitment_Trajectory_Test
|
| 171 |
|
| 172 |
-
|
| 173 |
-
julia --project=. -e "using Pkg; Pkg.instantiate()"
|
| 174 |
|
| 175 |
-
|
| 176 |
-
|
|
|
|
|
|
|
|
|
|
| 177 |
|
| 178 |
-
|
| 179 |
-
Get-ChildItem instances\matpower -Recurse -Filter *.json.gz | Measure-Object
|
| 180 |
|
| 181 |
-
#
|
| 182 |
-
julia --project=. generate_dataset.jl
|
| 183 |
-
|
| 184 |
-
# 5. 检查最终 MPS 文件数
|
| 185 |
-
Get-ChildItem ..\UnitCommitment_Trajectory_Dataset -Recurse -Filter *.mps | Measure-Object
|
| 186 |
-
```
|
| 187 |
|
| 188 |
-
|
| 189 |
|
| 190 |
-
|
|
|
|
|
|
|
|
|
|
| 191 |
|
| 192 |
-
|
| 193 |
-
- `src/instance/modify.jl`:实例预处理
|
| 194 |
|
| 195 |
-
|
| 196 |
|
| 197 |
-
|
| 198 |
|
| 199 |
-
|
| 200 |
-
[10.5281/zenodo.4269874](https://doi.org/10.5281/zenodo.4269874)
|
|
|
|
| 4 |
- other
|
| 5 |
language:
|
| 6 |
- en
|
| 7 |
+
- zh
|
| 8 |
tags:
|
| 9 |
- mixed-integer-programming
|
| 10 |
- power-systems
|
|
|
|
| 13 |
- mps
|
| 14 |
- benchmark
|
| 15 |
size_categories:
|
| 16 |
+
- 1K<n<10K
|
|
|
|
| 17 |
---
|
| 18 |
|
| 19 |
+
# UnitCommitment Trajectory Dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
This repository stores generated Unit Commitment trajectory benchmark data.
|
|
|
|
| 22 |
|
| 23 |
+
The project is split into two repositories:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
+
- Code repository: `EridanusQ/UnitCommitment_Trajectory`
|
| 26 |
+
- generation scripts
|
| 27 |
+
- modified UnitCommitment.jl source code
|
| 28 |
+
- Matpower instance download and preprocessing workflow
|
| 29 |
+
- documentation for reproducing the MPS generation process
|
| 30 |
+
- Dataset repository: `EridanusQ/UnitCommitment_Trajectory_Dataset`
|
| 31 |
+
- this Hugging Face Dataset repository
|
| 32 |
+
- generated `.mps` benchmark files
|
| 33 |
+
- one data case per Git branch
|
| 34 |
+
- each branch stores the case as a compressed `.tar.gz` archive
|
| 35 |
|
| 36 |
+
## Repository Layout
|
|
|
|
|
|
|
| 37 |
|
| 38 |
+
The `main` branch is the landing page for the dataset repository. Data are stored on separate branches.
|
|
|
|
| 39 |
|
| 40 |
+
| Branch | Archive | Contents |
|
| 41 |
+
| --- | --- | --- |
|
| 42 |
+
| `case3375wp` | `case3375wp.tar.gz` | Generated MPS files for `case3375wp` |
|
| 43 |
+
| `case6515rte` | `case6515rte.tar.gz` | Generated MPS files for `case6515rte` |
|
| 44 |
+
| `case9241pegase` | `case9241pegase.tar.gz` | Generated MPS files for `case9241pegase` |
|
| 45 |
|
| 46 |
+
More case branches can be added using the same convention:
|
| 47 |
|
| 48 |
+
```text
|
| 49 |
+
branch name: <case_name>
|
| 50 |
+
archive name: <case_name>.tar.gz
|
| 51 |
+
archive root: <case_name>/
|
| 52 |
```
|
| 53 |
|
| 54 |
+
## Archive Contents
|
| 55 |
|
| 56 |
+
After extracting a case archive, the directory structure is:
|
| 57 |
|
| 58 |
```text
|
| 59 |
case_name/
|
| 60 |
+
├── hourly_noline/
|
| 61 |
+
├── hourly_withline/
|
| 62 |
+
├── subhourly_noline/
|
| 63 |
+
└── subhourly_withline/
|
| 64 |
```
|
| 65 |
|
| 66 |
+
The four variants represent:
|
|
|
|
| 67 |
|
| 68 |
+
| Directory | Description |
|
| 69 |
+
| --- | --- |
|
| 70 |
+
| `hourly_noline` | Hourly UC instances without transmission line constraints |
|
| 71 |
+
| `hourly_withline` | Hourly SCUC instances with transmission line constraints |
|
| 72 |
+
| `subhourly_noline` | Sub-hourly UC instances without transmission line constraints |
|
| 73 |
+
| `subhourly_withline` | Sub-hourly SCUC instances with transmission line constraints |
|
| 74 |
|
| 75 |
+
File names follow:
|
| 76 |
|
| 77 |
+
```text
|
| 78 |
+
<case>_<date>_<resolution>_<network>.mps
|
| 79 |
```
|
| 80 |
|
| 81 |
+
For example:
|
| 82 |
+
|
| 83 |
+
```text
|
| 84 |
+
case3375wp_2017-05-01_s_withline.mps
|
| 85 |
+
case6515rte_2017-08-01_h_noline.mps
|
| 86 |
+
case9241pegase_2017-02-25_h_noline.mps
|
| 87 |
+
```
|
| 88 |
|
| 89 |
+
where `h` means hourly and `s` means sub-hourly.
|
| 90 |
|
| 91 |
+
## Download
|
| 92 |
|
| 93 |
+
### Download With Hugging Face CLI
|
| 94 |
|
| 95 |
```powershell
|
| 96 |
+
huggingface-cli download EridanusQ/UnitCommitment_Trajectory_Dataset `
|
| 97 |
+
case3375wp.tar.gz `
|
| 98 |
+
--repo-type dataset `
|
| 99 |
+
--revision case3375wp `
|
| 100 |
+
--local-dir data/case3375wp
|
| 101 |
```
|
| 102 |
|
| 103 |
+
Replace `case3375wp` with the target branch/case name.
|
| 104 |
|
| 105 |
+
### Download With Git LFS
|
| 106 |
|
| 107 |
```powershell
|
| 108 |
+
git lfs install
|
| 109 |
+
git clone -b case3375wp https://huggingface.co/datasets/EridanusQ/UnitCommitment_Trajectory_Dataset
|
|
|
|
| 110 |
```
|
| 111 |
|
| 112 |
+
Then extract the archive:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
```powershell
|
| 115 |
+
tar -xzf case3375wp.tar.gz
|
|
|
|
| 116 |
```
|
| 117 |
|
| 118 |
+
## Dataset Generation
|
| 119 |
|
| 120 |
+
The generated data come from Matpower Unit Commitment instances and are exported as standard `.mps` files for mixed-integer programming solver benchmarking.
|
|
|
|
| 121 |
|
| 122 |
+
The generation workflow is maintained in the separate code repository, not in this dataset repository. Please use the code repository for:
|
|
|
|
| 123 |
|
| 124 |
+
- environment setup
|
| 125 |
+
- downloading source Matpower instances
|
| 126 |
+
- modifying or inspecting UnitCommitment.jl model code
|
| 127 |
+
- regenerating MPS files
|
| 128 |
+
- reproducing the trajectory constraints and preprocessing logic
|
| 129 |
|
| 130 |
+
This dataset repository is intended to be lightweight to browse: each branch contains only the compressed generated output for one case.
|
|
|
|
| 131 |
|
| 132 |
+
## Storage Policy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
+
Do not commit expanded `.mps` directories to this repository. For each case:
|
| 135 |
|
| 136 |
+
1. Generate the case directory locally.
|
| 137 |
+
2. Compress it as `<case_name>.tar.gz`.
|
| 138 |
+
3. Commit the archive to the matching branch.
|
| 139 |
+
4. Track the archive with Git LFS.
|
| 140 |
|
| 141 |
+
This keeps each branch easy to download and avoids thousands of large text files in the Git tree.
|
|
|
|
| 142 |
|
| 143 |
+
## Citation
|
| 144 |
|
| 145 |
+
The original UnitCommitment.jl project is available at:
|
| 146 |
|
| 147 |
+
[10.5281/zenodo.4269874](https://doi.org/10.5281/zenodo.4269874)
|
|
|