From 95556c02a226274db4a24d3a50ca40498d37dd2d Mon Sep 17 00:00:00 2001 From: Alinson S Xavier Date: Thu, 27 May 2021 17:20:44 -0500 Subject: [PATCH] Update docs --- 0.2/_sources/benchmark.md.txt | 177 ----------- 0.2/_sources/customization.md.txt | 182 ------------ 0.2/_sources/instances.md.txt | 2 +- 0.2/_sources/model.md.txt | 6 - 0.2/_sources/usage.md.txt | 2 +- 0.2/benchmark/index.html | 472 ------------------------------ 0.2/customization/index.html | 427 --------------------------- 0.2/instances/index.html | 2 +- 0.2/model/index.html | 9 - 0.2/objects.inv | Bin 356 -> 319 bytes 0.2/searchindex.js | 2 +- 0.2/usage/index.html | 2 +- 12 files changed, 5 insertions(+), 1278 deletions(-) delete mode 100644 0.2/_sources/benchmark.md.txt delete mode 100644 0.2/_sources/customization.md.txt delete mode 100644 0.2/benchmark/index.html delete mode 100644 0.2/customization/index.html diff --git a/0.2/_sources/benchmark.md.txt b/0.2/_sources/benchmark.md.txt deleted file mode 100644 index 88b6db5..0000000 --- a/0.2/_sources/benchmark.md.txt +++ /dev/null @@ -1,177 +0,0 @@ -```{sectnum} ---- -start: 2 -depth: 2 -suffix: . ---- -``` - -# Benchmarks - -MIPLearn provides a selection of benchmark problems and random instance generators, covering applications from different fields, that can be used to evaluate new learning-enhanced MIP techniques in a measurable and reproducible way. In this page, we describe these problems, the included instance generators, and we present some benchmark results for `LearningSolver` with default parameters. - -## Preliminaries - -### Benchmark challenges - -When evaluating the performance of a conventional MIP solver, *benchmark sets*, such as MIPLIB and TSPLIB, are typically used. The performance of newly proposed solvers or solution techniques are typically measured as the average (or total) running time the solver takes to solve the entire benchmark set. For Learning-Enhanced MIP solvers, it is also necessary to specify what instances should the solver be trained on (the *training instances*) before solving the actual set of instances we are interested in (the *test instances*). If the training instances are very similar to the test instances, we would expect a Learning-Enhanced Solver to present stronger perfomance benefits. - -In MIPLearn, each optimization problem comes with a set of **benchmark challenges**, which specify how should the training and test instances be generated. The first challenges are typically easier, in the sense that training and test instances are very similar. Later challenges gradually make the sets more distinct, and therefore harder to learn from. - -### Baseline results - -To illustrate the performance of `LearningSolver`, and to set a baseline for newly proposed techniques, we present in this page, for each benchmark challenge, a small set of computational results measuring the solution speed of the solver and the solution quality with default parameters. For more detailed computational studies, see [references](about.md#references). We compare three solvers: - -* **baseline:** Gurobi 9.0 with default settings (a conventional state-of-the-art MIP solver) -* **ml-exact:** `LearningSolver` with default settings, using Gurobi 9.0 as internal MIP solver -* **ml-heuristic:** Same as above, but with `mode="heuristic"` - -All experiments presented here were performed on a Linux server (Ubuntu Linux 18.04 LTS) with Intel Xeon Gold 6230s (2 processors, 40 cores, 80 threads) and 256 GB RAM (DDR4, 2933 MHz). All solvers were restricted to use 4 threads, with no time limits, and 10 instances were solved simultaneously at a time. - - - -## Maximum Weight Stable Set Problem - -### Problem definition - -Given a simple undirected graph $G=(V,E)$ and weights $w \in \mathbb{R}^V$, the problem is to find a stable set $S \subseteq V$ that maximizes $ \sum_{v \in V} w_v$. We recall that a subset $S \subseteq V$ is a *stable set* if no two vertices of $S$ are adjacent. This is one of Karp's 21 NP-complete problems. - -### Random instance generator - -The class `MaxWeightStableSetGenerator` can be used to generate random instances of this problem, with user-specified probability distributions. When the constructor parameter `fix_graph=True` is provided, one random Erdős-Rényi graph $G_{n,p}$ is generated during the constructor, where $n$ and $p$ are sampled from user-provided probability distributions `n` and `p`. To generate each instance, the generator independently samples each $w_v$ from the user-provided probability distribution `w`. When `fix_graph=False`, a new random graph is generated for each instance, while the remaining parameters are sampled in the same way. - -### Challenge A - -* Fixed random Erdős-Rényi graph $G_{n,p}$ with $n=200$ and $p=5\%$ -* Random vertex weights $w_v \sim U(100, 150)$ -* 500 training instances, 50 test instances - -```python -MaxWeightStableSetGenerator(w=uniform(loc=100., scale=50.), - n=randint(low=200, high=201), - p=uniform(loc=0.05, scale=0.0), - fix_graph=True) -``` - -![alt](figures/benchmark_stab_a.png) - - -## Traveling Salesman Problem - -### Problem definition - -Given a list of cities and the distance between each pair of cities, the problem asks for the -shortest route starting at the first city, visiting each other city exactly once, then returning -to the first city. This problem is a generalization of the Hamiltonian path problem, one of Karp's -21 NP-complete problems. - -### Random problem generator - -The class `TravelingSalesmanGenerator` can be used to generate random instances of this -problem. Initially, the generator creates $n$ cities $(x_1,y_1),\ldots,(x_n,y_n) \in \mathbb{R}^2$, -where $n, x_i$ and $y_i$ are sampled independently from the provided probability distributions `n`, -`x` and `y`. For each pair of cities $(i,j)$, the distance $d_{i,j}$ between them is set to: -$$ - d_{i,j} = \gamma_{i,j} \sqrt{(x_i-x_j)^2 + (y_i - y_j)^2} -$$ -where $\gamma_{i,j}$ is sampled from the distribution `gamma`. - -If `fix_cities=True` is provided, the list of cities is kept the same for all generated instances. -The $gamma$ values, and therefore also the distances, are still different. - -By default, all distances $d_{i,j}$ are rounded to the nearest integer. If `round=False` -is provided, this rounding will be disabled. - -### Challenge A - -* Fixed list of 350 cities in the $[0, 1000]^2$ square -* $\gamma_{i,j} \sim U(0.95, 1.05)$ -* 500 training instances, 50 test instances - - -```python -TravelingSalesmanGenerator(x=uniform(loc=0.0, scale=1000.0), - y=uniform(loc=0.0, scale=1000.0), - n=randint(low=350, high=351), - gamma=uniform(loc=0.95, scale=0.1), - fix_cities=True, - round=True, - ) -``` - -![alt](figures/benchmark_tsp_a.png) - - -## Multidimensional 0-1 Knapsack Problem - -### Problem definition - -Given a set of $n$ items and $m$ types of resources (also called *knapsacks*), the problem is to find a subset of items that maximizes profit without consuming more resources than it is available. More precisely, the problem is: - -$$ -\begin{align*} - \text{maximize} - & \sum_{j=1}^n p_j x_j - \\ - \text{subject to} - & \sum_{j=1}^n w_{ij} x_j \leq b_i - & \forall i=1,\ldots,m \\ - & x_j \in \{0,1\} - & \forall j=1,\ldots,n -\end{align*} -$$ - -### Random instance generator - -The class `MultiKnapsackGenerator` can be used to generate random instances of this problem. The number of items $n$ and knapsacks $m$ are sampled from the user-provided probability distributions `n` and `m`. The weights $w_{ij}$ are sampled independently from the provided distribution `w`. The capacity of knapsack $i$ is set to - -$$ - b_i = \alpha_i \sum_{j=1}^n w_{ij} -$$ - -where $\alpha_i$, the tightness ratio, is sampled from the provided probability -distribution `alpha`. To make the instances more challenging, the costs of the items -are linearly correlated to their average weights. More specifically, the price of each -item $j$ is set to: - -$$ - p_j = \sum_{i=1}^m \frac{w_{ij}}{m} + K u_j, -$$ - -where $K$, the correlation coefficient, and $u_j$, the correlation multiplier, are sampled -from the provided probability distributions `K` and `u`. - -If `fix_w=True` is provided, then $w_{ij}$ are kept the same in all generated instances. This also implies that $n$ and $m$ are kept fixed. Although the prices and capacities are derived from $w_{ij}$, as long as `u` and `K` are not constants, the generated instances will still not be completely identical. - - -If a probability distribution `w_jitter` is provided, then item weights will be set to $w_{ij} \gamma_{ij}$ where $\gamma_{ij}$ is sampled from `w_jitter`. When combined with `fix_w=True`, this argument may be used to generate instances where the weight of each item is roughly the same, but not exactly identical, across all instances. The prices of the items and the capacities of the knapsacks will be calculated as above, but using these perturbed weights instead. - -By default, all generated prices, weights and capacities are rounded to the nearest integer number. If `round=False` is provided, this rounding will be disabled. - - -!!! note "References" - * Freville, Arnaud, and Gérard Plateau. *An efficient preprocessing procedure for the multidimensional 0–1 knapsack problem.* Discrete applied mathematics 49.1-3 (1994): 189-212. - * Fréville, Arnaud. *The multidimensional 0–1 knapsack problem: An overview.* European Journal of Operational Research 155.1 (2004): 1-21. - -### Challenge A - -* 250 variables, 10 constraints, fixed weights -* $w \sim U(0, 1000), \gamma \sim U(0.95, 1.05)$ -* $K = 500, u \sim U(0, 1), \alpha = 0.25$ -* 500 training instances, 50 test instances - - -```python -MultiKnapsackGenerator(n=randint(low=250, high=251), - m=randint(low=10, high=11), - w=uniform(loc=0.0, scale=1000.0), - K=uniform(loc=500.0, scale=0.0), - u=uniform(loc=0.0, scale=1.0), - alpha=uniform(loc=0.25, scale=0.0), - fix_w=True, - w_jitter=uniform(loc=0.95, scale=0.1), - ) -``` - -![alt](figures/benchmark_knapsack_a.png) - diff --git a/0.2/_sources/customization.md.txt b/0.2/_sources/customization.md.txt deleted file mode 100644 index cc087fc..0000000 --- a/0.2/_sources/customization.md.txt +++ /dev/null @@ -1,182 +0,0 @@ -```{sectnum} ---- -start: 3 -depth: 2 -suffix: . ---- -``` - -# Customization - -## Customizing solver parameters - -### Selecting the internal MIP solver - -By default, `LearningSolver` uses [Gurobi](https://www.gurobi.com/) as its internal MIP solver, and expects models to be provided using the Pyomo modeling language. Supported solvers and modeling languages include: - -* `GurobiPyomoSolver`: Gurobi with Pyomo (default). -* `CplexPyomoSolver`: [IBM ILOG CPLEX](https://www.ibm.com/products/ilog-cplex-optimization-studio) with Pyomo. -* `XpressPyomoSolver`: [FICO XPRESS Solver](https://www.fico.com/en/products/fico-xpress-solver) with Pyomo. -* `GurobiSolver`: Gurobi without any modeling language. - -To switch between solvers, provide the desired class using the `solver` argument: - -```python -from miplearn import LearningSolver, CplexPyomoSolver -solver = LearningSolver(solver=CplexPyomoSolver) -``` - -To configure a particular solver, use the `params` constructor argument, as shown below. - -```python -from miplearn import LearningSolver, GurobiPyomoSolver -solver = LearningSolver( - solver=lambda: GurobiPyomoSolver( - params={ - "TimeLimit": 900, - "MIPGap": 1e-3, - "NodeLimit": 1000, - } - ), -) -``` - - -## Customizing solver components - -`LearningSolver` is composed by a number of individual machine-learning components, each targeting a different part of the solution process. Each component can be individually enabled, disabled or customized. The following components are enabled by default: - -* `LazyConstraintComponent`: Predicts which lazy constraint to initially enforce. -* `ObjectiveValueComponent`: Predicts the optimal value of the optimization problem, given the optimal solution to the LP relaxation. -* `PrimalSolutionComponent`: Predicts optimal values for binary decision variables. In heuristic mode, this component fixes the variables to their predicted values. In exact mode, the predicted values are provided to the solver as a (partial) MIP start. - -The following components are also available, but not enabled by default: - -* `BranchPriorityComponent`: Predicts good branch priorities for decision variables. - -### Selecting components - -To create a `LearningSolver` with a specific set of components, the `components` constructor argument may be used, as the next example shows: - -```python -# Create a solver without any components -solver1 = LearningSolver(components=[]) - -# Create a solver with only two components -solver2 = LearningSolver(components=[ - LazyConstraintComponent(...), - PrimalSolutionComponent(...), -]) -``` - -### Adjusting component aggressiveness - -The aggressiveness of classification components, such as `PrimalSolutionComponent` and `LazyConstraintComponent`, can be adjusted through the `threshold` constructor argument. Internally, these components ask the machine learning models how confident are they on each prediction they make, then automatically discard all predictions that have low confidence. The `threshold` argument specifies how confident should the ML models be for a prediction to be considered trustworthy. Lowering a component's threshold increases its aggressiveness, while raising a component's threshold makes it more conservative. - -For example, if the ML model predicts that a certain binary variable will assume value `1.0` in the optimal solution with 75% confidence, and if the `PrimalSolutionComponent` is configured to discard all predictions with less than 90% confidence, then this variable will not be included in the predicted MIP start. - -MIPLearn currently provides two types of thresholds: - -* `MinProbabilityThreshold(p: List[float])` A threshold which indicates that a prediction is trustworthy if its probability of being correct, as computed by the machine learning model, is above a fixed value. -* `MinPrecisionThreshold(p: List[float])` A dynamic threshold which automatically adjusts itself during training to ensure that the component achieves at least a given precision on the training data set. Note that increasing a component's precision may reduce its recall. - -The example below shows how to build a `PrimalSolutionComponent` which fixes variables to zero with at least 80% precision, and to one with at least 95% precision. Other components are configured similarly. - -```python -from miplearn import PrimalSolutionComponent, MinPrecisionThreshold - -PrimalSolutionComponent( - mode="heuristic", - threshold=MinPrecisionThreshold([0.80, 0.95]), -) -``` - -### Evaluating component performance - -MIPLearn allows solver components to be modified, trained and evaluated in isolation. In the following example, we build and -fit `PrimalSolutionComponent` outside the solver, then evaluate its performance. - -```python -from miplearn import PrimalSolutionComponent - -# User-provided set of previously-solved instances -train_instances = [...] - -# Construct and fit component on a subset of training instances -comp = PrimalSolutionComponent() -comp.fit(train_instances[:100]) - -# Evaluate performance on an additional set of training instances -ev = comp.evaluate(train_instances[100:150]) -``` - -The method `evaluate` returns a dictionary with performance evaluation statistics for each training instance provided, -and for each type of prediction the component makes. To obtain a summary across all instances, pandas may be used, as below: - -```python -import pandas as pd -pd.DataFrame(ev["Fix one"]).mean(axis=1) -``` -```text -Predicted positive 3.120000 -Predicted negative 196.880000 -Condition positive 62.500000 -Condition negative 137.500000 -True positive 3.060000 -True negative 137.440000 -False positive 0.060000 -False negative 59.440000 -Accuracy 0.702500 -F1 score 0.093050 -Recall 0.048921 -Precision 0.981667 -Predicted positive (%) 1.560000 -Predicted negative (%) 98.440000 -Condition positive (%) 31.250000 -Condition negative (%) 68.750000 -True positive (%) 1.530000 -True negative (%) 68.720000 -False positive (%) 0.030000 -False negative (%) 29.720000 -dtype: float64 -``` - -Regression components (such as `ObjectiveValueComponent`) can also be trained and evaluated similarly, -as the next example shows: - -```python -from miplearn import ObjectiveValueComponent -comp = ObjectiveValueComponent() -comp.fit(train_instances[:100]) -ev = comp.evaluate(train_instances[100:150]) - -import pandas as pd -pd.DataFrame(ev).mean(axis=1) -``` -```text -Mean squared error 7001.977827 -Explained variance 0.519790 -Max error 242.375804 -Mean absolute error 65.843924 -R2 0.517612 -Median absolute error 65.843924 -dtype: float64 -``` - -### Using customized ML classifiers and regressors - -By default, given a training set of instantes, MIPLearn trains a fixed set of ML classifiers and regressors, then selects the best one based on cross-validation performance. Alternatively, the user may specify which ML model a component should use through the `classifier` or `regressor` contructor parameters. Scikit-learn classifiers and regressors are currently supported. A future version of the package will add compatibility with Keras models. - -The example below shows how to construct a `PrimalSolutionComponent` which internally uses scikit-learn's `KNeighborsClassifiers`. Any other scikit-learn classifier or pipeline can be used. It needs to be wrapped in `ScikitLearnClassifier` to ensure that all the proper data transformations are applied. - -```python -from miplearn import PrimalSolutionComponent, ScikitLearnClassifier -from sklearn.neighbors import KNeighborsClassifier - -comp = PrimalSolutionComponent( - classifier=ScikitLearnClassifier( - KNeighborsClassifier(n_neighbors=5), - ), -) -comp.fit(train_instances) -``` diff --git a/0.2/_sources/instances.md.txt b/0.2/_sources/instances.md.txt index 07297fb..2066eb8 100644 --- a/0.2/_sources/instances.md.txt +++ b/0.2/_sources/instances.md.txt @@ -11,7 +11,7 @@ Instances UnitCommitment.jl provides a large collection of benchmark instances collected from the literature and converted to a [common data format](format.md). In some cases, as indicated below, the original instances have been extended, with realistic parameters, using data-driven methods. -If you use these instances in your research, we request that you cite UnitCommitment.jl [UCJL], as well as the original sources. +If you use these instances in your research, we request that you cite UnitCommitment.jl, as well as the original sources. Raw instances files are [available at our GitHub repository](https://github.com/ANL-CEEESA/UnitCommitment.jl/tree/dev/instances). Benchmark instances can also be loaded with `UnitCommitment.read_benchmark(name)`, as explained in the [usage section](usage.md). diff --git a/0.2/_sources/model.md.txt b/0.2/_sources/model.md.txt index d86a933..30a6197 100644 --- a/0.2/_sources/model.md.txt +++ b/0.2/_sources/model.md.txt @@ -190,12 +190,6 @@ JuMP.set_objective_coefficient( UnitCommitment.optimize!(model) ``` -### Adding components to a bus - - -One of the most common modifications to a unit commitment model is adding a new customized system component to a bus. The script below shows how to add - - References ---------- * [KnOsWa20] **Bernard Knueven, James Ostrowski and Jean-Paul Watson.** "On Mixed-Integer Programming Formulations for the Unit Commitment Problem". INFORMS Journal on Computing (2020). [DOI: 10.1287/ijoc.2019.0944](https://doi.org/10.1287/ijoc.2019.0944) diff --git a/0.2/_sources/usage.md.txt b/0.2/_sources/usage.md.txt index d6dab96..a670b66 100644 --- a/0.2/_sources/usage.md.txt +++ b/0.2/_sources/usage.md.txt @@ -53,7 +53,7 @@ model = UnitCommitment.build_model( UnitCommitment.optimize!(model) # Extract solution and write it to a file -solution = UnitCommitment.get_solution(model) +solution = UnitCommitment.solution(model) open("/path/to/output.json", "w") do file JSON.print(file, solution, 2) end diff --git a/0.2/benchmark/index.html b/0.2/benchmark/index.html deleted file mode 100644 index a7f9023..0000000 --- a/0.2/benchmark/index.html +++ /dev/null @@ -1,472 +0,0 @@ - - - - - - - - 2. Benchmarks — UnitCommitment.jl<br/><small>0.2</small> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- - -
-
- -
- -
-

