andrewrosemberg commited on
Commit
113e8ae
·
verified ·
1 Parent(s): 31d2b9e

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +100 -0
README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ # For reference on dataset card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1
3
+ # Doc / guide: https://huggingface.co/docs/hub/datasets-cards
4
+ {}
5
+ ---
6
+
7
+ # Dataset Card for Parametric Optimization Problems
8
+
9
+ <!-- Provide a quick summary of the dataset. -->
10
+ This dataset is a collection of parametrized optimization problems stored in [MathOptFormat](https://jump.dev/MathOptFormat/) (`.mof.json`) files. Each file encodes a mathematical optimization problem—its objective, constraints, and parameters—using a standardized data structure for portability and ease of parsing.
11
+
12
+ ## Dataset Details
13
+
14
+ ### Dataset Description
15
+
16
+ <!-- Provide a longer summary of what this dataset is. -->
17
+ Parametric optimization problems arise in scenarios where certain elements (e.g., coefficients, constraints) may vary according to problem parameters. This collection gathers different problem instances across various domains (e.g., power systems, control, resource allocation) in a uniform JSON-based format. Users can load, modify, and solve these problems with specialized libraries—particularly with the [LearningToOptimize.jl](https://github.com/andrewrosemberg/LearningToOptimize.jl) package in Julia.
18
+
19
+ A general form of a parameterized convex optimization problem is
20
+
21
+ ```math
22
+ \begin{aligned}
23
+ &{\underset {x}{\operatorname {minimize} }}&&f(x; \theta)\\&\operatorname {subject\;to} &&g_{i}(x; \theta)\leq 0,\quad i=1,\dots ,m\\&&&A(\theta) x = b(\theta)
24
+ \end{aligned}
25
+ ```
26
+
27
+ where \\( \theta \\) is the parameter. In different fields, these parameters go by different names:
28
+
29
+ 1. Hyperparameters in machine learning
30
+ 2. Risk aversion or other backtesing parameters in financial modelling
31
+ 3. Parameterized systems in control theory
32
+
33
+ **Key Features:**
34
+ - **Parametrized Constraints**: The parameters appear as variables in the `function` part of a constraint, with the constraint `set` field set to `"Parameter"`.
35
+ - **Consistent JSON Structure**: This ensures straightforward programmatic parsing, enabling large-scale experimentation with solvers or ML-based proxies.
36
+
37
+ - **Curated by:** [Andrew Rosemberg & Contributors]
38
+
39
+ ## Usage
40
+
41
+ Using the [LearningToOptimize.jl](https://github.com/andrewrosemberg/LearningToOptimize.jl) package in julia,
42
+ users can generate problem variants by sampling parameter values follwing defined rules:
43
+
44
+ ```julia
45
+ using LearningToOptimize
46
+
47
+ general_sampler(
48
+ "PGLib/Load/ACPPowerModel/pglib_opf_case3_lmbd.m_ACPPowerModel_load.mof.json";
49
+ samplers=[
50
+ (original_parameters) -> scaled_distribution_sampler(original_parameters, 10000),
51
+ (original_parameters) -> line_sampler(original_parameters, 1.01:0.01:1.25),
52
+ (original_parameters) -> box_sampler(original_parameters, 300),
53
+ ],
54
+ )
55
+
56
+ ```
57
+
58
+ where `scaled_distribution_sampler`, `line_sampler` and `box_sampler` are some examples of built in samplers.
59
+
60
+
61
+ ### Dataset Sources
62
+
63
+ <!-- Provide the basic links for the dataset. -->
64
+ - **PGLib:** [power-grid-lib](https://github.com/power-grid-lib/pglib-opf)
65
+
66
+ ## Uses
67
+
68
+ <!-- Address questions around how the dataset is intended to be used. -->
69
+ ### Direct Use
70
+ These problems can be directly used to:
71
+ - Test **solver performance** on a variety of instances.
72
+ - **Benchmark** machine learning models that learn optimization proxies.
73
+ - Generate **synthetic scenarios** by applying parametric samplers for stress-testing or research.
74
+
75
+ ### Out-of-Scope Use
76
+ - The dataset is not intended for training general-purpose NLP or computer vision models.
77
+ - Direct personal or sensitive information is not included, so any privacy-infringing use does not apply.
78
+
79
+ ## Dataset Structure
80
+
81
+ TBD
82
+
83
+ ## File Structure
84
+ In a typical `.mof.json` file, you will find:
85
+ - **Objectives**: Specifies the optimization sense (e.g., `Min`, `Max`) and the functions to be optimized.
86
+ - **Variables**: A list of decision variables, potentially including parameters as special variable entries.
87
+ - **Constraints**: Each constraint references a function (made up of one or more variables) and a set specifying bounds, including `Parameter` sets for parametric variables.
88
+
89
+ An example snippet for a parameter:
90
+ ```json
91
+ {
92
+ "function": {
93
+ "name": "name_of_parameter",
94
+ "type": "Variable"
95
+ },
96
+ "set": {
97
+ "type": "Parameter",
98
+ "value": 1.0
99
+ }
100
+ }