2. Benchmarks

-

MIPLearn provides a selection of benchmark problems and random instance generators, covering applications from different fields, that can be used to evaluate new learning-enhanced MIP techniques in a measurable and reproducible way. In this page, we describe these problems, the included instance generators, and we present some benchmark results for LearningSolver with default parameters.

-
-

2.1. Preliminaries

-
-

Benchmark challenges

-

When evaluating the performance of a conventional MIP solver, benchmark sets, such as MIPLIB and TSPLIB, are typically used. The performance of newly proposed solvers or solution techniques are typically measured as the average (or total) running time the solver takes to solve the entire benchmark set. For Learning-Enhanced MIP solvers, it is also necessary to specify what instances should the solver be trained on (the training instances) before solving the actual set of instances we are interested in (the test instances). If the training instances are very similar to the test instances, we would expect a Learning-Enhanced Solver to present stronger perfomance benefits.

-

In MIPLearn, each optimization problem comes with a set of benchmark challenges, which specify how should the training and test instances be generated. The first challenges are typically easier, in the sense that training and test instances are very similar. Later challenges gradually make the sets more distinct, and therefore harder to learn from.

-
-
-

Baseline results

-

To illustrate the performance of LearningSolver, and to set a baseline for newly proposed techniques, we present in this page, for each benchmark challenge, a small set of computational results measuring the solution speed of the solver and the solution quality with default parameters. For more detailed computational studies, see references. We compare three solvers:

-
    -
  • baseline: Gurobi 9.0 with default settings (a conventional state-of-the-art MIP solver)

  • -
  • ml-exact: LearningSolver with default settings, using Gurobi 9.0 as internal MIP solver

  • -
  • ml-heuristic: Same as above, but with mode="heuristic"

  • -
-

All experiments presented here were performed on a Linux server (Ubuntu Linux 18.04 LTS) with Intel Xeon Gold 6230s (2 processors, 40 cores, 80 threads) and 256 GB RAM (DDR4, 2933 MHz). All solvers were restricted to use 4 threads, with no time limits, and 10 instances were solved simultaneously at a time.

-
-
-
-

2.2. Maximum Weight Stable Set Problem

-
-

Problem definition

-

Given a simple undirected graph \(G=(V,E)\) and weights \(w \in \mathbb{R}^V\), the problem is to find a stable set \(S \subseteq V\) that maximizes \( \sum_{v \in V} w_v\). We recall that a subset \(S \subseteq V\) is a stable set if no two vertices of \(S\) are adjacent. This is one of Karp’s 21 NP-complete problems.

-
-
-

Random instance generator

-

The class MaxWeightStableSetGenerator can be used to generate random instances of this problem, with user-specified probability distributions. When the constructor parameter fix_graph=True is provided, one random Erdős-Rényi graph \(G_{n,p}\) is generated during the constructor, where \(n\) and \(p\) are sampled from user-provided probability distributions n and p. To generate each instance, the generator independently samples each \(w_v\) from the user-provided probability distribution w. When fix_graph=False, a new random graph is generated for each instance, while the remaining parameters are sampled in the same way.

-
-
-

Challenge A

-
    -
  • Fixed random Erdős-Rényi graph \(G_{n,p}\) with \(n=200\) and \(p=5\%\)

  • -
  • Random vertex weights \(w_v \sim U(100, 150)\)

  • -
  • 500 training instances, 50 test instances

  • -
-
MaxWeightStableSetGenerator(w=uniform(loc=100., scale=50.),
-                            n=randint(low=200, high=201),
-                            p=uniform(loc=0.05, scale=0.0),
-                            fix_graph=True)
-
-
-

alt

-
-
-
-

2.3. Traveling Salesman Problem

-
-

Problem definition

-

Given a list of cities and the distance between each pair of cities, the problem asks for the -shortest route starting at the first city, visiting each other city exactly once, then returning -to the first city. This problem is a generalization of the Hamiltonian path problem, one of Karp’s -21 NP-complete problems.

-
-
-

Random problem generator

-

The class TravelingSalesmanGenerator can be used to generate random instances of this -problem. Initially, the generator creates \(n\) cities \((x_1,y_1),\ldots,(x_n,y_n) \in \mathbb{R}^2\), -where \(n, x_i\) and \(y_i\) are sampled independently from the provided probability distributions n, -x and y. For each pair of cities \((i,j)\), the distance \(d_{i,j}\) between them is set to: -$\( - d_{i,j} = \gamma_{i,j} \sqrt{(x_i-x_j)^2 + (y_i - y_j)^2} -\)\( -where \)\gamma_{i,j}$ is sampled from the distribution gamma.

-

If fix_cities=True is provided, the list of cities is kept the same for all generated instances. -The \(gamma\) values, and therefore also the distances, are still different.

-

By default, all distances \(d_{i,j}\) are rounded to the nearest integer. If round=False -is provided, this rounding will be disabled.

-
-
-

Challenge A

-
    -
  • Fixed list of 350 cities in the \([0, 1000]^2\) square

  • -
  • \(\gamma_{i,j} \sim U(0.95, 1.05)\)

  • -
  • 500 training instances, 50 test instances

  • -
-
TravelingSalesmanGenerator(x=uniform(loc=0.0, scale=1000.0),
-                           y=uniform(loc=0.0, scale=1000.0),
-                           n=randint(low=350, high=351),
-                           gamma=uniform(loc=0.95, scale=0.1),
-                           fix_cities=True,
-                           round=True,
-                          )
-
-
-

alt

-
-
-
-

2.4. Multidimensional 0-1 Knapsack Problem

-
-

Problem definition

-

Given a set of \(n\) items and \(m\) types of resources (also called knapsacks), the problem is to find a subset of items that maximizes profit without consuming more resources than it is available. More precisely, the problem is:

-
-\[\begin{split} -\begin{align*} - \text{maximize} - & \sum_{j=1}^n p_j x_j - \\ - \text{subject to} - & \sum_{j=1}^n w_{ij} x_j \leq b_i - & \forall i=1,\ldots,m \\ - & x_j \in \{0,1\} - & \forall j=1,\ldots,n -\end{align*} -\end{split}\]
-
-
-

Random instance generator

-

The class MultiKnapsackGenerator can be used to generate random instances of this problem. The number of items \(n\) and knapsacks \(m\) are sampled from the user-provided probability distributions n and m. The weights \(w_{ij}\) are sampled independently from the provided distribution w. The capacity of knapsack \(i\) is set to

-
-\[ - b_i = \alpha_i \sum_{j=1}^n w_{ij} -\]
-

where \(\alpha_i\), the tightness ratio, is sampled from the provided probability -distribution alpha. To make the instances more challenging, the costs of the items -are linearly correlated to their average weights. More specifically, the price of each -item \(j\) is set to:

-
-\[ - p_j = \sum_{i=1}^m \frac{w_{ij}}{m} + K u_j, -\]
-

where \(K\), the correlation coefficient, and \(u_j\), the correlation multiplier, are sampled -from the provided probability distributions K and u.

-

If fix_w=True is provided, then \(w_{ij}\) are kept the same in all generated instances. This also implies that \(n\) and \(m\) are kept fixed. Although the prices and capacities are derived from \(w_{ij}\), as long as u and K are not constants, the generated instances will still not be completely identical.

-

If a probability distribution w_jitter is provided, then item weights will be set to \(w_{ij} \gamma_{ij}\) where \(\gamma_{ij}\) is sampled from w_jitter. When combined with fix_w=True, this argument may be used to generate instances where the weight of each item is roughly the same, but not exactly identical, across all instances. The prices of the items and the capacities of the knapsacks will be calculated as above, but using these perturbed weights instead.

-

By default, all generated prices, weights and capacities are rounded to the nearest integer number. If round=False is provided, this rounding will be disabled.

-

!!! note “References” -* Freville, Arnaud, and Gérard Plateau. An efficient preprocessing procedure for the multidimensional 0–1 knapsack problem. Discrete applied mathematics 49.1-3 (1994): 189-212. -* Fréville, Arnaud. The multidimensional 0–1 knapsack problem: An overview. European Journal of Operational Research 155.1 (2004): 1-21.

-
-
-

Challenge A

-
    -
  • 250 variables, 10 constraints, fixed weights

  • -
  • \(w \sim U(0, 1000), \gamma \sim U(0.95, 1.05)\)

  • -
  • \(K = 500, u \sim U(0, 1), \alpha = 0.25\)

  • -
  • 500 training instances, 50 test instances

  • -
-
MultiKnapsackGenerator(n=randint(low=250, high=251),
-                       m=randint(low=10, high=11),
-                       w=uniform(loc=0.0, scale=1000.0),
-                       K=uniform(loc=500.0, scale=0.0),
-                       u=uniform(loc=0.0, scale=1.0),
-                       alpha=uniform(loc=0.25, scale=0.0),
-                       fix_w=True,
-                       w_jitter=uniform(loc=0.95, scale=0.1),
-                      )
-
-
-

alt

-
-
-
- - -
- - -
- - -
- -
-
-
-
-

- - © Copyright 2020-2021, UChicago Argonne, LLC.
-

-
-
-
- - -
-
- - - - - - \ No newline at end of file diff --git a/0.2/customization/index.html b/0.2/customization/index.html deleted file mode 100644 index b2cd975..0000000 --- a/0.2/customization/index.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - - - - 3. Customization — UnitCommitment.jl<br/><small>0.2</small> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- - -
-
- -
- -
-

3. Customization

-
-

3.1. Customizing solver parameters

-
-

Selecting the internal MIP solver

-

By default, LearningSolver uses Gurobi as its internal MIP solver, and expects models to be provided using the Pyomo modeling language. Supported solvers and modeling languages include:

-
    -
  • GurobiPyomoSolver: Gurobi with Pyomo (default).

  • -
  • CplexPyomoSolver: IBM ILOG CPLEX with Pyomo.

  • -
  • XpressPyomoSolver: FICO XPRESS Solver with Pyomo.

  • -
  • GurobiSolver: Gurobi without any modeling language.

  • -
-

To switch between solvers, provide the desired class using the solver argument:

-
from miplearn import LearningSolver, CplexPyomoSolver
-solver = LearningSolver(solver=CplexPyomoSolver)
-
-
-

To configure a particular solver, use the params constructor argument, as shown below.

-
from miplearn import LearningSolver, GurobiPyomoSolver
-solver = LearningSolver(
-    solver=lambda: GurobiPyomoSolver(
-        params={
-            "TimeLimit": 900,
-            "MIPGap": 1e-3,
-            "NodeLimit": 1000,
-        }
-    ),
-)
-
-
-
-
-
-

3.2. Customizing solver components

-

LearningSolver is composed by a number of individual machine-learning components, each targeting a different part of the solution process. Each component can be individually enabled, disabled or customized. The following components are enabled by default:

-
    -
  • LazyConstraintComponent: Predicts which lazy constraint to initially enforce.

  • -
  • ObjectiveValueComponent: Predicts the optimal value of the optimization problem, given the optimal solution to the LP relaxation.

  • -
  • PrimalSolutionComponent: Predicts optimal values for binary decision variables. In heuristic mode, this component fixes the variables to their predicted values. In exact mode, the predicted values are provided to the solver as a (partial) MIP start.

  • -
-

The following components are also available, but not enabled by default:

-
    -
  • BranchPriorityComponent: Predicts good branch priorities for decision variables.

  • -
-
-

Selecting components

-

To create a LearningSolver with a specific set of components, the components constructor argument may be used, as the next example shows:

-
# Create a solver without any components
-solver1 = LearningSolver(components=[])
-
-# Create a solver with only two components
-solver2 = LearningSolver(components=[
-    LazyConstraintComponent(...),
-    PrimalSolutionComponent(...),
-])
-
-
-
-
-

Adjusting component aggressiveness

-

The aggressiveness of classification components, such as PrimalSolutionComponent and LazyConstraintComponent, can be adjusted through the threshold constructor argument. Internally, these components ask the machine learning models how confident are they on each prediction they make, then automatically discard all predictions that have low confidence. The threshold argument specifies how confident should the ML models be for a prediction to be considered trustworthy. Lowering a component’s threshold increases its aggressiveness, while raising a component’s threshold makes it more conservative.

-

For example, if the ML model predicts that a certain binary variable will assume value 1.0 in the optimal solution with 75% confidence, and if the PrimalSolutionComponent is configured to discard all predictions with less than 90% confidence, then this variable will not be included in the predicted MIP start.

-

MIPLearn currently provides two types of thresholds:

-
    -
  • MinProbabilityThreshold(p: List[float]) A threshold which indicates that a prediction is trustworthy if its probability of being correct, as computed by the machine learning model, is above a fixed value.

  • -
  • MinPrecisionThreshold(p: List[float]) A dynamic threshold which automatically adjusts itself during training to ensure that the component achieves at least a given precision on the training data set. Note that increasing a component’s precision may reduce its recall.

  • -
-

The example below shows how to build a PrimalSolutionComponent which fixes variables to zero with at least 80% precision, and to one with at least 95% precision. Other components are configured similarly.

-
from miplearn import PrimalSolutionComponent, MinPrecisionThreshold
-
-PrimalSolutionComponent(
-    mode="heuristic",
-    threshold=MinPrecisionThreshold([0.80, 0.95]),
-)
-
-
-
-
-

Evaluating component performance

-

MIPLearn allows solver components to be modified, trained and evaluated in isolation. In the following example, we build and -fit PrimalSolutionComponent outside the solver, then evaluate its performance.

-
from miplearn import PrimalSolutionComponent
-
-# User-provided set of previously-solved instances
-train_instances = [...]
-
-# Construct and fit component on a subset of training instances
-comp = PrimalSolutionComponent()
-comp.fit(train_instances[:100])
-
-# Evaluate performance on an additional set of training instances
-ev = comp.evaluate(train_instances[100:150])
-
-
-

The method evaluate returns a dictionary with performance evaluation statistics for each training instance provided, -and for each type of prediction the component makes. To obtain a summary across all instances, pandas may be used, as below:

-
import pandas as pd
-pd.DataFrame(ev["Fix one"]).mean(axis=1)
-
-
-
Predicted positive          3.120000
-Predicted negative        196.880000
-Condition positive         62.500000
-Condition negative        137.500000
-True positive               3.060000
-True negative             137.440000
-False positive              0.060000
-False negative             59.440000
-Accuracy                    0.702500
-F1 score                    0.093050
-Recall                      0.048921
-Precision                   0.981667
-Predicted positive (%)      1.560000
-Predicted negative (%)     98.440000
-Condition positive (%)     31.250000
-Condition negative (%)     68.750000
-True positive (%)           1.530000
-True negative (%)          68.720000
-False positive (%)          0.030000
-False negative (%)         29.720000
-dtype: float64
-
-
-

Regression components (such as ObjectiveValueComponent) can also be trained and evaluated similarly, -as the next example shows:

-
from miplearn import ObjectiveValueComponent
-comp = ObjectiveValueComponent()
-comp.fit(train_instances[:100])
-ev = comp.evaluate(train_instances[100:150])
-
-import pandas as pd
-pd.DataFrame(ev).mean(axis=1)
-
-
-
Mean squared error       7001.977827
-Explained variance          0.519790
-Max error                 242.375804
-Mean absolute error        65.843924
-R2                          0.517612
-Median absolute error      65.843924
-dtype: float64
-
-
-
-
-

Using customized ML classifiers and regressors

-

By default, given a training set of instantes, MIPLearn trains a fixed set of ML classifiers and regressors, then selects the best one based on cross-validation performance. Alternatively, the user may specify which ML model a component should use through the classifier or regressor contructor parameters. Scikit-learn classifiers and regressors are currently supported. A future version of the package will add compatibility with Keras models.

-

The example below shows how to construct a PrimalSolutionComponent which internally uses scikit-learn’s KNeighborsClassifiers. Any other scikit-learn classifier or pipeline can be used. It needs to be wrapped in ScikitLearnClassifier to ensure that all the proper data transformations are applied.

-
from miplearn import PrimalSolutionComponent, ScikitLearnClassifier
-from sklearn.neighbors import KNeighborsClassifier
-
-comp = PrimalSolutionComponent(
-    classifier=ScikitLearnClassifier(
-        KNeighborsClassifier(n_neighbors=5),
-    ),
-)
-comp.fit(train_instances)
-
-
-
-
-
- - -
- - -
- - -
- -
-
-
-
-

- - © Copyright 2020-2021, UChicago Argonne, LLC.
-

-
-
-
- - -
-
- - - - - - \ No newline at end of file diff --git a/0.2/instances/index.html b/0.2/instances/index.html index 802109e..4315333 100644 --- a/0.2/instances/index.html +++ b/0.2/instances/index.html @@ -271,7 +271,7 @@

3. Instances

UnitCommitment.jl provides a large collection of benchmark instances collected from the literature and converted to a common data format. In some cases, as indicated below, the original instances have been extended, with realistic parameters, using data-driven methods. -If you use these instances in your research, we request that you cite UnitCommitment.jl [UCJL], as well as the original sources.

+If you use these instances in your research, we request that you cite UnitCommitment.jl, as well as the original sources.

Raw instances files are available at our GitHub repository. Benchmark instances can also be loaded with UnitCommitment.read_benchmark(name), as explained in the usage section.

diff --git a/0.2/model/index.html b/0.2/model/index.html index b1dd325..07a4021 100644 --- a/0.2/model/index.html +++ b/0.2/model/index.html @@ -242,11 +242,6 @@ Modifying the model -
  • - - Adding components to a bus - -
  • @@ -527,10 +522,6 @@
  • -
    -

    Adding components to a bus

    -

    One of the most common modifications to a unit commitment model is adding a new customized system component to a bus. The script below shows how to add

    -

    4.5. References

    diff --git a/0.2/objects.inv b/0.2/objects.inv index e033e79704bc27dc7743b756a84f9ed761fce3b2..cc0d3459e70743bb09ce1322177f5892d4a25c4b 100644 GIT binary patch delta 199 zcmV;&0672T0>1)~fPaqd3c?^1hW~pN=LR-e^{c-{uwXEVU4TvZ5mRHHLA#r-r7LSX zR}LZs#pgV)zLoAJLomqqT$d0fP&qIY?@uTE)e~`5n88&L$R0A+-nj zD*j0*REq~KWs6cMjBnlK7-XsxCiFg#!q)$uE{I6Yr|$yW0YC~nZ=Q!Nhs-jo{-}8$ zqh&y?ICR1n4kmvh`G}2H>!cB^FPn8}W)v>-EN8VKgPHcQyaN;xU%s$c@&=~1kOlB; BS+f8D delta 236 zcmV5dFPDLY{>HR zv*|sa(JJz}?+K^2`-FsXRX;9s4?w~uIuG5kfMa06`bW*{eUStij9o*qaHjkdDeheN mKRio%!dBJu(8wg5My2. Benchmarks","3. Customization","2. Data Format","UnitCommitment.jl","3. Instances","4. JuMP Model","1. Usage"],titleterms:{"function":5,Adding:5,RTS:4,Using:1,access:5,acknowledg:3,addit:2,adjust:1,advanc:6,aggress:1,author:3,baselin:0,benchmark:[0,6],bus:5,buse:[2,5],california:4,challeng:0,cite:3,classifi:1,compon:[1,3,5],condit:6,constraint:5,content:3,conting:2,cost:2,current:2,custom:1,data:2,decis:5,definit:0,evalu:1,exampl:2,ferc:4,format:2,formul:6,gener:[0,2,5,6],gmlc:4,initi:6,input:2,inspect:5,instal:6,instanc:[0,4,6],intern:1,jump:5,knapsack:0,lib:4,licens:3,limit:2,line:[2,5],load:[2,5],matpow:4,maximum:0,mip:1,model:5,modifi:[5,6],multidimension:0,object:5,output:2,packag:3,paramet:[1,2],pegas:4,perform:1,pglib:4,polish:4,preliminari:0,price:[2,5],problem:0,product:2,provid:6,pstca:4,random:0,refer:[4,5],regressor:1,remark:2,reserv:2,result:0,rte:4,salesman:0,select:1,sensit:[2,5],seri:2,set:0,site:3,solut:6,solv:6,solver:1,stabl:0,tejada19:4,time:2,transmiss:[2,5],travel:0,typic:6,unitcommit:3,usag:6,user:6,variabl:5,verifi:6,weight:0}}) \ No newline at end of file +Search.setIndex({docnames:["format","index","instances","model","usage"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["format.md","index.md","instances.md","model.md","usage.md"],objects:{},objnames:{},objtypes:{},terms:{"01527":0,"01_hw":2,"01_lw":2,"01_reserves_0":2,"01_reserves_1":2,"01_reserves_3":2,"01_reserves_5":2,"02_hw":2,"02_lw":2,"0309":2,"05917":0,"06ch11357":1,"0944":[2,3],"100":[0,2,3],"1000":[0,3],"100_0_1_w":2,"100_0_2_w":2,"100_0_3_w":2,"100_0_4_w":2,"100_0_5_w":2,"105":2,"1060":2,"1069":2,"10_0_1_w":2,"10_0_2_w":2,"10_0_3_w":2,"10_0_4_w":2,"10_0_5_w":2,"10s":3,"110":[0,2,3],"1109":2,"1130":2,"115":3,"118":2,"125":2,"1262":2,"1287":[2,3],"1288":2,"130":[0,2,3],"1306":2,"131":2,"135":[0,3],"1352":2,"1354":2,"13659":2,"1368":2,"1376":2,"1393":2,"13932":2,"140":[0,2],"1400":[0,3],"144":0,"1445":2,"1484":2,"1497":2,"150":2,"15000":0,"150_0_1_w":2,"150_0_2_w":2,"150_0_3_w":2,"150_0_4_w":2,"150_0_5_w":2,"154":2,"1577":2,"1600":[0,3],"16049":2,"1615":2,"1632":2,"165":2,"168":2,"175":2,"1768":2,"177":2,"179":2,"1804":2,"1820":2,"1823":2,"186":2,"188":2,"1888":2,"192":2,"1951":2,"1960":2,"199":2,"1990":2,"1991":2,"200":2,"20000":0,"2006":2,"200_0_10_w":2,"200_0_11_w":2,"200_0_12_w":2,"200_0_1_w":2,"200_0_2_w":2,"200_0_3_w":2,"200_0_4_w":2,"200_0_5_w":2,"200_0_6_w":2,"200_0_7_w":2,"200_0_8_w":2,"200_0_9_w":2,"2010":2,"2011":2,"2013":2,"2014":2,"2015":2,"2016":2,"2017":[2,3,4],"2019":[2,3],"2020":[1,2,3],"20467":2,"2051168":2,"20_0_1_w":2,"20_0_2_w":2,"20_0_3_w":2,"20_0_4_w":2,"20_0_5_w":2,"210":2,"214":2,"220":2,"2200":[0,3],"2240":2,"2242":2,"2251015":2,"2260":2,"2307":2,"232":0,"2383":2,"2400":[0,3],"250":2,"2531":2,"2582903":2,"2596":2,"260":2,"267":2,"2736":2,"2737":2,"2746":2,"2848":2,"2854":2,"2868":2,"2869":2,"288":0,"289":2,"2896":2,"290":2,"2925557":2,"2950":2,"296":2,"2962024":2,"29725":0,"300":[0,2],"3012":2,"30552":0,"3120":2,"3155":2,"3156":2,"3159":2,"3161":2,"31838":0,"320":2,"323":2,"3245":2,"3374":2,"3504":2,"3506":2,"3514":2,"3572":2,"3579":2,"3693":2,"3776":2,"3808":2,"390":2,"400":[0,2],"4092":2,"411":2,"4161":2,"4269874":[1,2],"432":0,"443":2,"457":2,"4582":2,"46212":0,"46307":0,"480":2,"483":2,"4909":2,"4917":2,"496":2,"49686":0,"5000":0,"505":2,"50_0_1_w":2,"50_0_2_w":2,"50_0_3_w":2,"50_0_4_w":2,"50_0_5_w":2,"510":2,"5281":[1,2],"544":2,"590":2,"596":2,"6060":2,"6063":2,"6085":2,"6094":2,"610":2,"611":2,"623":2,"6468":2,"647":2,"6470":2,"6495":2,"6515":2,"730":0,"75_0_1_w":2,"75_0_2_w":2,"75_0_3_w":2,"75_0_4_w":2,"75_0_5_w":2,"767":2,"775":2,"800":0,"836":2,"850":[0,2],"88429":0,"9000":2,"9005":2,"9019":2,"9037":2,"90897":0,"918":2,"9241":2,"931":2,"935":2,"940":2,"957":2,"959":2,"979":2,"\u015bl\u0105ska":2,"boolean":0,"case":[2,3],"default":0,"float":0,"function":[1,4],"import":[1,2],"long":[2,4],"new":[1,3,4],"public":2,"return":[3,4],"switch":[3,4],"true":[0,3],"while":0,AND:1,ARE:1,BUT:1,Bus:0,FOR:1,For:[0,2,3,4],NOT:1,PES:2,SUCH:1,THE:1,The:[0,1,2,3,4],There:0,These:2,USE:1,aaron:2,abov:[1,3],ac02:1,accept:0,access:2,accomplish:3,accord:0,account:2,accur:1,action:2,add:[3,4],added:3,addit:3,addition:1,advanc:[1,2],advis:1,affect:0,after:[0,3,4],again:0,ahead:1,aleksandr:1,algorithm:[1,2,4],ali:2,align:3,alinson:[1,2],all:[0,1,2,4],allow:0,also:[0,2,4],alwai:0,american:2,amount:[0,3],analysi:2,ani:[0,1,4],anoth:0,approach:2,arango:2,archiv:2,argonn:1,aris:1,arrai:0,art:1,arxiv:2,aspect:1,autom:1,avail:2,bableh19:2,balanc:0,barrow:2,base:[0,1,2],beaslei:2,becaus:2,becom:4,been:[0,2,4],befor:[0,3],begin:[0,3],being:4,below:[0,2,3,4],benchmark:[1,2,3],bernard:[2,3],best:2,between:[0,4],binari:[1,3],bloom:2,both:0,bridg:2,build:3,build_model:[3,4],bus:[0,3],buse:2,busi:1,call:[3,4],can:[0,2,3,4],capac:0,capitanescu:2,carefulli:4,case118:[2,3],case1354pegas:2,case13659pegas:2,case14:[0,2],case1888rt:2,case1951rt:2,case2383wp:2,case2736sp:2,case2737sop:2,case2746wop:2,case2746wp:2,case2848rt:2,case2868rt:2,case2869pegas:2,case300:2,case3012wp:2,case30:2,case3120sp:2,case3375wp:[2,4],case57:2,case6468rt:2,case6470rt:2,case6495rt:2,case6515rt:2,case89pegas:2,case9241pegas:2,categori:3,caus:[1,4],cbc:[3,4],certain:0,challeng:[1,4],chang:[0,1,3,4],characterist:[0,1],charg:0,check:3,chen:1,choic:4,cite:2,clayton:2,clear:1,code:[1,4],coeffici:3,collabor:1,collect:[1,2,4],commiss:2,commit:[0,1,2,3,4],common:[1,2],comparison:2,compat:[0,4],compil:2,complet:[0,4],complex:2,compon:0,comput:[2,3,4],condit:[1,2],congest:0,connect:0,consequenti:1,consortium:2,constrain:[1,2],constraint:[1,2,4],construct:[3,4],consumpt:0,contain:[0,2,4],conting:[1,2],contract:1,contributor:1,convert:2,convex:0,copi:4,copyright:1,correct:2,correctli:4,correspond:2,cost:[1,2,3],creat:[3,4],credibl:0,curat:2,current:1,curtail:3,curv:[0,1,2,3],dai:[1,2],damag:1,data:[1,2,4],date:1,decis:1,decreas:0,defin:3,degrad:0,delai:0,delta:3,demand:[0,2],depart:[1,2],depend:[0,1],dept:2,deriv:1,describ:[0,1,2,3,4],descript:[0,3,4],design:2,detail:[0,2,3],develop:[1,2,4],dheepak:2,differ:[0,3,4],direct:[1,3],directli:4,director:1,disclaim:1,displai:3,distribut:[1,2],divers:1,divis:2,divisor:0,document:[0,1,3],doi:[1,2,3],down:[0,2],downtim:0,driven:2,due:4,dure:[0,3],each:[0,2,4],earli:1,easi:4,easili:4,econom:0,edu:2,educ:2,effici:2,ehlen:2,either:0,electr:[1,2],electricit:2,electron:2,element:0,emerg:[0,2],end:[3,4],endors:1,energi:[0,1,2],enforc:3,engin:2,entri:0,equal:[0,3],eric:2,error:[3,4],estim:2,etc:0,european:2,evalu:1,even:[0,1,3,4],event:1,exactli:[0,4],exampl:[1,3,4],excess:4,exemplari:1,exist:[3,4],expect:[0,4],explain:2,express:1,extend:[1,2],extens:1,extract:4,f_l:3,failur:0,fals:0,feasibl:4,feb:2,feder:2,feedback:1,feng:[1,2],figur:0,file:[0,2,4],first:[0,3,4],fit:1,fix:[0,2,3],fliscounaki:2,florida:1,flow:[0,2,3],flpaca13:2,follow:[0,1,2,3,4],forc:[2,3],form:1,format:[1,2,4],formul:[1,2,3],forpow:2,found:4,frangioni:2,french:2,frge06:2,from:[0,1,2,3,4],fulli:[0,1],fund:1,fundament:1,futur:[0,4],gen1:0,gen2:0,gener:[1,2],generate_initial_condit:4,gentil:2,git:4,github:2,given:4,glpk:4,goal:1,good:1,gov:2,grant:1,graph:2,grid:[1,2],group:2,guid:4,hand:0,hard:4,has:[0,4],have:[0,2,3],help:4,higgin:2,high:2,holder:1,horizon:0,hour:[0,2],hourli:0,how:[0,3],howev:1,http:2,identifi:0,ieee:2,ijoc:[2,3],ikaheimo:2,illustr:[0,3],immedi:0,impact:1,implement:[1,4],impli:1,improv:2,incident:1,includ:[0,1,2,4],incorrect:4,increas:[0,2,4],incur:3,independ:[0,1,4],index:3,indic:[0,2,3],indirect:1,individu:4,industri:2,inf:0,infeas:4,inform:[2,3],initi:[0,2],inject:3,input:[1,4],inspect:1,instal:1,instanc:[0,1,3],instead:4,instruct:4,insuffici:0,integ:[1,2,3,4],interest:3,interpret:4,interrupt:1,introduc:4,is_on:3,island:2,iso:[1,2],isol:2,issu:4,itesla:2,its:[0,1,3],jame:[2,3],jean:[2,3],jenni:2,jessica:2,joflma16:2,jorgenson:2,josz:2,journal:[2,3],json:[0,1,4],julia:[1,2,4],jump:[1,2,4],jussi:2,just:3,k_g:3,kazachkov:1,keep:[1,3],kei:0,kindli:1,knoswa20:[2,3],knueven:[2,3],korab:2,krall:2,krhion12:2,krishnamurthi:2,laboratori:[1,2],lack:2,larg:[1,2],larger:2,last:0,later:4,lau:2,lazi:3,ldrd:1,learn:2,least:0,length:0,liabil:1,liabl:1,lib:1,librari:2,like:[1,3],limit:[1,2,3],line:2,linear:[0,1,3,4],list:[0,1,4],literatur:[1,2,4],llc:1,load:[1,2,4],local:4,locat:0,loss:[0,1],lower:0,lumbrera:2,machin:[2,4],maeght:2,mai:[0,1,3,4],mail:2,main:0,maintain:2,make:[1,4],manag:4,mani:[0,2],market:[1,2],martin:2,materi:1,mathcal:3,matlab:2,matpow:[1,3,4],maximum:[0,2],mean:0,merchant:1,met:1,method:[1,2],michael:2,midcontin:1,milp:4,min:[0,3],minim:3,minimum:[0,2,3],minut:0,mix:[1,2,3,4],model:[0,1,2,4],modern:2,modif:1,modifi:[1,2],more:[0,1,2,3,4],most:[0,1,2,3],mostli:2,mtpwr:2,much:[0,2],multipl:[0,4],murillo:2,must:[0,1],n_b:3,naiv:4,name:[1,2,3],nation:1,necessari:3,need:3,neg:0,neglig:1,neill:2,neither:1,nest:0,net:3,net_inject:3,network:[0,1,2],never:3,next:[0,4],nonlinear:2,nor:1,normal:0,northwest:1,notat:3,note:0,notic:1,nov:2,now:[3,4],number:[0,2,4],numer:0,object:1,obtain:[0,3],octav:2,oe0000875:1,off:[0,3,4],offic:1,offici:4,offlin:0,often:4,ohm:0,omit:0,onc:4,one:[0,2,4],onli:0,onlin:0,open:[2,4],oper:[0,1,2],opr:2,optim:[0,1,2,3,4],origin:[0,1,2,4],orlib:2,ostrowski:[2,3],other:[0,1,2,4],otherwis:1,our:[1,2,4],out:1,output:[1,2,3,4],overflow:3,overload:2,overview:2,own:4,pacif:1,packag:[0,2,3,4],page:[1,3,4],pan:[1,2],panciatici:2,paramet:2,parsefil:4,part:2,particular:[1,4],pass:4,path:4,paul:[2,3],penalti:[0,3],per:0,perform:1,period:[0,4],permiss:1,permit:1,pglib:1,piecewis:[0,1,3],pisa:2,pkg:4,place:[0,4],plan:[0,2],pleas:4,point:[0,3],politechnika:2,portion:2,posit:0,possibl:[1,3,4],potenti:4,power:[0,1,2,3,4],powersystem:2,predict:2,prevent:2,price:1,print:4,printf:3,prior:1,problem:[1,2,3,4],procur:1,prod_abov:3,produc:[0,2,3,4],product:[1,2],profil:2,profit:1,program:[1,2,3,4],project:2,promot:1,properti:0,proport:2,propos:[1,2],provid:[0,1,2,3],publicli:2,purpos:[1,4],qcqp:2,qiu:[1,2],r_g:3,ramo:2,ramp:[0,1,2,4],random:[2,4],rank:2,rate:2,raw:2,reach:0,reactanc:0,read:4,read_benchmark:[2,3,4],readi:4,realist:[1,2],reason:4,recommend:4,redistribut:1,reduc:0,refer:1,regardless:0,regular:0,regulatori:2,reliabl:2,remain:0,remov:4,renew:0,repositori:[2,4],repres:[0,2],reproduc:1,request:[1,2],requir:[0,4],research:[1,2],reseau:2,reserv:[1,2,3],respect:[0,2],result:4,retain:1,revenu:[0,3],richard:2,right:1,roman:2,rto:2,rts_gmlc:2,run:[0,4],s_g:3,sale:2,same:[0,2,4],sanchez:2,sandnchez:2,santo:1,scale:1,scenario400_reserves_0:2,scenario400_reserves_1:2,scenario400_reserves_3:2,scenario400_reserves_5:2,scenario:0,scienc:1,script:[1,3,4],scuc:1,section:[0,2],secur:[1,2,3],see:[0,2,3,4],segment:[0,3],segprod:3,sens:2,sensibl:4,sensit:1,serv:[0,3],servic:1,set:[0,2,3,4],set_objective_coeffici:3,shall:1,shortag:0,should:[0,4],show:[0,3],shown:4,shut:0,shutdown:[0,2],siemen:0,signific:0,significantli:0,similar:2,simpli:4,simul:[0,2],sinc:[0,3],singl:[0,2,4],size:2,slightli:3,small:2,smaller:2,snapshot:2,societi:2,softwar:[1,2],solut:[1,3],solv:[2,3],solver:4,some:[2,3],sourc:[0,1,2,4],special:1,specif:[0,1,2],specifi:0,spin:0,stai:0,standard:3,start:[0,3],startup:[0,1,2,3],state:[0,1,2],statu:[0,3],steadi:2,step:[0,3,4],store:4,strict:1,strictli:0,string:0,studi:2,substitut:1,subtl:4,sum_:3,summer:2,support:[0,1],surplu:0,suscept:0,switch_off:3,switch_on:3,symbol:3,synthet:2,system:[0,1,2,4],systemat:2,tabl:0,take:2,target:0,task:2,team:2,tejada19:1,tejada:2,telusa19:2,test:[2,4],text:3,than:0,thank:1,thei:[0,2,4],them:[1,4],theori:1,therefor:4,thermal:0,thi:[0,1,3,4],thoma:2,three:0,through:[0,2],time:[1,2,3,4],todo:3,tool:[1,2],topolog:0,tort:1,total:2,tpwr:2,train:2,tran:2,transact:2,transmiss:[1,2],transport:2,two:2,type:4,typic:[1,2],u_g:3,uc_168h_105g:2,uc_168h_110g:2,uc_168h_125g:2,uc_168h_130g:2,uc_168h_131g:2,uc_168h_140g:2,uc_168h_165g:2,uc_168h_175g:2,uc_168h_179g:2,uc_168h_188g:2,uc_168h_192g:2,uc_168h_199g:2,uc_168h_36g:2,uc_168h_38g:2,uc_168h_40g:2,uc_168h_53g:2,uc_168h_58g:2,uc_168h_59g:2,uc_168h_72g:2,uc_168h_84g:2,uc_168h_86g:2,uc_168h_88g:2,uc_168h_93g:2,uc_24h_1069g:2,uc_24h_1130g:2,uc_24h_1376g:2,uc_24h_1393g:2,uc_24h_1577g:2,uc_24h_1615g:2,uc_24h_1632g:2,uc_24h_1768g:2,uc_24h_1804g:2,uc_24h_1820g:2,uc_24h_1823g:2,uc_24h_1888g:2,uc_24h_214g:2,uc_24h_250g:2,uc_24h_290g:2,uc_24h_480g:2,uc_24h_505g:2,uc_24h_623g:2,uc_24h_647g:2,uc_24h_836g:2,uc_24h_850g:2,uc_24h_918g:2,uc_24h_931g:2,uc_24h_940g:2,uc_24h_957g:2,uc_24h_959g:2,uchicago:1,ucjl:2,uncertainti:2,under:[1,3],understand:3,unit:[0,1,2,3,4],unitcommit:[2,3,4],univers:[1,2],unless:0,unlimit:0,unrealist:4,updat:2,upon:1,uptim:0,usag:[0,1,2],use:[1,2,4],used:[1,2,4],useful:3,using:[2,3,4],util:4,valid:[0,2,4],valu:[0,3],valuabl:1,vari:[0,2],variabl:1,variat:2,varieti:2,varnam:3,veri:[2,4],version:[0,1,2,4],violat:0,virtual:0,vol:2,voltag:2,wai:[1,3,4],warranti:1,washington:2,watson:[2,3],websit:4,wehenkel:2,well:[1,2],were:2,when:[0,4],where:[0,3],whether:[1,3],which:[0,1,2,4],wide:[0,2],winter:2,without:[1,2,3,4],work:1,would:1,write:4,written:1,www:2,xavier:[1,2],year:2,yonghong:1,you:[1,2,3,4],your:[1,2,4],zenodo:[1,2],zero:0,zimmerman:2,zonal:0},titles:["2. Data Format","UnitCommitment.jl","3. Instances","4. JuMP Model","1. Usage"],titleterms:{"function":3,RTS:2,access:3,acknowledg:1,addit:0,advanc:4,author:1,benchmark:4,buse:[0,3],california:2,cite:1,compon:1,condit:4,constraint:3,content:1,conting:0,cost:0,current:0,data:0,decis:3,exampl:0,ferc:2,format:0,formul:4,gener:[0,3,4],gmlc:2,initi:4,input:0,inspect:3,instal:4,instanc:[2,4],jump:3,lib:2,licens:1,limit:0,line:[0,3],load:[0,3],matpow:2,model:3,modifi:[3,4],object:3,output:0,packag:1,paramet:0,pegas:2,pglib:2,polish:2,price:[0,3],product:0,provid:4,pstca:2,refer:[2,3],remark:0,reserv:0,rte:2,sensit:[0,3],seri:0,site:1,solut:4,solv:4,tejada19:2,time:0,transmiss:[0,3],typic:4,unitcommit:1,usag:4,user:4,variabl:3,verifi:4}}) \ No newline at end of file diff --git a/0.2/usage/index.html b/0.2/usage/index.html index 20461e3..8fe26b8 100644 --- a/0.2/usage/index.html +++ b/0.2/usage/index.html @@ -278,7 +278,7 @@ UnitCommitment.optimize!(model) # Extract solution and write it to a file -solution = UnitCommitment.get_solution(model) +solution = UnitCommitment.solution(model) open("/path/to/output.json", "w") do file JSON.print(file, solution, 2) end