@ -0,0 +1,4 @@
|
|||||||
|
# Sphinx build info version 1
|
||||||
|
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||||
|
config: e45a7fe8a95d461be60dae9616b4cc97
|
||||||
|
tags: d77d1c0d9ca2f4c8421862c7c5a0d620
|
@ -1,228 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<link rel="shortcut icon" href="/img/favicon.ico">
|
|
||||||
|
|
||||||
|
|
||||||
<title>UnitCommitment.jl</title>
|
|
||||||
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/all.css">
|
|
||||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/v4-shims.css">
|
|
||||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/hack-font@3.3.0/build/web/hack.min.css">
|
|
||||||
<link href='//rsms.me/inter/inter.css' rel='stylesheet' type='text/css'>
|
|
||||||
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,600,700&subset=latin-ext,latin' rel='stylesheet' type='text/css'>
|
|
||||||
<link href="/css/bootstrap-custom.min.css" rel="stylesheet">
|
|
||||||
<link href="/css/base.min.css" rel="stylesheet">
|
|
||||||
<link href="/css/cinder.min.css" rel="stylesheet">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.0/build/styles/github.min.css">
|
|
||||||
|
|
||||||
|
|
||||||
<link href="/css/custom.css" rel="stylesheet">
|
|
||||||
|
|
||||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
<!-- Collapsed navigation -->
|
|
||||||
<div class="navbar-header">
|
|
||||||
<!-- Expander button -->
|
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
|
||||||
<span class="sr-only">Toggle navigation</span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Main title -->
|
|
||||||
|
|
||||||
|
|
||||||
<a class="navbar-brand" href="/.">UnitCommitment.jl</a>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Expanded navigation -->
|
|
||||||
<div class="navbar-collapse collapse">
|
|
||||||
<!-- Main navigation -->
|
|
||||||
<ul class="nav navbar-nav">
|
|
||||||
|
|
||||||
|
|
||||||
<li >
|
|
||||||
<a href="/.">Home</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li >
|
|
||||||
<a href="/usage/">Usage</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li >
|
|
||||||
<a href="/format/">Format</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li >
|
|
||||||
<a href="/instances/">Instances</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
|
||||||
<li>
|
|
||||||
<a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
|
|
||||||
<i class="fas fa-search"></i> Search
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="https://github.com/ANL-CEEESA/unitcommitment.jl/"><i class="fab fa-github"></i> GitHub</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row-fluid">
|
|
||||||
<div id="main-content" class="span12">
|
|
||||||
<h1 id="404-page-not-found" style="text-align: center">404</h1>
|
|
||||||
<p style="text-align: center"><strong>Page not found</strong></p>
|
|
||||||
<p style="text-align: center"><a href="/">Home</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<footer class="col-md-12 text-center">
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<p>
|
|
||||||
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.</small><br>
|
|
||||||
|
|
||||||
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</small>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
|
||||||
<script src="/js/bootstrap-3.0.3.min.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.0/build/highlight.min.js"></script>
|
|
||||||
|
|
||||||
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.0/build/languages/julia.min.js"></script>
|
|
||||||
|
|
||||||
<script>hljs.initHighlightingOnLoad();</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script>var base_url = "/"</script>
|
|
||||||
|
|
||||||
<script src="/js/base.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
|
||||||
<script src="/js/mathjax.js"></script>
|
|
||||||
<script src="/search/main.js"></script>
|
|
||||||
|
|
||||||
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-lg">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
<span class="sr-only">Close</span>
|
|
||||||
</button>
|
|
||||||
<h4 class="modal-title" id="searchModalLabel">Search</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<p>
|
|
||||||
From here you can search these documents. Enter
|
|
||||||
your search terms below.
|
|
||||||
</p>
|
|
||||||
<form>
|
|
||||||
<div class="form-group">
|
|
||||||
<input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<div id="mkdocs-search-results"></div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
|
|
||||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width: 20%;">Keys</th>
|
|
||||||
<th>Action</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="help shortcut"><kbd>?</kbd></td>
|
|
||||||
<td>Open this help</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="next shortcut"><kbd>n</kbd></td>
|
|
||||||
<td>Next page</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="prev shortcut"><kbd>p</kbd></td>
|
|
||||||
<td>Previous page</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="search shortcut"><kbd>s</kbd></td>
|
|
||||||
<td>Search</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -0,0 +1,182 @@
|
|||||||
|
```{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)
|
||||||
|
```
|
@ -0,0 +1,292 @@
|
|||||||
|
```{sectnum}
|
||||||
|
---
|
||||||
|
start: 2
|
||||||
|
depth: 2
|
||||||
|
suffix: .
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Data Format
|
||||||
|
===========
|
||||||
|
|
||||||
|
|
||||||
|
Input Data Format
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Instances are specified by JSON files containing the following main sections:
|
||||||
|
|
||||||
|
* Parameters
|
||||||
|
* Buses
|
||||||
|
* Generators
|
||||||
|
* Price-sensitive loads
|
||||||
|
* Transmission lines
|
||||||
|
* Reserves
|
||||||
|
* Contingencies
|
||||||
|
|
||||||
|
Each section is described in detail below. For a complete example, see [case14](https://github.com/ANL-CEEESA/UnitCommitment.jl/tree/dev/instances/matpower/case14).
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
This section describes system-wide parameters, such as power balance penalties, optimization parameters, such as the length of the planning horizon and the time.
|
||||||
|
|
||||||
|
| Key | Description | Default | Time series?
|
||||||
|
| :----------------------------- | :------------------------------------------------ | :------: | :------------:
|
||||||
|
| `Time horizon (h)` | Length of the planning horizon (in hours). | Required | N
|
||||||
|
| `Time step (min)` | Length of each time step (in minutes). Must be a divisor of 60 (e.g. 60, 30, 20, 15, etc). | `60` | N
|
||||||
|
| `Power balance penalty ($/MW)` | Penalty for system-wide shortage or surplus in production (in $/MW). This is charged per time step. For example, if there is a shortage of 1 MW for three time steps, three times this amount will be charged. | `1000.0` | Y
|
||||||
|
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Parameters": {
|
||||||
|
"Time horizon (h)": 4,
|
||||||
|
"Power balance penalty ($/MW)": 1000.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Buses
|
||||||
|
|
||||||
|
This section describes the characteristics of each bus in the system.
|
||||||
|
|
||||||
|
| Key | Description | Default | Time series?
|
||||||
|
| :----------------- | :------------------------------------------------------------ | ------- | :-------------:
|
||||||
|
| `Load (MW)` | Fixed load connected to the bus (in MW). | Required | Y
|
||||||
|
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Buses": {
|
||||||
|
"b1": {
|
||||||
|
"Load (MW)": 0.0
|
||||||
|
},
|
||||||
|
"b2": {
|
||||||
|
"Load (MW)": [
|
||||||
|
26.01527,
|
||||||
|
24.46212,
|
||||||
|
23.29725,
|
||||||
|
22.90897
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Generators
|
||||||
|
|
||||||
|
This section describes all generators in the system, including thermal units, renewable units and virtual units.
|
||||||
|
|
||||||
|
| Key | Description | Default | Time series?
|
||||||
|
| :------------------------ | :------------------------------------------------| ------- | :-----------:
|
||||||
|
| `Bus` | Identifier of the bus where this generator is located (string). | Required | N
|
||||||
|
| `Production cost curve (MW)` and `Production cost curve ($)` | Parameters describing the piecewise-linear production costs. See below for more details. | Required | Y
|
||||||
|
| `Startup costs ($)` and `Startup delays (h)` | Parameters describing how much it costs to start the generator after it has been shut down for a certain amount of time. If `Startup costs ($)` and `Startup delays (h)` are set to `[300.0, 400.0]` and `[1, 4]`, for example, and the generator is shut down at time `00:00` (h:min), then it costs \$300 to start up the generator at any time between `01:00` and `03:59`, and \$400 to start the generator at time `04:00` or any time after that. The number of startup cost points is unlimited, and may be different for each generator. Startup delays must be strictly increasing and the first entry must equal `Minimum downtime (h)`. | `[0.0]` and `[1]` | N
|
||||||
|
| `Minimum uptime (h)` | Minimum amount of time the generator must stay operational after starting up (in hours). For example, if the generator starts up at time `00:00` (h:min) and `Minimum uptime (h)` is set to 4, then the generator can only shut down at time `04:00`. | `1` | N
|
||||||
|
| `Minimum downtime (h)` | Minimum amount of time the generator must stay offline after shutting down (in hours). For example, if the generator shuts down at time `00:00` (h:min) and `Minimum downtime (h)` is set to 4, then the generator can only start producing power again at time `04:00`. | `1` | N
|
||||||
|
| `Ramp up limit (MW)` | Maximum increase in production from one time step to the next (in MW). For example, if the generator is producing 100 MW at time step 1 and if this parameter is set to 40 MW, then the generator will produce at most 140 MW at time step 2. | `+inf` | N
|
||||||
|
| `Ramp down limit (MW)` | Maximum decrease in production from one time step to the next (in MW). For example, if the generator is producing 100 MW at time step 1 and this parameter is set to 40 MW, then the generator will produce at least 60 MW at time step 2. | `+inf` | N
|
||||||
|
| `Startup limit (MW)` | Maximum amount of power a generator can produce immediately after starting up (in MW). For example, if `Startup limit (MW)` is set to 100 MW and the unit is off at time step 1, then it may produce at most 100 MW at time step 2.| `+inf` | N
|
||||||
|
| `Shutdown limit (MW)` | Maximum amount of power a generator can produce immediately before shutting down (in MW). Specifically, the generator can only shut down at time step `t+1` if its production at time step `t` is below this limit. | `+inf` | N
|
||||||
|
| `Initial status (h)` | If set to a positive number, indicates the amount of time (in hours) the generator has been on at the beginning of the simulation, and if set to a negative number, the amount of time the generator has been off. For example, if `Initial status (h)` is `-2`, this means that the generator was off since `-02:00` (h:min). The simulation starts at time `00:00`. If `Initial status (h)` is `3`, this means that the generator was on since `-03:00`. A value of zero is not acceptable. | Required | N
|
||||||
|
| `Initial power (MW)` | Amount of power the generator at time step `-1`, immediately before the planning horizon starts. | Required | N
|
||||||
|
| `Must run?` | If `true`, the generator should be committed, even if that is not economical (Boolean). | `false` | Y
|
||||||
|
| `Provides spinning reserves?` | If `true`, this generator may provide spinning reserves (Boolean). | `true` | Y
|
||||||
|
|
||||||
|
#### Production costs and limits
|
||||||
|
|
||||||
|
Production costs are represented as piecewise-linear curves. Figure 1 shows an example cost curve with three segments, where it costs \$1400, \$1600, \$2200 and \$2400 to generate, respectively, 100, 110, 130 and 135 MW of power. To model this generator, `Production cost curve (MW)` should be set to `[100, 110, 130, 135]`, and `Production cost curve ($)` should be set to `[1400, 1600, 2200, 2400]`.
|
||||||
|
Note that this curve also specifies the production limits. Specifically, the first point identifies the minimum power output when the unit is operational, while the last point identifies the maximum power output.
|
||||||
|
|
||||||
|
<center>
|
||||||
|
<img src="../_static/cost_curve.png" style="max-width: 500px"/>
|
||||||
|
<div><b>Figure 1.</b> Piecewise-linear production cost curve.</div>
|
||||||
|
<br/>
|
||||||
|
</center>
|
||||||
|
|
||||||
|
#### Additional remarks:
|
||||||
|
|
||||||
|
* For time-dependent production limits or time-dependent production costs, the usage of nested arrays is allowed. For example, if `Production cost curve (MW)` is set to `[5.0, [10.0, 12.0, 15.0, 20.0]]`, then the unit may generate at most 10, 12, 15 and 20 MW of power during time steps 1, 2, 3 and 4, respectively. The minimum output for all time periods is fixed to at 5 MW.
|
||||||
|
* There is no limit to the number of piecewise-linear segments, and different generators may have a different number of segments.
|
||||||
|
* If `Production cost curve (MW)` and `Production cost curve ($)` both contain a single element, then the generator must produce exactly that amount of power when operational. To specify that the generator may produce any amount of power up to a certain limit `P`, the parameter `Production cost curve (MW)` should be set to `[0, P]`.
|
||||||
|
* Production cost curves must be convex.
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Generators": {
|
||||||
|
"gen1": {
|
||||||
|
"Bus": "b1",
|
||||||
|
"Production cost curve (MW)": [100.0, 110.0, 130.0, 135.0],
|
||||||
|
"Production cost curve ($)": [1400.0, 1600.0, 2200.0, 2400.0],
|
||||||
|
"Startup costs ($)": [300.0, 400.0],
|
||||||
|
"Startup delays (h)": [1, 4],
|
||||||
|
"Ramp up limit (MW)": 232.68,
|
||||||
|
"Ramp down limit (MW)": 232.68,
|
||||||
|
"Startup limit (MW)": 232.68,
|
||||||
|
"Shutdown limit (MW)": 232.68,
|
||||||
|
"Minimum downtime (h)": 4,
|
||||||
|
"Minimum uptime (h)": 4,
|
||||||
|
"Initial status (h)": 12,
|
||||||
|
"Must run?": false,
|
||||||
|
"Provides spinning reserves?": true,
|
||||||
|
},
|
||||||
|
"gen2": {
|
||||||
|
"Bus": "b5",
|
||||||
|
"Production cost curve (MW)": [0.0, [10.0, 8.0, 0.0, 3.0]],
|
||||||
|
"Production cost curve ($)": [0.0, 0.0],
|
||||||
|
"Provides spinning reserves?": true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Price-sensitive loads
|
||||||
|
|
||||||
|
This section describes components in the system which may increase or reduce their energy consumption according to the energy prices. Fixed loads (as described in the `buses` section) are always served, regardless of the price, unless there is significant congestion in the system or insufficient production capacity. Price-sensitive loads, on the other hand, are only served if it is economical to do so.
|
||||||
|
|
||||||
|
| Key | Description | Default | Time series?
|
||||||
|
| :---------------- | :------------------------------------------------ | :------: | :------------:
|
||||||
|
| `Bus` | Bus where the load is located. Multiple price-sensitive loads may be placed at the same bus. | Required | N
|
||||||
|
| `Revenue ($/MW)` | Revenue obtained for serving each MW of power to this load. | Required | Y
|
||||||
|
| `Demand (MW)` | Maximum amount of power required by this load. Any amount lower than this may be served. | Required | Y
|
||||||
|
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Price-sensitive loads": {
|
||||||
|
"p1": {
|
||||||
|
"Bus": "b3",
|
||||||
|
"Revenue ($/MW)": 23.0,
|
||||||
|
"Demand (MW)": 50.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Transmission Lines
|
||||||
|
|
||||||
|
This section describes the characteristics of transmission system, such as its topology and the susceptance of each transmission line.
|
||||||
|
|
||||||
|
| Key | Description | Default | Time series?
|
||||||
|
| :--------------------- | :----------------------------------------------- | ------- | :------------:
|
||||||
|
| `Source bus` | Identifier of the bus where the transmission line originates. | Required | N
|
||||||
|
| `Target bus` | Identifier of the bus where the transmission line reaches. | Required | N
|
||||||
|
| `Reactance (ohms)` | Reactance of the transmission line (in ohms). | Required | N
|
||||||
|
| `Susceptance (S)` | Susceptance of the transmission line (in siemens). | Required | N
|
||||||
|
| `Normal flow limit (MW)` | Maximum amount of power (in MW) allowed to flow through the line when the system is in its regular, fully-operational state. | `+inf` | Y
|
||||||
|
| `Emergency flow limit (MW)` | Maximum amount of power (in MW) allowed to flow through the line when the system is in degraded state (for example, after the failure of another transmission line). | `+inf` | Y
|
||||||
|
| `Flow limit penalty ($/MW)` | Penalty for violating the flow limits of the transmission line (in $/MW). This is charged per time step. For example, if there is a thermal violation of 1 MW for three time steps, then three times this amount will be charged. | `5000.0` | Y
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Transmission lines": {
|
||||||
|
"l1": {
|
||||||
|
"Source bus": "b1",
|
||||||
|
"Target bus": "b2",
|
||||||
|
"Reactance (ohms)": 0.05917,
|
||||||
|
"Susceptance (S)": 29.49686,
|
||||||
|
"Normal flow limit (MW)": 15000.0,
|
||||||
|
"Emergency flow limit (MW)": 20000.0,
|
||||||
|
"Flow limit penalty ($/MW)": 5000.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Reserves
|
||||||
|
|
||||||
|
This section describes the hourly amount of operating reserves required.
|
||||||
|
|
||||||
|
|
||||||
|
| Key | Description | Default | Time series?
|
||||||
|
| :-------------------- | :------------------------------------------------- | --------- | :----:
|
||||||
|
| `Spinning (MW)` | Minimum amount of system-wide spinning reserves (in MW). Only generators which are online may provide this reserve. | `0.0` | Y
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Reserves": {
|
||||||
|
"Spinning (MW)": [
|
||||||
|
57.30552,
|
||||||
|
53.88429,
|
||||||
|
51.31838,
|
||||||
|
50.46307
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Contingencies
|
||||||
|
|
||||||
|
This section describes credible contingency scenarios in the optimization, such as the loss of a transmission line or generator.
|
||||||
|
|
||||||
|
| Key | Description | Default
|
||||||
|
| :-------------------- | :----------------------------------------------- | ----------
|
||||||
|
| `Affected generators` | List of generators affected by this contingency. May be omitted if no generators are affected. | `[]`
|
||||||
|
| `Affected lines` | List of transmission lines affected by this contingency. May be omitted if no lines are affected. | `[]`
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Contingencies": {
|
||||||
|
"c1": {
|
||||||
|
"Affected lines": ["l1", "l2", "l3"],
|
||||||
|
"Affected generators": ["g1"]
|
||||||
|
},
|
||||||
|
"c2": {
|
||||||
|
"Affected lines": ["l4"]
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Additional remarks
|
||||||
|
|
||||||
|
#### Time series parameters
|
||||||
|
|
||||||
|
Many numerical properties in the JSON file can be specified either as a single floating point number if they are time-independent, or as an array containing exactly `T` elements, if they are time-dependent, where `T` is the number of time steps in the planning horizon. For example, both formats below are valid when `T=3`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Load (MW)": 800.0,
|
||||||
|
"Load (MW)": [800.0, 850.0, 730.0]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The value `T` depends on both `Time horizon (h)` and `Time step (min)`, as the table below illustrates.
|
||||||
|
|
||||||
|
Time horizon (h) | Time step (min) | T
|
||||||
|
:---------------:|:---------------:|:----:
|
||||||
|
24 | 60 | 24
|
||||||
|
24 | 15 | 96
|
||||||
|
24 | 5 | 288
|
||||||
|
36 | 60 | 36
|
||||||
|
36 | 15 | 144
|
||||||
|
36 | 5 | 432
|
||||||
|
|
||||||
|
Output Data Format
|
||||||
|
------------------
|
||||||
|
|
||||||
|
The output data format is also JSON-based, but it is not currently documented since we expect it to change significantly in a future version of the package.
|
||||||
|
|
||||||
|
|
||||||
|
Current limitations
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
* All reserves are system-wide. Zonal reserves are not currently supported.
|
||||||
|
* Network topology remains the same for all time periods
|
||||||
|
* Only N-1 transmission contingencies are supported. Generator contingencies are not currently supported.
|
||||||
|
* Time-varying minimum production amounts are not currently compatible with ramp/startup/shutdown limits.
|
||||||
|
|
||||||
|
|
@ -0,0 +1,72 @@
|
|||||||
|
# UnitCommitment.jl
|
||||||
|
|
||||||
|
**UnitCommitment.jl** (UC.jl) is a Julia/JuMP optimization package for the Security-Constrained Unit Commitment Problem (SCUC), a fundamental optimization problem in power systems used, for example, to clear the day-ahead electricity markets. The package provides benchmark instances for the problem and Julia/JuMP implementations of state-of-the-art mixed-integer programming formulations.
|
||||||
|
|
||||||
|
### Package Components
|
||||||
|
|
||||||
|
* **Data Format:** The package proposes an extensible and fully-documented JSON-based data specification format for SCUC, developed in collaboration with Independent System Operators (ISOs), which describes the most important aspects of the problem. The format supports all the most common generator characteristics (including ramping, piecewise-linear production cost curves and time-dependent startup costs), as well as operating reserves, price-sensitive loads, transmission networks and contingencies.
|
||||||
|
* **Benchmark Instances:** The package provides a diverse collection of large-scale benchmark instances collected from the literature and extended to make them more challenging and realistic.
|
||||||
|
* **Model Implementation**: The package provides a Julia/JuMP implementation of state-of-the-art formulations and solution methods for SCUC. Our goal is to keep this implementation up-to-date, as new methods are proposed in the literature.
|
||||||
|
* **Benchmark Tools:** The package provides automated benchmark scripts to accurately evaluate the performance impact of proposed code changes.
|
||||||
|
|
||||||
|
### Authors
|
||||||
|
* **Alinson Santos Xavier** (Argonne National Laboratory)
|
||||||
|
* **Feng Qiu** (Argonne National Laboratory)
|
||||||
|
|
||||||
|
### Acknowledgments
|
||||||
|
|
||||||
|
* We would like to thank **Aleksandr M. Kazachkov** (University of Florida), **Yonghong Chen** (Midcontinent Independent System Operator), **Feng Pan** (Pacific Northwest National Laboratory) for valuable feedback on early versions of this package.
|
||||||
|
|
||||||
|
* Based upon work supported by **Laboratory Directed Research and Development** (LDRD) funding from Argonne National Laboratory, provided by the Director, Office of Science, of the U.S. Department of Energy under Contract No. DE-AC02-06CH11357
|
||||||
|
|
||||||
|
* Based upon work supported by the **U.S. Department of Energy Advanced Grid Modeling Program** under Grant DE-OE0000875.
|
||||||
|
|
||||||
|
### Citing
|
||||||
|
|
||||||
|
If you use UnitCommitment.jl in your research (that is, if you use either the provided instances files, the mathematical models, or the algorithms), we kindly request that you cite the package as follows:
|
||||||
|
|
||||||
|
* **Alinson S. Xavier, Feng Qiu**, "UnitCommitment.jl: A Julia/JuMP Optimization Package for Security-Constrained Unit Commitment". Zenodo (2020). [DOI: 10.5281/zenodo.4269874](https://doi.org/10.5281/zenodo.4269874).
|
||||||
|
|
||||||
|
If you use the instances, we additionally request that you cite the original sources, as described in the [instances page](instances.md).
|
||||||
|
|
||||||
|
### License
|
||||||
|
|
||||||
|
```text
|
||||||
|
UnitCommitment.jl: A Julia/JuMP Optimization Package for Security-Constrained Unit Commitment
|
||||||
|
Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||||
|
provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
conditions and the following disclaimer.
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice, this list of
|
||||||
|
conditions and the following disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
3. Neither the name of the copyright holder nor the names of its contributors may be used to
|
||||||
|
endorse or promote products derived from this software without specific prior written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Site contents
|
||||||
|
|
||||||
|
```{toctree}
|
||||||
|
---
|
||||||
|
maxdepth: 2
|
||||||
|
---
|
||||||
|
usage.md
|
||||||
|
format.md
|
||||||
|
instances.md
|
||||||
|
about.md
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,120 @@
|
|||||||
|
```{sectnum}
|
||||||
|
---
|
||||||
|
start: 1
|
||||||
|
depth: 2
|
||||||
|
suffix: .
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
Installation
|
||||||
|
------------
|
||||||
|
|
||||||
|
UnitCommitment.jl was tested and developed with [Julia 1.6](https://julialang.org/). To install Julia, please follow the [installation guide on the official Julia website](https://julialang.org/downloads/platform.html). To install UnitCommitment.jl, run the Julia interpreter, type `]` to open the package manager, then type:
|
||||||
|
|
||||||
|
```text
|
||||||
|
pkg> add UnitCommitment@0.2
|
||||||
|
```
|
||||||
|
|
||||||
|
To test that the package has been correctly installed, run:
|
||||||
|
|
||||||
|
```text
|
||||||
|
pkg> test UnitCommitment
|
||||||
|
```
|
||||||
|
|
||||||
|
If all tests pass, the package should now be ready to be used by any Julia script on the machine.
|
||||||
|
|
||||||
|
To solve the optimization models, a mixed-integer linear programming (MILP) solver is also required. Please see the [JuMP installation guide](https://jump.dev/JuMP.jl/stable/installation/) for more instructions on installing a solver. Typical open-source choices are [Cbc](https://github.com/JuliaOpt/Cbc.jl) and [GLPK](https://github.com/JuliaOpt/GLPK.jl). In the instructions below, Cbc will be used, but any other MILP solver listed in JuMP installation guide should also be compatible.
|
||||||
|
|
||||||
|
Typical Usage
|
||||||
|
-------------
|
||||||
|
|
||||||
|
### Solving user-provided instances
|
||||||
|
|
||||||
|
The first step to use UC.jl is to construct a JSON file describing your unit commitment instance. See the [data format page]() for a complete description of the data format UC.jl expects. The next steps, as shown below, are to read the instance from file, construct the optimization model, run the optimization and extract the optimal solution.
|
||||||
|
|
||||||
|
```julia
|
||||||
|
using Cbc
|
||||||
|
using JSON
|
||||||
|
using UnitCommitment
|
||||||
|
|
||||||
|
# Read instance
|
||||||
|
instance = UnitCommitment.read("/path/to/input.json")
|
||||||
|
|
||||||
|
# Construct optimization model
|
||||||
|
model = UnitCommitment.build_model(
|
||||||
|
instance=instance,
|
||||||
|
optimizer=Cbc.Optimizer,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Solve model
|
||||||
|
UnitCommitment.optimize!(model)
|
||||||
|
|
||||||
|
# Extract solution and write it to a file
|
||||||
|
solution = UnitCommitment.get_solution(model)
|
||||||
|
open("/path/to/output.json", "w") do file
|
||||||
|
JSON.print(file, solution, 2)
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
### Solving benchmark instances
|
||||||
|
|
||||||
|
As described in the [Instances page](instances.md), UnitCommitment.jl contains a number of benchmark instances collected from the literature. To solve one of these instances individually, instead of constructing your own, the function `read_benchmark` can be used:
|
||||||
|
|
||||||
|
```julia
|
||||||
|
using UnitCommitment
|
||||||
|
instance = UnitCommitment.read_benchmark("matpower/case3375wp/2017-02-01")
|
||||||
|
```
|
||||||
|
|
||||||
|
Advanced usage
|
||||||
|
--------------
|
||||||
|
|
||||||
|
|
||||||
|
### Modifying the formulation
|
||||||
|
|
||||||
|
For the time being, the recommended way of modifying the MILP formulation used by UC.jl is to create a local copy of our git repository and directly modify the source code of the package. In a future version, it will be possible to switch between multiple formulations, or to simply add/remove constraints after the model has been generated.
|
||||||
|
|
||||||
|
### Generating initial conditions
|
||||||
|
|
||||||
|
When creating random unit commitment instances for benchmark purposes, it is often hard to compute, in advance, sensible initial conditions for all generators. Setting initial conditions naively (for example, making all generators initially off and producing no power) can easily cause the instance to become infeasible due to excessive ramping. Initial conditions can also make it hard to modify existing instances. For example, increasing the system load without carefully modifying the initial conditions may make the problem infeasible or unrealistically challenging to solve.
|
||||||
|
|
||||||
|
To help with this issue, UC.jl provides a utility function which can generate feasible initial conditions by solving a single-period optimization problem, as shown below:
|
||||||
|
|
||||||
|
```julia
|
||||||
|
using Cbc
|
||||||
|
using UnitCommitment
|
||||||
|
|
||||||
|
# Read original instance
|
||||||
|
instance = UnitCommitment.read("instance.json")
|
||||||
|
|
||||||
|
# Generate initial conditions (in-place)
|
||||||
|
UnitCommitment.generate_initial_conditions!(instance, Cbc.Optimizer)
|
||||||
|
|
||||||
|
# Construct and solve optimization model
|
||||||
|
model = UnitCommitment.build_model(instance, Cbc.Optimizer)
|
||||||
|
UnitCommitment.optimize!(model)
|
||||||
|
```
|
||||||
|
|
||||||
|
```{warning}
|
||||||
|
The function `generate_initial_conditions!` may return different initial conditions after each call, even if the same instance and the same optimizer is provided. The particular algorithm may also change in a future version of UC.jl. For these reasons, it is recommended that you generate initial conditions exactly once for each instance and store them for later use.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Verifying solutions
|
||||||
|
|
||||||
|
When developing new formulations, it is very easy to introduce subtle errors in the model that result in incorrect solutions. To help with this, UC.jl includes a utility function that verifies if a given solution is feasible, and, if not, prints all the validation errors it found. The implementation of this function is completely independent from the implementation of the optimization model, and therefore can be used to validate it. The function can also be used to verify solutions produced by other optimization packages, as long as they follow the [UC.jl data format](format.md).
|
||||||
|
|
||||||
|
```julia
|
||||||
|
using JSON
|
||||||
|
using UnitCommitment
|
||||||
|
|
||||||
|
# Read instance
|
||||||
|
instance = UnitCommitment.read("instance.json")
|
||||||
|
|
||||||
|
# Read solution (potentially produced by other packages)
|
||||||
|
solution = JSON.parsefile("solution.json")
|
||||||
|
|
||||||
|
# Validate solution and print validation errors
|
||||||
|
UnitCommitment.validate(instance, solution)
|
||||||
|
```
|
@ -0,0 +1,861 @@
|
|||||||
|
/*
|
||||||
|
* basic.css
|
||||||
|
* ~~~~~~~~~
|
||||||
|
*
|
||||||
|
* Sphinx stylesheet -- basic theme.
|
||||||
|
*
|
||||||
|
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||||
|
* :license: BSD, see LICENSE for details.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* -- main layout ----------------------------------------------------------- */
|
||||||
|
|
||||||
|
div.clearer {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.section::after {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- relbar ---------------------------------------------------------------- */
|
||||||
|
|
||||||
|
div.related {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.related h3 {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.related ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 0 0 10px;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.related li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.related li.right {
|
||||||
|
float: right;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- sidebar --------------------------------------------------------------- */
|
||||||
|
|
||||||
|
div.sphinxsidebarwrapper {
|
||||||
|
padding: 10px 5px 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sphinxsidebar {
|
||||||
|
float: left;
|
||||||
|
width: 270px;
|
||||||
|
margin-left: -100%;
|
||||||
|
font-size: 90%;
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow-wrap : break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sphinxsidebar ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sphinxsidebar ul ul,
|
||||||
|
div.sphinxsidebar ul.want-points {
|
||||||
|
margin-left: 20px;
|
||||||
|
list-style: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sphinxsidebar ul ul {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sphinxsidebar form {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sphinxsidebar input {
|
||||||
|
border: 1px solid #98dbcc;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sphinxsidebar #searchbox form.search {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sphinxsidebar #searchbox input[type="text"] {
|
||||||
|
float: left;
|
||||||
|
width: 80%;
|
||||||
|
padding: 0.25em;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sphinxsidebar #searchbox input[type="submit"] {
|
||||||
|
float: left;
|
||||||
|
width: 20%;
|
||||||
|
border-left: none;
|
||||||
|
padding: 0.25em;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
img {
|
||||||
|
border: 0;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- search page ----------------------------------------------------------- */
|
||||||
|
|
||||||
|
ul.search {
|
||||||
|
margin: 10px 0 0 20px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.search li {
|
||||||
|
padding: 5px 0 5px 20px;
|
||||||
|
background-image: url(file.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: 0 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.search li a {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.search li div.context {
|
||||||
|
color: #888;
|
||||||
|
margin: 2px 0 0 30px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.keywordmatches li.goodmatch a {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- index page ------------------------------------------------------------ */
|
||||||
|
|
||||||
|
table.contentstable {
|
||||||
|
width: 90%;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.contentstable p.biglink {
|
||||||
|
line-height: 150%;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.biglink {
|
||||||
|
font-size: 1.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.linkdescr {
|
||||||
|
font-style: italic;
|
||||||
|
padding-top: 5px;
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- general index --------------------------------------------------------- */
|
||||||
|
|
||||||
|
table.indextable {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.indextable td {
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.indextable ul {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.indextable > tbody > tr > td > ul {
|
||||||
|
padding-left: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.indextable tr.pcap {
|
||||||
|
height: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.indextable tr.cap {
|
||||||
|
margin-top: 10px;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.toggler {
|
||||||
|
margin-right: 3px;
|
||||||
|
margin-top: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.modindex-jumpbox {
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
margin: 1em 0 1em 0;
|
||||||
|
padding: 0.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.genindex-jumpbox {
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
margin: 1em 0 1em 0;
|
||||||
|
padding: 0.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- domain module index --------------------------------------------------- */
|
||||||
|
|
||||||
|
table.modindextable td {
|
||||||
|
padding: 2px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- general body styles --------------------------------------------------- */
|
||||||
|
|
||||||
|
div.body {
|
||||||
|
min-width: 450px;
|
||||||
|
max-width: 800px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.body p, div.body dd, div.body li, div.body blockquote {
|
||||||
|
-moz-hyphens: auto;
|
||||||
|
-ms-hyphens: auto;
|
||||||
|
-webkit-hyphens: auto;
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.headerlink {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.brackets:before,
|
||||||
|
span.brackets > a:before{
|
||||||
|
content: "[";
|
||||||
|
}
|
||||||
|
|
||||||
|
a.brackets:after,
|
||||||
|
span.brackets > a:after {
|
||||||
|
content: "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
h1:hover > a.headerlink,
|
||||||
|
h2:hover > a.headerlink,
|
||||||
|
h3:hover > a.headerlink,
|
||||||
|
h4:hover > a.headerlink,
|
||||||
|
h5:hover > a.headerlink,
|
||||||
|
h6:hover > a.headerlink,
|
||||||
|
dt:hover > a.headerlink,
|
||||||
|
caption:hover > a.headerlink,
|
||||||
|
p.caption:hover > a.headerlink,
|
||||||
|
div.code-block-caption:hover > a.headerlink {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.body p.caption {
|
||||||
|
text-align: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.body td {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.first {
|
||||||
|
margin-top: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.rubric {
|
||||||
|
margin-top: 30px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.align-left, figure.align-left, .figure.align-left, object.align-left {
|
||||||
|
clear: left;
|
||||||
|
float: left;
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.align-right, figure.align-right, .figure.align-right, object.align-right {
|
||||||
|
clear: right;
|
||||||
|
float: right;
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.align-center, figure.align-center, .figure.align-center, object.align-center {
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.align-default, figure.align-default, .figure.align-default {
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-left {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-default {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.align-right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- sidebars -------------------------------------------------------------- */
|
||||||
|
|
||||||
|
div.sidebar,
|
||||||
|
aside.sidebar {
|
||||||
|
margin: 0 0 0.5em 1em;
|
||||||
|
border: 1px solid #ddb;
|
||||||
|
padding: 7px;
|
||||||
|
background-color: #ffe;
|
||||||
|
width: 40%;
|
||||||
|
float: right;
|
||||||
|
clear: right;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.sidebar-title {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.admonition, div.topic, blockquote {
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- topics ---------------------------------------------------------------- */
|
||||||
|
|
||||||
|
div.topic {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 7px;
|
||||||
|
margin: 10px 0 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.topic-title {
|
||||||
|
font-size: 1.1em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- admonitions ----------------------------------------------------------- */
|
||||||
|
|
||||||
|
div.admonition {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.admonition dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.admonition-title {
|
||||||
|
margin: 0px 10px 5px 0px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.body p.centered {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- content of sidebars/topics/admonitions -------------------------------- */
|
||||||
|
|
||||||
|
div.sidebar > :last-child,
|
||||||
|
aside.sidebar > :last-child,
|
||||||
|
div.topic > :last-child,
|
||||||
|
div.admonition > :last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sidebar::after,
|
||||||
|
aside.sidebar::after,
|
||||||
|
div.topic::after,
|
||||||
|
div.admonition::after,
|
||||||
|
blockquote::after {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- tables ---------------------------------------------------------------- */
|
||||||
|
|
||||||
|
table.docutils {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
border: 0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.align-center {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.align-default {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table caption span.caption-number {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
table caption span.caption-text {
|
||||||
|
}
|
||||||
|
|
||||||
|
table.docutils td, table.docutils th {
|
||||||
|
padding: 1px 8px 1px 5px;
|
||||||
|
border-top: 0;
|
||||||
|
border-left: 0;
|
||||||
|
border-right: 0;
|
||||||
|
border-bottom: 1px solid #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.footnote td, table.footnote th {
|
||||||
|
border: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: left;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.citation {
|
||||||
|
border-left: solid 1px gray;
|
||||||
|
margin-left: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.citation td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
th > :first-child,
|
||||||
|
td > :first-child {
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th > :last-child,
|
||||||
|
td > :last-child {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- figures --------------------------------------------------------------- */
|
||||||
|
|
||||||
|
div.figure, figure {
|
||||||
|
margin: 0.5em;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.figure p.caption, figcaption {
|
||||||
|
padding: 0.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.figure p.caption span.caption-number,
|
||||||
|
figcaption span.caption-number {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.figure p.caption span.caption-text,
|
||||||
|
figcaption span.caption-text {
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- field list styles ----------------------------------------------------- */
|
||||||
|
|
||||||
|
table.field-list td, table.field-list th {
|
||||||
|
border: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field-list ul {
|
||||||
|
margin: 0;
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field-list p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field-name {
|
||||||
|
-moz-hyphens: manual;
|
||||||
|
-ms-hyphens: manual;
|
||||||
|
-webkit-hyphens: manual;
|
||||||
|
hyphens: manual;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- hlist styles ---------------------------------------------------------- */
|
||||||
|
|
||||||
|
table.hlist {
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.hlist td {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -- other body styles ----------------------------------------------------- */
|
||||||
|
|
||||||
|
ol.arabic {
|
||||||
|
list-style: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.loweralpha {
|
||||||
|
list-style: lower-alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.upperalpha {
|
||||||
|
list-style: upper-alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.lowerroman {
|
||||||
|
list-style: lower-roman;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.upperroman {
|
||||||
|
list-style: upper-roman;
|
||||||
|
}
|
||||||
|
|
||||||
|
:not(li) > ol > li:first-child > :first-child,
|
||||||
|
:not(li) > ul > li:first-child > :first-child {
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:not(li) > ol > li:last-child > :last-child,
|
||||||
|
:not(li) > ul > li:last-child > :last-child {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.simple ol p,
|
||||||
|
ol.simple ul p,
|
||||||
|
ul.simple ol p,
|
||||||
|
ul.simple ul p {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.simple > li:not(:first-child) > p,
|
||||||
|
ul.simple > li:not(:first-child) > p {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.simple p,
|
||||||
|
ul.simple p {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.footnote > dt,
|
||||||
|
dl.citation > dt {
|
||||||
|
float: left;
|
||||||
|
margin-right: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.footnote > dd,
|
||||||
|
dl.citation > dd {
|
||||||
|
margin-bottom: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.footnote > dd:after,
|
||||||
|
dl.citation > dd:after {
|
||||||
|
content: "";
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.field-list {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: fit-content(30%) auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.field-list > dt {
|
||||||
|
font-weight: bold;
|
||||||
|
word-break: break-word;
|
||||||
|
padding-left: 0.5em;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.field-list > dt:after {
|
||||||
|
content: ":";
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.field-list > dd {
|
||||||
|
padding-left: 0.5em;
|
||||||
|
margin-top: 0em;
|
||||||
|
margin-left: 0em;
|
||||||
|
margin-bottom: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd > :first-child {
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd ul, dd table {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
margin-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl > dd:last-child,
|
||||||
|
dl > dd:last-child > :last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt:target, span.highlighted {
|
||||||
|
background-color: #fbe54e;
|
||||||
|
}
|
||||||
|
|
||||||
|
rect.highlighted {
|
||||||
|
fill: #fbe54e;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl.glossary dt {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.optional {
|
||||||
|
font-size: 1.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-paren {
|
||||||
|
font-size: larger;
|
||||||
|
}
|
||||||
|
|
||||||
|
.versionmodified {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.system-message {
|
||||||
|
background-color: #fda;
|
||||||
|
padding: 5px;
|
||||||
|
border: 3px solid red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footnote:target {
|
||||||
|
background-color: #ffa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-block {
|
||||||
|
display: block;
|
||||||
|
margin-top: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-block .line-block {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-left: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.guilabel, .menuselection {
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accelerator {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.classifier {
|
||||||
|
font-style: oblique;
|
||||||
|
}
|
||||||
|
|
||||||
|
.classifier:before {
|
||||||
|
font-style: normal;
|
||||||
|
margin: 0.5em;
|
||||||
|
content: ":";
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr, acronym {
|
||||||
|
border-bottom: dotted 1px;
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- code displays --------------------------------------------------------- */
|
||||||
|
|
||||||
|
pre {
|
||||||
|
overflow: auto;
|
||||||
|
overflow-y: hidden; /* fixes display issues on Chrome browsers */
|
||||||
|
}
|
||||||
|
|
||||||
|
pre, div[class*="highlight-"] {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.pre {
|
||||||
|
-moz-hyphens: none;
|
||||||
|
-ms-hyphens: none;
|
||||||
|
-webkit-hyphens: none;
|
||||||
|
hyphens: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div[class*="highlight-"] {
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.linenos pre {
|
||||||
|
border: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.highlighttable {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.highlighttable tbody {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.highlighttable tr {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.highlighttable td {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.highlighttable td.linenos {
|
||||||
|
padding-right: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.highlighttable td.code {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight .hll {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.highlight pre,
|
||||||
|
table.highlighttable pre {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.code-block-caption + div {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.code-block-caption {
|
||||||
|
margin-top: 1em;
|
||||||
|
padding: 2px 5px;
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.code-block-caption code {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.highlighttable td.linenos,
|
||||||
|
span.linenos,
|
||||||
|
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.code-block-caption span.caption-number {
|
||||||
|
padding: 0.1em 0.3em;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.code-block-caption span.caption-text {
|
||||||
|
}
|
||||||
|
|
||||||
|
div.literal-block-wrapper {
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
code.descname {
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
code.descclassname {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
code.xref, a code {
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.viewcode-link {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.viewcode-back {
|
||||||
|
float: right;
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.viewcode-block:target {
|
||||||
|
margin: -1px -10px;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- math display ---------------------------------------------------------- */
|
||||||
|
|
||||||
|
img.math {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.body div.math p {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.eqno {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.eqno a.headerlink {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.math:hover a.headerlink {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -- printout stylesheet --------------------------------------------------- */
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
div.document,
|
||||||
|
div.documentwrapper,
|
||||||
|
div.bodywrapper {
|
||||||
|
margin: 0 !important;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sphinxsidebar,
|
||||||
|
div.related,
|
||||||
|
div.footer,
|
||||||
|
#top-link {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
@ -0,0 +1,117 @@
|
|||||||
|
:root {
|
||||||
|
/*****************************************************************************
|
||||||
|
* Theme config
|
||||||
|
**/
|
||||||
|
--pst-header-height: 60px;
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Font size
|
||||||
|
**/
|
||||||
|
--pst-font-size-base: 15px; /* base font size - applied at body / html level */
|
||||||
|
|
||||||
|
/* heading font sizes */
|
||||||
|
--pst-font-size-h1: 36px;
|
||||||
|
--pst-font-size-h2: 32px;
|
||||||
|
--pst-font-size-h3: 26px;
|
||||||
|
--pst-font-size-h4: 21px;
|
||||||
|
--pst-font-size-h5: 18px;
|
||||||
|
--pst-font-size-h6: 16px;
|
||||||
|
|
||||||
|
/* smaller then heading font sizes*/
|
||||||
|
--pst-font-size-milli: 12px;
|
||||||
|
|
||||||
|
--pst-sidebar-font-size: .9em;
|
||||||
|
--pst-sidebar-caption-font-size: .9em;
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Font family
|
||||||
|
**/
|
||||||
|
/* These are adapted from https://systemfontstack.com/ */
|
||||||
|
--pst-font-family-base-system: -apple-system, BlinkMacSystemFont, Segoe UI, "Helvetica Neue",
|
||||||
|
Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
|
||||||
|
--pst-font-family-monospace-system: "SFMono-Regular", Menlo, Consolas, Monaco,
|
||||||
|
Liberation Mono, Lucida Console, monospace;
|
||||||
|
|
||||||
|
--pst-font-family-base: var(--pst-font-family-base-system);
|
||||||
|
--pst-font-family-heading: var(--pst-font-family-base);
|
||||||
|
--pst-font-family-monospace: var(--pst-font-family-monospace-system);
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Color
|
||||||
|
*
|
||||||
|
* Colors are defined in rgb string way, "red, green, blue"
|
||||||
|
**/
|
||||||
|
--pst-color-primary: 19, 6, 84;
|
||||||
|
--pst-color-success: 40, 167, 69;
|
||||||
|
--pst-color-info: 0, 123, 255; /*23, 162, 184;*/
|
||||||
|
--pst-color-warning: 255, 193, 7;
|
||||||
|
--pst-color-danger: 220, 53, 69;
|
||||||
|
--pst-color-text-base: 51, 51, 51;
|
||||||
|
|
||||||
|
--pst-color-h1: var(--pst-color-primary);
|
||||||
|
--pst-color-h2: var(--pst-color-primary);
|
||||||
|
--pst-color-h3: var(--pst-color-text-base);
|
||||||
|
--pst-color-h4: var(--pst-color-text-base);
|
||||||
|
--pst-color-h5: var(--pst-color-text-base);
|
||||||
|
--pst-color-h6: var(--pst-color-text-base);
|
||||||
|
--pst-color-paragraph: var(--pst-color-text-base);
|
||||||
|
--pst-color-link: 0, 91, 129;
|
||||||
|
--pst-color-link-hover: 227, 46, 0;
|
||||||
|
--pst-color-headerlink: 198, 15, 15;
|
||||||
|
--pst-color-headerlink-hover: 255, 255, 255;
|
||||||
|
--pst-color-preformatted-text: 34, 34, 34;
|
||||||
|
--pst-color-preformatted-background: 250, 250, 250;
|
||||||
|
--pst-color-inline-code: 232, 62, 140;
|
||||||
|
|
||||||
|
--pst-color-active-navigation: 19, 6, 84;
|
||||||
|
--pst-color-navbar-link: 77, 77, 77;
|
||||||
|
--pst-color-navbar-link-hover: var(--pst-color-active-navigation);
|
||||||
|
--pst-color-navbar-link-active: var(--pst-color-active-navigation);
|
||||||
|
--pst-color-sidebar-link: 77, 77, 77;
|
||||||
|
--pst-color-sidebar-link-hover: var(--pst-color-active-navigation);
|
||||||
|
--pst-color-sidebar-link-active: var(--pst-color-active-navigation);
|
||||||
|
--pst-color-sidebar-expander-background-hover: 244, 244, 244;
|
||||||
|
--pst-color-sidebar-caption: 77, 77, 77;
|
||||||
|
--pst-color-toc-link: 119, 117, 122;
|
||||||
|
--pst-color-toc-link-hover: var(--pst-color-active-navigation);
|
||||||
|
--pst-color-toc-link-active: var(--pst-color-active-navigation);
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Icon
|
||||||
|
**/
|
||||||
|
|
||||||
|
/* font awesome icons*/
|
||||||
|
--pst-icon-check-circle: '\f058';
|
||||||
|
--pst-icon-info-circle: '\f05a';
|
||||||
|
--pst-icon-exclamation-triangle: '\f071';
|
||||||
|
--pst-icon-exclamation-circle: '\f06a';
|
||||||
|
--pst-icon-times-circle: '\f057';
|
||||||
|
--pst-icon-lightbulb: '\f0eb';
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Admonitions
|
||||||
|
**/
|
||||||
|
|
||||||
|
--pst-color-admonition-default: var(--pst-color-info);
|
||||||
|
--pst-color-admonition-note: var(--pst-color-info);
|
||||||
|
--pst-color-admonition-attention: var(--pst-color-warning);
|
||||||
|
--pst-color-admonition-caution: var(--pst-color-warning);
|
||||||
|
--pst-color-admonition-warning: var(--pst-color-warning);
|
||||||
|
--pst-color-admonition-danger: var(--pst-color-danger);
|
||||||
|
--pst-color-admonition-error: var(--pst-color-danger);
|
||||||
|
--pst-color-admonition-hint: var(--pst-color-success);
|
||||||
|
--pst-color-admonition-tip: var(--pst-color-success);
|
||||||
|
--pst-color-admonition-important: var(--pst-color-success);
|
||||||
|
|
||||||
|
--pst-icon-admonition-default: var(--pst-icon-info-circle);
|
||||||
|
--pst-icon-admonition-note: var(--pst-icon-info-circle);
|
||||||
|
--pst-icon-admonition-attention: var(--pst-icon-exclamation-circle);
|
||||||
|
--pst-icon-admonition-caution: var(--pst-icon-exclamation-triangle);
|
||||||
|
--pst-icon-admonition-warning: var(--pst-icon-exclamation-triangle);
|
||||||
|
--pst-icon-admonition-danger: var(--pst-icon-exclamation-triangle);
|
||||||
|
--pst-icon-admonition-error: var(--pst-icon-times-circle);
|
||||||
|
--pst-icon-admonition-hint: var(--pst-icon-lightbulb);
|
||||||
|
--pst-icon-admonition-tip: var(--pst-icon-lightbulb);
|
||||||
|
--pst-icon-admonition-important: var(--pst-icon-exclamation-circle);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
h1.site-logo {
|
||||||
|
font-size: 30px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.site-logo small {
|
||||||
|
font-size: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.site-logo {
|
||||||
|
font-size: 30px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.site-logo small {
|
||||||
|
font-size: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody, thead, pre {
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
table td, th {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table p {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table td code {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr,
|
||||||
|
table th {
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
box-shadow: inherit !important;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-align\:center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
@ -0,0 +1,321 @@
|
|||||||
|
/*
|
||||||
|
* doctools.js
|
||||||
|
* ~~~~~~~~~~~
|
||||||
|
*
|
||||||
|
* Sphinx JavaScript utilities for all documentation.
|
||||||
|
*
|
||||||
|
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||||
|
* :license: BSD, see LICENSE for details.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* select a different prefix for underscore
|
||||||
|
*/
|
||||||
|
$u = _.noConflict();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* make the code below compatible with browsers without
|
||||||
|
* an installed firebug like debugger
|
||||||
|
if (!window.console || !console.firebug) {
|
||||||
|
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
|
||||||
|
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
|
||||||
|
"profile", "profileEnd"];
|
||||||
|
window.console = {};
|
||||||
|
for (var i = 0; i < names.length; ++i)
|
||||||
|
window.console[names[i]] = function() {};
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* small helper function to urldecode strings
|
||||||
|
*
|
||||||
|
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
||||||
|
*/
|
||||||
|
jQuery.urldecode = function(x) {
|
||||||
|
if (!x) {
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
return decodeURIComponent(x.replace(/\+/g, ' '));
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* small helper function to urlencode strings
|
||||||
|
*/
|
||||||
|
jQuery.urlencode = encodeURIComponent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function returns the parsed url parameters of the
|
||||||
|
* current request. Multiple values per key are supported,
|
||||||
|
* it will always return arrays of strings for the value parts.
|
||||||
|
*/
|
||||||
|
jQuery.getQueryParameters = function(s) {
|
||||||
|
if (typeof s === 'undefined')
|
||||||
|
s = document.location.search;
|
||||||
|
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
||||||
|
var result = {};
|
||||||
|
for (var i = 0; i < parts.length; i++) {
|
||||||
|
var tmp = parts[i].split('=', 2);
|
||||||
|
var key = jQuery.urldecode(tmp[0]);
|
||||||
|
var value = jQuery.urldecode(tmp[1]);
|
||||||
|
if (key in result)
|
||||||
|
result[key].push(value);
|
||||||
|
else
|
||||||
|
result[key] = [value];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* highlight a given string on a jquery object by wrapping it in
|
||||||
|
* span elements with the given class name.
|
||||||
|
*/
|
||||||
|
jQuery.fn.highlightText = function(text, className) {
|
||||||
|
function highlight(node, addItems) {
|
||||||
|
if (node.nodeType === 3) {
|
||||||
|
var val = node.nodeValue;
|
||||||
|
var pos = val.toLowerCase().indexOf(text);
|
||||||
|
if (pos >= 0 &&
|
||||||
|
!jQuery(node.parentNode).hasClass(className) &&
|
||||||
|
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
||||||
|
var span;
|
||||||
|
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
||||||
|
if (isInSVG) {
|
||||||
|
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||||
|
} else {
|
||||||
|
span = document.createElement("span");
|
||||||
|
span.className = className;
|
||||||
|
}
|
||||||
|
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||||
|
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
||||||
|
document.createTextNode(val.substr(pos + text.length)),
|
||||||
|
node.nextSibling));
|
||||||
|
node.nodeValue = val.substr(0, pos);
|
||||||
|
if (isInSVG) {
|
||||||
|
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||||
|
var bbox = node.parentElement.getBBox();
|
||||||
|
rect.x.baseVal.value = bbox.x;
|
||||||
|
rect.y.baseVal.value = bbox.y;
|
||||||
|
rect.width.baseVal.value = bbox.width;
|
||||||
|
rect.height.baseVal.value = bbox.height;
|
||||||
|
rect.setAttribute('class', className);
|
||||||
|
addItems.push({
|
||||||
|
"parent": node.parentNode,
|
||||||
|
"target": rect});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!jQuery(node).is("button, select, textarea")) {
|
||||||
|
jQuery.each(node.childNodes, function() {
|
||||||
|
highlight(this, addItems);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var addItems = [];
|
||||||
|
var result = this.each(function() {
|
||||||
|
highlight(this, addItems);
|
||||||
|
});
|
||||||
|
for (var i = 0; i < addItems.length; ++i) {
|
||||||
|
jQuery(addItems[i].parent).before(addItems[i].target);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* backward compatibility for jQuery.browser
|
||||||
|
* This will be supported until firefox bug is fixed.
|
||||||
|
*/
|
||||||
|
if (!jQuery.browser) {
|
||||||
|
jQuery.uaMatch = function(ua) {
|
||||||
|
ua = ua.toLowerCase();
|
||||||
|
|
||||||
|
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||||
|
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
||||||
|
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||||
|
/(msie) ([\w.]+)/.exec(ua) ||
|
||||||
|
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||||
|
[];
|
||||||
|
|
||||||
|
return {
|
||||||
|
browser: match[ 1 ] || "",
|
||||||
|
version: match[ 2 ] || "0"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
jQuery.browser = {};
|
||||||
|
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Small JavaScript module for the documentation.
|
||||||
|
*/
|
||||||
|
var Documentation = {
|
||||||
|
|
||||||
|
init : function() {
|
||||||
|
this.fixFirefoxAnchorBug();
|
||||||
|
this.highlightSearchWords();
|
||||||
|
this.initIndexTable();
|
||||||
|
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
|
||||||
|
this.initOnKeyListeners();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* i18n support
|
||||||
|
*/
|
||||||
|
TRANSLATIONS : {},
|
||||||
|
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
|
||||||
|
LOCALE : 'unknown',
|
||||||
|
|
||||||
|
// gettext and ngettext don't access this so that the functions
|
||||||
|
// can safely bound to a different name (_ = Documentation.gettext)
|
||||||
|
gettext : function(string) {
|
||||||
|
var translated = Documentation.TRANSLATIONS[string];
|
||||||
|
if (typeof translated === 'undefined')
|
||||||
|
return string;
|
||||||
|
return (typeof translated === 'string') ? translated : translated[0];
|
||||||
|
},
|
||||||
|
|
||||||
|
ngettext : function(singular, plural, n) {
|
||||||
|
var translated = Documentation.TRANSLATIONS[singular];
|
||||||
|
if (typeof translated === 'undefined')
|
||||||
|
return (n == 1) ? singular : plural;
|
||||||
|
return translated[Documentation.PLURALEXPR(n)];
|
||||||
|
},
|
||||||
|
|
||||||
|
addTranslations : function(catalog) {
|
||||||
|
for (var key in catalog.messages)
|
||||||
|
this.TRANSLATIONS[key] = catalog.messages[key];
|
||||||
|
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
|
||||||
|
this.LOCALE = catalog.locale;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add context elements like header anchor links
|
||||||
|
*/
|
||||||
|
addContextElements : function() {
|
||||||
|
$('div[id] > :header:first').each(function() {
|
||||||
|
$('<a class="headerlink">\u00B6</a>').
|
||||||
|
attr('href', '#' + this.id).
|
||||||
|
attr('title', _('Permalink to this headline')).
|
||||||
|
appendTo(this);
|
||||||
|
});
|
||||||
|
$('dt[id]').each(function() {
|
||||||
|
$('<a class="headerlink">\u00B6</a>').
|
||||||
|
attr('href', '#' + this.id).
|
||||||
|
attr('title', _('Permalink to this definition')).
|
||||||
|
appendTo(this);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* workaround a firefox stupidity
|
||||||
|
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
|
||||||
|
*/
|
||||||
|
fixFirefoxAnchorBug : function() {
|
||||||
|
if (document.location.hash && $.browser.mozilla)
|
||||||
|
window.setTimeout(function() {
|
||||||
|
document.location.href += '';
|
||||||
|
}, 10);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* highlight the search words provided in the url in the text
|
||||||
|
*/
|
||||||
|
highlightSearchWords : function() {
|
||||||
|
var params = $.getQueryParameters();
|
||||||
|
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
||||||
|
if (terms.length) {
|
||||||
|
var body = $('div.body');
|
||||||
|
if (!body.length) {
|
||||||
|
body = $('body');
|
||||||
|
}
|
||||||
|
window.setTimeout(function() {
|
||||||
|
$.each(terms, function() {
|
||||||
|
body.highlightText(this.toLowerCase(), 'highlighted');
|
||||||
|
});
|
||||||
|
}, 10);
|
||||||
|
$('<p class="highlight-link"><a href="javascript:Documentation.' +
|
||||||
|
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
|
||||||
|
.appendTo($('#searchbox'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* init the domain index toggle buttons
|
||||||
|
*/
|
||||||
|
initIndexTable : function() {
|
||||||
|
var togglers = $('img.toggler').click(function() {
|
||||||
|
var src = $(this).attr('src');
|
||||||
|
var idnum = $(this).attr('id').substr(7);
|
||||||
|
$('tr.cg-' + idnum).toggle();
|
||||||
|
if (src.substr(-9) === 'minus.png')
|
||||||
|
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
|
||||||
|
else
|
||||||
|
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
|
||||||
|
}).css('display', '');
|
||||||
|
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
|
||||||
|
togglers.click();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* helper function to hide the search marks again
|
||||||
|
*/
|
||||||
|
hideSearchWords : function() {
|
||||||
|
$('#searchbox .highlight-link').fadeOut(300);
|
||||||
|
$('span.highlighted').removeClass('highlighted');
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* make the url absolute
|
||||||
|
*/
|
||||||
|
makeURL : function(relativeURL) {
|
||||||
|
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get the current relative url
|
||||||
|
*/
|
||||||
|
getCurrentURL : function() {
|
||||||
|
var path = document.location.pathname;
|
||||||
|
var parts = path.split(/\//);
|
||||||
|
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
|
||||||
|
if (this === '..')
|
||||||
|
parts.pop();
|
||||||
|
});
|
||||||
|
var url = parts.join('/');
|
||||||
|
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
|
||||||
|
},
|
||||||
|
|
||||||
|
initOnKeyListeners: function() {
|
||||||
|
$(document).keydown(function(event) {
|
||||||
|
var activeElementType = document.activeElement.tagName;
|
||||||
|
// don't navigate when in search box, textarea, dropdown or button
|
||||||
|
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
|
||||||
|
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
|
||||||
|
&& !event.shiftKey) {
|
||||||
|
switch (event.keyCode) {
|
||||||
|
case 37: // left
|
||||||
|
var prevHref = $('link[rel="prev"]').prop('href');
|
||||||
|
if (prevHref) {
|
||||||
|
window.location.href = prevHref;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
case 39: // right
|
||||||
|
var nextHref = $('link[rel="next"]').prop('href');
|
||||||
|
if (nextHref) {
|
||||||
|
window.location.href = nextHref;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// quick alias for translations
|
||||||
|
_ = Documentation.gettext;
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
Documentation.init();
|
||||||
|
});
|
@ -0,0 +1,12 @@
|
|||||||
|
var DOCUMENTATION_OPTIONS = {
|
||||||
|
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||||
|
VERSION: '0.2',
|
||||||
|
LANGUAGE: 'None',
|
||||||
|
COLLAPSE_INDEX: false,
|
||||||
|
BUILDER: 'dirhtml',
|
||||||
|
FILE_SUFFIX: '.html',
|
||||||
|
LINK_SUFFIX: '.html',
|
||||||
|
HAS_SOURCE: true,
|
||||||
|
SOURCELINK_SUFFIX: '.txt',
|
||||||
|
NAVIGATION_WITH_KEYS: true
|
||||||
|
};
|
After Width: | Height: | Size: 286 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,297 @@
|
|||||||
|
/*
|
||||||
|
* language_data.js
|
||||||
|
* ~~~~~~~~~~~~~~~~
|
||||||
|
*
|
||||||
|
* This script contains the language-specific data used by searchtools.js,
|
||||||
|
* namely the list of stopwords, stemmer, scorer and splitter.
|
||||||
|
*
|
||||||
|
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||||
|
* :license: BSD, see LICENSE for details.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
|
||||||
|
|
||||||
|
|
||||||
|
/* Non-minified version is copied as a separate JS file, is available */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Porter Stemmer
|
||||||
|
*/
|
||||||
|
var Stemmer = function() {
|
||||||
|
|
||||||
|
var step2list = {
|
||||||
|
ational: 'ate',
|
||||||
|
tional: 'tion',
|
||||||
|
enci: 'ence',
|
||||||
|
anci: 'ance',
|
||||||
|
izer: 'ize',
|
||||||
|
bli: 'ble',
|
||||||
|
alli: 'al',
|
||||||
|
entli: 'ent',
|
||||||
|
eli: 'e',
|
||||||
|
ousli: 'ous',
|
||||||
|
ization: 'ize',
|
||||||
|
ation: 'ate',
|
||||||
|
ator: 'ate',
|
||||||
|
alism: 'al',
|
||||||
|
iveness: 'ive',
|
||||||
|
fulness: 'ful',
|
||||||
|
ousness: 'ous',
|
||||||
|
aliti: 'al',
|
||||||
|
iviti: 'ive',
|
||||||
|
biliti: 'ble',
|
||||||
|
logi: 'log'
|
||||||
|
};
|
||||||
|
|
||||||
|
var step3list = {
|
||||||
|
icate: 'ic',
|
||||||
|
ative: '',
|
||||||
|
alize: 'al',
|
||||||
|
iciti: 'ic',
|
||||||
|
ical: 'ic',
|
||||||
|
ful: '',
|
||||||
|
ness: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
var c = "[^aeiou]"; // consonant
|
||||||
|
var v = "[aeiouy]"; // vowel
|
||||||
|
var C = c + "[^aeiouy]*"; // consonant sequence
|
||||||
|
var V = v + "[aeiou]*"; // vowel sequence
|
||||||
|
|
||||||
|
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
|
||||||
|
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
|
||||||
|
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
|
||||||
|
var s_v = "^(" + C + ")?" + v; // vowel in stem
|
||||||
|
|
||||||
|
this.stemWord = function (w) {
|
||||||
|
var stem;
|
||||||
|
var suffix;
|
||||||
|
var firstch;
|
||||||
|
var origword = w;
|
||||||
|
|
||||||
|
if (w.length < 3)
|
||||||
|
return w;
|
||||||
|
|
||||||
|
var re;
|
||||||
|
var re2;
|
||||||
|
var re3;
|
||||||
|
var re4;
|
||||||
|
|
||||||
|
firstch = w.substr(0,1);
|
||||||
|
if (firstch == "y")
|
||||||
|
w = firstch.toUpperCase() + w.substr(1);
|
||||||
|
|
||||||
|
// Step 1a
|
||||||
|
re = /^(.+?)(ss|i)es$/;
|
||||||
|
re2 = /^(.+?)([^s])s$/;
|
||||||
|
|
||||||
|
if (re.test(w))
|
||||||
|
w = w.replace(re,"$1$2");
|
||||||
|
else if (re2.test(w))
|
||||||
|
w = w.replace(re2,"$1$2");
|
||||||
|
|
||||||
|
// Step 1b
|
||||||
|
re = /^(.+?)eed$/;
|
||||||
|
re2 = /^(.+?)(ed|ing)$/;
|
||||||
|
if (re.test(w)) {
|
||||||
|
var fp = re.exec(w);
|
||||||
|
re = new RegExp(mgr0);
|
||||||
|
if (re.test(fp[1])) {
|
||||||
|
re = /.$/;
|
||||||
|
w = w.replace(re,"");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (re2.test(w)) {
|
||||||
|
var fp = re2.exec(w);
|
||||||
|
stem = fp[1];
|
||||||
|
re2 = new RegExp(s_v);
|
||||||
|
if (re2.test(stem)) {
|
||||||
|
w = stem;
|
||||||
|
re2 = /(at|bl|iz)$/;
|
||||||
|
re3 = new RegExp("([^aeiouylsz])\\1$");
|
||||||
|
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
||||||
|
if (re2.test(w))
|
||||||
|
w = w + "e";
|
||||||
|
else if (re3.test(w)) {
|
||||||
|
re = /.$/;
|
||||||
|
w = w.replace(re,"");
|
||||||
|
}
|
||||||
|
else if (re4.test(w))
|
||||||
|
w = w + "e";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 1c
|
||||||
|
re = /^(.+?)y$/;
|
||||||
|
if (re.test(w)) {
|
||||||
|
var fp = re.exec(w);
|
||||||
|
stem = fp[1];
|
||||||
|
re = new RegExp(s_v);
|
||||||
|
if (re.test(stem))
|
||||||
|
w = stem + "i";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 2
|
||||||
|
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
|
||||||
|
if (re.test(w)) {
|
||||||
|
var fp = re.exec(w);
|
||||||
|
stem = fp[1];
|
||||||
|
suffix = fp[2];
|
||||||
|
re = new RegExp(mgr0);
|
||||||
|
if (re.test(stem))
|
||||||
|
w = stem + step2list[suffix];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 3
|
||||||
|
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
|
||||||
|
if (re.test(w)) {
|
||||||
|
var fp = re.exec(w);
|
||||||
|
stem = fp[1];
|
||||||
|
suffix = fp[2];
|
||||||
|
re = new RegExp(mgr0);
|
||||||
|
if (re.test(stem))
|
||||||
|
w = stem + step3list[suffix];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 4
|
||||||
|
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
|
||||||
|
re2 = /^(.+?)(s|t)(ion)$/;
|
||||||
|
if (re.test(w)) {
|
||||||
|
var fp = re.exec(w);
|
||||||
|
stem = fp[1];
|
||||||
|
re = new RegExp(mgr1);
|
||||||
|
if (re.test(stem))
|
||||||
|
w = stem;
|
||||||
|
}
|
||||||
|
else if (re2.test(w)) {
|
||||||
|
var fp = re2.exec(w);
|
||||||
|
stem = fp[1] + fp[2];
|
||||||
|
re2 = new RegExp(mgr1);
|
||||||
|
if (re2.test(stem))
|
||||||
|
w = stem;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 5
|
||||||
|
re = /^(.+?)e$/;
|
||||||
|
if (re.test(w)) {
|
||||||
|
var fp = re.exec(w);
|
||||||
|
stem = fp[1];
|
||||||
|
re = new RegExp(mgr1);
|
||||||
|
re2 = new RegExp(meq1);
|
||||||
|
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
||||||
|
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
|
||||||
|
w = stem;
|
||||||
|
}
|
||||||
|
re = /ll$/;
|
||||||
|
re2 = new RegExp(mgr1);
|
||||||
|
if (re.test(w) && re2.test(w)) {
|
||||||
|
re = /.$/;
|
||||||
|
w = w.replace(re,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
// and turn initial Y back to y
|
||||||
|
if (firstch == "y")
|
||||||
|
w = firstch.toLowerCase() + w.substr(1);
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var splitChars = (function() {
|
||||||
|
var result = {};
|
||||||
|
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
|
||||||
|
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
|
||||||
|
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
|
||||||
|
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
|
||||||
|
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
|
||||||
|
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
|
||||||
|
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
|
||||||
|
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
|
||||||
|
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
|
||||||
|
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
|
||||||
|
var i, j, start, end;
|
||||||
|
for (i = 0; i < singles.length; i++) {
|
||||||
|
result[singles[i]] = true;
|
||||||
|
}
|
||||||
|
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
|
||||||
|
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
|
||||||
|
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
|
||||||
|
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
|
||||||
|
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
|
||||||
|
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
|
||||||
|
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
|
||||||
|
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
|
||||||
|
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
|
||||||
|
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
|
||||||
|
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
|
||||||
|
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
|
||||||
|
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
|
||||||
|
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
|
||||||
|
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
|
||||||
|
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
|
||||||
|
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
|
||||||
|
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
|
||||||
|
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
|
||||||
|
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
|
||||||
|
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
|
||||||
|
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
|
||||||
|
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
|
||||||
|
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
|
||||||
|
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
|
||||||
|
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
|
||||||
|
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
|
||||||
|
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
|
||||||
|
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
|
||||||
|
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
|
||||||
|
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
|
||||||
|
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
|
||||||
|
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
|
||||||
|
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
|
||||||
|
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
|
||||||
|
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
|
||||||
|
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
|
||||||
|
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
|
||||||
|
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
|
||||||
|
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
|
||||||
|
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
|
||||||
|
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
|
||||||
|
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
|
||||||
|
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
|
||||||
|
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
|
||||||
|
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
|
||||||
|
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
|
||||||
|
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
|
||||||
|
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
|
||||||
|
for (i = 0; i < ranges.length; i++) {
|
||||||
|
start = ranges[i][0];
|
||||||
|
end = ranges[i][1];
|
||||||
|
for (j = start; j <= end; j++) {
|
||||||
|
result[j] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
})();
|
||||||
|
|
||||||
|
function splitQuery(query) {
|
||||||
|
var result = [];
|
||||||
|
var start = -1;
|
||||||
|
for (var i = 0; i < query.length; i++) {
|
||||||
|
if (splitChars[query.charCodeAt(i)]) {
|
||||||
|
if (start !== -1) {
|
||||||
|
result.push(query.slice(start, i));
|
||||||
|
start = -1;
|
||||||
|
}
|
||||||
|
} else if (start === -1) {
|
||||||
|
start = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (start !== -1) {
|
||||||
|
result.push(query.slice(start));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
After Width: | Height: | Size: 90 B |
After Width: | Height: | Size: 90 B |
@ -0,0 +1,82 @@
|
|||||||
|
pre { line-height: 125%; }
|
||||||
|
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
|
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
|
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
|
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
|
.highlight .hll { background-color: #ffffcc }
|
||||||
|
.highlight { background: #f8f8f8; }
|
||||||
|
.highlight .c { color: #8f5902; font-style: italic } /* Comment */
|
||||||
|
.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
|
||||||
|
.highlight .g { color: #000000 } /* Generic */
|
||||||
|
.highlight .k { color: #204a87; font-weight: bold } /* Keyword */
|
||||||
|
.highlight .l { color: #000000 } /* Literal */
|
||||||
|
.highlight .n { color: #000000 } /* Name */
|
||||||
|
.highlight .o { color: #ce5c00; font-weight: bold } /* Operator */
|
||||||
|
.highlight .x { color: #000000 } /* Other */
|
||||||
|
.highlight .p { color: #000000; font-weight: bold } /* Punctuation */
|
||||||
|
.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */
|
||||||
|
.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
|
||||||
|
.highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */
|
||||||
|
.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */
|
||||||
|
.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
|
||||||
|
.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
|
||||||
|
.highlight .gd { color: #a40000 } /* Generic.Deleted */
|
||||||
|
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
|
||||||
|
.highlight .gr { color: #ef2929 } /* Generic.Error */
|
||||||
|
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||||
|
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
||||||
|
.highlight .go { color: #000000; font-style: italic } /* Generic.Output */
|
||||||
|
.highlight .gp { color: #8f5902 } /* Generic.Prompt */
|
||||||
|
.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */
|
||||||
|
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||||
|
.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
|
||||||
|
.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */
|
||||||
|
.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */
|
||||||
|
.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */
|
||||||
|
.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */
|
||||||
|
.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */
|
||||||
|
.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */
|
||||||
|
.highlight .ld { color: #000000 } /* Literal.Date */
|
||||||
|
.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */
|
||||||
|
.highlight .s { color: #4e9a06 } /* Literal.String */
|
||||||
|
.highlight .na { color: #c4a000 } /* Name.Attribute */
|
||||||
|
.highlight .nb { color: #204a87 } /* Name.Builtin */
|
||||||
|
.highlight .nc { color: #000000 } /* Name.Class */
|
||||||
|
.highlight .no { color: #000000 } /* Name.Constant */
|
||||||
|
.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */
|
||||||
|
.highlight .ni { color: #ce5c00 } /* Name.Entity */
|
||||||
|
.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
|
||||||
|
.highlight .nf { color: #000000 } /* Name.Function */
|
||||||
|
.highlight .nl { color: #f57900 } /* Name.Label */
|
||||||
|
.highlight .nn { color: #000000 } /* Name.Namespace */
|
||||||
|
.highlight .nx { color: #000000 } /* Name.Other */
|
||||||
|
.highlight .py { color: #000000 } /* Name.Property */
|
||||||
|
.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */
|
||||||
|
.highlight .nv { color: #000000 } /* Name.Variable */
|
||||||
|
.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */
|
||||||
|
.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
|
||||||
|
.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */
|
||||||
|
.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */
|
||||||
|
.highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */
|
||||||
|
.highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */
|
||||||
|
.highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */
|
||||||
|
.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */
|
||||||
|
.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */
|
||||||
|
.highlight .sc { color: #4e9a06 } /* Literal.String.Char */
|
||||||
|
.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */
|
||||||
|
.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
|
||||||
|
.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */
|
||||||
|
.highlight .se { color: #4e9a06 } /* Literal.String.Escape */
|
||||||
|
.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */
|
||||||
|
.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */
|
||||||
|
.highlight .sx { color: #4e9a06 } /* Literal.String.Other */
|
||||||
|
.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */
|
||||||
|
.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */
|
||||||
|
.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */
|
||||||
|
.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
|
||||||
|
.highlight .fm { color: #000000 } /* Name.Function.Magic */
|
||||||
|
.highlight .vc { color: #000000 } /* Name.Variable.Class */
|
||||||
|
.highlight .vg { color: #000000 } /* Name.Variable.Global */
|
||||||
|
.highlight .vi { color: #000000 } /* Name.Variable.Instance */
|
||||||
|
.highlight .vm { color: #000000 } /* Name.Variable.Magic */
|
||||||
|
.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */
|
@ -0,0 +1,522 @@
|
|||||||
|
/*
|
||||||
|
* searchtools.js
|
||||||
|
* ~~~~~~~~~~~~~~~~
|
||||||
|
*
|
||||||
|
* Sphinx JavaScript utilities for the full-text search.
|
||||||
|
*
|
||||||
|
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||||
|
* :license: BSD, see LICENSE for details.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!Scorer) {
|
||||||
|
/**
|
||||||
|
* Simple result scoring code.
|
||||||
|
*/
|
||||||
|
var Scorer = {
|
||||||
|
// Implement the following function to further tweak the score for each result
|
||||||
|
// The function takes a result array [filename, title, anchor, descr, score]
|
||||||
|
// and returns the new score.
|
||||||
|
/*
|
||||||
|
score: function(result) {
|
||||||
|
return result[4];
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
|
||||||
|
// query matches the full name of an object
|
||||||
|
objNameMatch: 11,
|
||||||
|
// or matches in the last dotted part of the object name
|
||||||
|
objPartialMatch: 6,
|
||||||
|
// Additive scores depending on the priority of the object
|
||||||
|
objPrio: {0: 15, // used to be importantResults
|
||||||
|
1: 5, // used to be objectResults
|
||||||
|
2: -5}, // used to be unimportantResults
|
||||||
|
// Used when the priority is not in the mapping.
|
||||||
|
objPrioDefault: 0,
|
||||||
|
|
||||||
|
// query found in title
|
||||||
|
title: 15,
|
||||||
|
partialTitle: 7,
|
||||||
|
// query found in terms
|
||||||
|
term: 5,
|
||||||
|
partialTerm: 2
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!splitQuery) {
|
||||||
|
function splitQuery(query) {
|
||||||
|
return query.split(/\s+/);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Search Module
|
||||||
|
*/
|
||||||
|
var Search = {
|
||||||
|
|
||||||
|
_index : null,
|
||||||
|
_queued_query : null,
|
||||||
|
_pulse_status : -1,
|
||||||
|
|
||||||
|
htmlToText : function(htmlString) {
|
||||||
|
var virtualDocument = document.implementation.createHTMLDocument('virtual');
|
||||||
|
var htmlElement = $(htmlString, virtualDocument);
|
||||||
|
htmlElement.find('.headerlink').remove();
|
||||||
|
docContent = htmlElement.find('[role=main]')[0];
|
||||||
|
if(docContent === undefined) {
|
||||||
|
console.warn("Content block not found. Sphinx search tries to obtain it " +
|
||||||
|
"via '[role=main]'. Could you check your theme or template.");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return docContent.textContent || docContent.innerText;
|
||||||
|
},
|
||||||
|
|
||||||
|
init : function() {
|
||||||
|
var params = $.getQueryParameters();
|
||||||
|
if (params.q) {
|
||||||
|
var query = params.q[0];
|
||||||
|
$('input[name="q"]')[0].value = query;
|
||||||
|
this.performSearch(query);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
loadIndex : function(url) {
|
||||||
|
$.ajax({type: "GET", url: url, data: null,
|
||||||
|
dataType: "script", cache: true,
|
||||||
|
complete: function(jqxhr, textstatus) {
|
||||||
|
if (textstatus != "success") {
|
||||||
|
document.getElementById("searchindexloader").src = url;
|
||||||
|
}
|
||||||
|
}});
|
||||||
|
},
|
||||||
|
|
||||||
|
setIndex : function(index) {
|
||||||
|
var q;
|
||||||
|
this._index = index;
|
||||||
|
if ((q = this._queued_query) !== null) {
|
||||||
|
this._queued_query = null;
|
||||||
|
Search.query(q);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
hasIndex : function() {
|
||||||
|
return this._index !== null;
|
||||||
|
},
|
||||||
|
|
||||||
|
deferQuery : function(query) {
|
||||||
|
this._queued_query = query;
|
||||||
|
},
|
||||||
|
|
||||||
|
stopPulse : function() {
|
||||||
|
this._pulse_status = 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
startPulse : function() {
|
||||||
|
if (this._pulse_status >= 0)
|
||||||
|
return;
|
||||||
|
function pulse() {
|
||||||
|
var i;
|
||||||
|
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
||||||
|
var dotString = '';
|
||||||
|
for (i = 0; i < Search._pulse_status; i++)
|
||||||
|
dotString += '.';
|
||||||
|
Search.dots.text(dotString);
|
||||||
|
if (Search._pulse_status > -1)
|
||||||
|
window.setTimeout(pulse, 500);
|
||||||
|
}
|
||||||
|
pulse();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* perform a search for something (or wait until index is loaded)
|
||||||
|
*/
|
||||||
|
performSearch : function(query) {
|
||||||
|
// create the required interface elements
|
||||||
|
this.out = $('#search-results');
|
||||||
|
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
|
||||||
|
this.dots = $('<span></span>').appendTo(this.title);
|
||||||
|
this.status = $('<p class="search-summary"> </p>').appendTo(this.out);
|
||||||
|
this.output = $('<ul class="search"/>').appendTo(this.out);
|
||||||
|
|
||||||
|
$('#search-progress').text(_('Preparing search...'));
|
||||||
|
this.startPulse();
|
||||||
|
|
||||||
|
// index already loaded, the browser was quick!
|
||||||
|
if (this.hasIndex())
|
||||||
|
this.query(query);
|
||||||
|
else
|
||||||
|
this.deferQuery(query);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* execute search (requires search index to be loaded)
|
||||||
|
*/
|
||||||
|
query : function(query) {
|
||||||
|
var i;
|
||||||
|
|
||||||
|
// stem the searchterms and add them to the correct list
|
||||||
|
var stemmer = new Stemmer();
|
||||||
|
var searchterms = [];
|
||||||
|
var excluded = [];
|
||||||
|
var hlterms = [];
|
||||||
|
var tmp = splitQuery(query);
|
||||||
|
var objectterms = [];
|
||||||
|
for (i = 0; i < tmp.length; i++) {
|
||||||
|
if (tmp[i] !== "") {
|
||||||
|
objectterms.push(tmp[i].toLowerCase());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
|
||||||
|
// skip this "word"
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// stem the word
|
||||||
|
var word = stemmer.stemWord(tmp[i].toLowerCase());
|
||||||
|
// prevent stemmer from cutting word smaller than two chars
|
||||||
|
if(word.length < 3 && tmp[i].length >= 3) {
|
||||||
|
word = tmp[i];
|
||||||
|
}
|
||||||
|
var toAppend;
|
||||||
|
// select the correct list
|
||||||
|
if (word[0] == '-') {
|
||||||
|
toAppend = excluded;
|
||||||
|
word = word.substr(1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
toAppend = searchterms;
|
||||||
|
hlterms.push(tmp[i].toLowerCase());
|
||||||
|
}
|
||||||
|
// only add if not already in the list
|
||||||
|
if (!$u.contains(toAppend, word))
|
||||||
|
toAppend.push(word);
|
||||||
|
}
|
||||||
|
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
|
||||||
|
|
||||||
|
// console.debug('SEARCH: searching for:');
|
||||||
|
// console.info('required: ', searchterms);
|
||||||
|
// console.info('excluded: ', excluded);
|
||||||
|
|
||||||
|
// prepare search
|
||||||
|
var terms = this._index.terms;
|
||||||
|
var titleterms = this._index.titleterms;
|
||||||
|
|
||||||
|
// array of [filename, title, anchor, descr, score]
|
||||||
|
var results = [];
|
||||||
|
$('#search-progress').empty();
|
||||||
|
|
||||||
|
// lookup as object
|
||||||
|
for (i = 0; i < objectterms.length; i++) {
|
||||||
|
var others = [].concat(objectterms.slice(0, i),
|
||||||
|
objectterms.slice(i+1, objectterms.length));
|
||||||
|
results = results.concat(this.performObjectSearch(objectterms[i], others));
|
||||||
|
}
|
||||||
|
|
||||||
|
// lookup as search terms in fulltext
|
||||||
|
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
|
||||||
|
|
||||||
|
// let the scorer override scores with a custom scoring function
|
||||||
|
if (Scorer.score) {
|
||||||
|
for (i = 0; i < results.length; i++)
|
||||||
|
results[i][4] = Scorer.score(results[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// now sort the results by score (in opposite order of appearance, since the
|
||||||
|
// display function below uses pop() to retrieve items) and then
|
||||||
|
// alphabetically
|
||||||
|
results.sort(function(a, b) {
|
||||||
|
var left = a[4];
|
||||||
|
var right = b[4];
|
||||||
|
if (left > right) {
|
||||||
|
return 1;
|
||||||
|
} else if (left < right) {
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
// same score: sort alphabetically
|
||||||
|
left = a[1].toLowerCase();
|
||||||
|
right = b[1].toLowerCase();
|
||||||
|
return (left > right) ? -1 : ((left < right) ? 1 : 0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// for debugging
|
||||||
|
//Search.lastresults = results.slice(); // a copy
|
||||||
|
//console.info('search results:', Search.lastresults);
|
||||||
|
|
||||||
|
// print the results
|
||||||
|
var resultCount = results.length;
|
||||||
|
function displayNextItem() {
|
||||||
|
// results left, load the summary and display it
|
||||||
|
if (results.length) {
|
||||||
|
var item = results.pop();
|
||||||
|
var listItem = $('<li></li>');
|
||||||
|
var requestUrl = "";
|
||||||
|
var linkUrl = "";
|
||||||
|
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
|
||||||
|
// dirhtml builder
|
||||||
|
var dirname = item[0] + '/';
|
||||||
|
if (dirname.match(/\/index\/$/)) {
|
||||||
|
dirname = dirname.substring(0, dirname.length-6);
|
||||||
|
} else if (dirname == 'index/') {
|
||||||
|
dirname = '';
|
||||||
|
}
|
||||||
|
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
|
||||||
|
linkUrl = requestUrl;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// normal html builders
|
||||||
|
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
|
||||||
|
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
|
||||||
|
}
|
||||||
|
listItem.append($('<a/>').attr('href',
|
||||||
|
linkUrl +
|
||||||
|
highlightstring + item[2]).html(item[1]));
|
||||||
|
if (item[3]) {
|
||||||
|
listItem.append($('<span> (' + item[3] + ')</span>'));
|
||||||
|
Search.output.append(listItem);
|
||||||
|
setTimeout(function() {
|
||||||
|
displayNextItem();
|
||||||
|
}, 5);
|
||||||
|
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
||||||
|
$.ajax({url: requestUrl,
|
||||||
|
dataType: "text",
|
||||||
|
complete: function(jqxhr, textstatus) {
|
||||||
|
var data = jqxhr.responseText;
|
||||||
|
if (data !== '' && data !== undefined) {
|
||||||
|
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
|
||||||
|
}
|
||||||
|
Search.output.append(listItem);
|
||||||
|
setTimeout(function() {
|
||||||
|
displayNextItem();
|
||||||
|
}, 5);
|
||||||
|
}});
|
||||||
|
} else {
|
||||||
|
// no source available, just display title
|
||||||
|
Search.output.append(listItem);
|
||||||
|
setTimeout(function() {
|
||||||
|
displayNextItem();
|
||||||
|
}, 5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// search finished, update title and status message
|
||||||
|
else {
|
||||||
|
Search.stopPulse();
|
||||||
|
Search.title.text(_('Search Results'));
|
||||||
|
if (!resultCount)
|
||||||
|
Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
|
||||||
|
else
|
||||||
|
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
|
||||||
|
Search.status.fadeIn(500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
displayNextItem();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* search for object names
|
||||||
|
*/
|
||||||
|
performObjectSearch : function(object, otherterms) {
|
||||||
|
var filenames = this._index.filenames;
|
||||||
|
var docnames = this._index.docnames;
|
||||||
|
var objects = this._index.objects;
|
||||||
|
var objnames = this._index.objnames;
|
||||||
|
var titles = this._index.titles;
|
||||||
|
|
||||||
|
var i;
|
||||||
|
var results = [];
|
||||||
|
|
||||||
|
for (var prefix in objects) {
|
||||||
|
for (var name in objects[prefix]) {
|
||||||
|
var fullname = (prefix ? prefix + '.' : '') + name;
|
||||||
|
var fullnameLower = fullname.toLowerCase()
|
||||||
|
if (fullnameLower.indexOf(object) > -1) {
|
||||||
|
var score = 0;
|
||||||
|
var parts = fullnameLower.split('.');
|
||||||
|
// check for different match types: exact matches of full name or
|
||||||
|
// "last name" (i.e. last dotted part)
|
||||||
|
if (fullnameLower == object || parts[parts.length - 1] == object) {
|
||||||
|
score += Scorer.objNameMatch;
|
||||||
|
// matches in last name
|
||||||
|
} else if (parts[parts.length - 1].indexOf(object) > -1) {
|
||||||
|
score += Scorer.objPartialMatch;
|
||||||
|
}
|
||||||
|
var match = objects[prefix][name];
|
||||||
|
var objname = objnames[match[1]][2];
|
||||||
|
var title = titles[match[0]];
|
||||||
|
// If more than one term searched for, we require other words to be
|
||||||
|
// found in the name/title/description
|
||||||
|
if (otherterms.length > 0) {
|
||||||
|
var haystack = (prefix + ' ' + name + ' ' +
|
||||||
|
objname + ' ' + title).toLowerCase();
|
||||||
|
var allfound = true;
|
||||||
|
for (i = 0; i < otherterms.length; i++) {
|
||||||
|
if (haystack.indexOf(otherterms[i]) == -1) {
|
||||||
|
allfound = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!allfound) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var descr = objname + _(', in ') + title;
|
||||||
|
|
||||||
|
var anchor = match[3];
|
||||||
|
if (anchor === '')
|
||||||
|
anchor = fullname;
|
||||||
|
else if (anchor == '-')
|
||||||
|
anchor = objnames[match[1]][1] + '-' + fullname;
|
||||||
|
// add custom score for some objects according to scorer
|
||||||
|
if (Scorer.objPrio.hasOwnProperty(match[2])) {
|
||||||
|
score += Scorer.objPrio[match[2]];
|
||||||
|
} else {
|
||||||
|
score += Scorer.objPrioDefault;
|
||||||
|
}
|
||||||
|
results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
|
||||||
|
*/
|
||||||
|
escapeRegExp : function(string) {
|
||||||
|
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* search for full-text terms in the index
|
||||||
|
*/
|
||||||
|
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
|
||||||
|
var docnames = this._index.docnames;
|
||||||
|
var filenames = this._index.filenames;
|
||||||
|
var titles = this._index.titles;
|
||||||
|
|
||||||
|
var i, j, file;
|
||||||
|
var fileMap = {};
|
||||||
|
var scoreMap = {};
|
||||||
|
var results = [];
|
||||||
|
|
||||||
|
// perform the search on the required terms
|
||||||
|
for (i = 0; i < searchterms.length; i++) {
|
||||||
|
var word = searchterms[i];
|
||||||
|
var files = [];
|
||||||
|
var _o = [
|
||||||
|
{files: terms[word], score: Scorer.term},
|
||||||
|
{files: titleterms[word], score: Scorer.title}
|
||||||
|
];
|
||||||
|
// add support for partial matches
|
||||||
|
if (word.length > 2) {
|
||||||
|
var word_regex = this.escapeRegExp(word);
|
||||||
|
for (var w in terms) {
|
||||||
|
if (w.match(word_regex) && !terms[word]) {
|
||||||
|
_o.push({files: terms[w], score: Scorer.partialTerm})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (var w in titleterms) {
|
||||||
|
if (w.match(word_regex) && !titleterms[word]) {
|
||||||
|
_o.push({files: titleterms[w], score: Scorer.partialTitle})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// no match but word was a required one
|
||||||
|
if ($u.every(_o, function(o){return o.files === undefined;})) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// found search word in contents
|
||||||
|
$u.each(_o, function(o) {
|
||||||
|
var _files = o.files;
|
||||||
|
if (_files === undefined)
|
||||||
|
return
|
||||||
|
|
||||||
|
if (_files.length === undefined)
|
||||||
|
_files = [_files];
|
||||||
|
files = files.concat(_files);
|
||||||
|
|
||||||
|
// set score for the word in each file to Scorer.term
|
||||||
|
for (j = 0; j < _files.length; j++) {
|
||||||
|
file = _files[j];
|
||||||
|
if (!(file in scoreMap))
|
||||||
|
scoreMap[file] = {};
|
||||||
|
scoreMap[file][word] = o.score;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// create the mapping
|
||||||
|
for (j = 0; j < files.length; j++) {
|
||||||
|
file = files[j];
|
||||||
|
if (file in fileMap && fileMap[file].indexOf(word) === -1)
|
||||||
|
fileMap[file].push(word);
|
||||||
|
else
|
||||||
|
fileMap[file] = [word];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// now check if the files don't contain excluded terms
|
||||||
|
for (file in fileMap) {
|
||||||
|
var valid = true;
|
||||||
|
|
||||||
|
// check if all requirements are matched
|
||||||
|
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
|
||||||
|
searchterms.filter(function(term){return term.length > 2}).length
|
||||||
|
if (
|
||||||
|
fileMap[file].length != searchterms.length &&
|
||||||
|
fileMap[file].length != filteredTermCount
|
||||||
|
) continue;
|
||||||
|
|
||||||
|
// ensure that none of the excluded terms is in the search result
|
||||||
|
for (i = 0; i < excluded.length; i++) {
|
||||||
|
if (terms[excluded[i]] == file ||
|
||||||
|
titleterms[excluded[i]] == file ||
|
||||||
|
$u.contains(terms[excluded[i]] || [], file) ||
|
||||||
|
$u.contains(titleterms[excluded[i]] || [], file)) {
|
||||||
|
valid = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if we have still a valid result we can add it to the result list
|
||||||
|
if (valid) {
|
||||||
|
// select one (max) score for the file.
|
||||||
|
// for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
|
||||||
|
var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
|
||||||
|
results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* helper function to return a node containing the
|
||||||
|
* search summary for a given text. keywords is a list
|
||||||
|
* of stemmed words, hlwords is the list of normal, unstemmed
|
||||||
|
* words. the first one is used to find the occurrence, the
|
||||||
|
* latter for highlighting it.
|
||||||
|
*/
|
||||||
|
makeSearchSummary : function(htmlText, keywords, hlwords) {
|
||||||
|
var text = Search.htmlToText(htmlText);
|
||||||
|
var textLower = text.toLowerCase();
|
||||||
|
var start = 0;
|
||||||
|
$.each(keywords, function() {
|
||||||
|
var i = textLower.indexOf(this.toLowerCase());
|
||||||
|
if (i > -1)
|
||||||
|
start = i;
|
||||||
|
});
|
||||||
|
start = Math.max(start - 120, 0);
|
||||||
|
var excerpt = ((start > 0) ? '...' : '') +
|
||||||
|
$.trim(text.substr(start, 240)) +
|
||||||
|
((start + 240 - text.length) ? '...' : '');
|
||||||
|
var rv = $('<div class="context"></div>').text(excerpt);
|
||||||
|
$.each(hlwords, function() {
|
||||||
|
rv = rv.highlightText(this, 'highlighted');
|
||||||
|
});
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
Search.init();
|
||||||
|
});
|
@ -0,0 +1,18 @@
|
|||||||
|
var initTriggerNavBar=()=>{if($(window).width()<768){$("#navbar-toggler").trigger("click")}}
|
||||||
|
var scrollToActive=()=>{var navbar=document.getElementById('site-navigation')
|
||||||
|
var active_pages=navbar.querySelectorAll(".active")
|
||||||
|
var active_page=active_pages[active_pages.length-1]
|
||||||
|
if(active_page!==undefined&&active_page.offsetTop>($(window).height()*.5)){navbar.scrollTop=active_page.offsetTop-($(window).height()*.2)}}
|
||||||
|
var sbRunWhenDOMLoaded=cb=>{if(document.readyState!='loading'){cb()}else if(document.addEventListener){document.addEventListener('DOMContentLoaded',cb)}else{document.attachEvent('onreadystatechange',function(){if(document.readyState=='complete')cb()})}}
|
||||||
|
function toggleFullScreen(){var navToggler=$("#navbar-toggler");if(!document.fullscreenElement){document.documentElement.requestFullscreen();if(!navToggler.hasClass("collapsed")){navToggler.click();}}else{if(document.exitFullscreen){document.exitFullscreen();if(navToggler.hasClass("collapsed")){navToggler.click();}}}}
|
||||||
|
var initTooltips=()=>{$(document).ready(function(){$('[data-toggle="tooltip"]').tooltip();});}
|
||||||
|
var initTocHide=()=>{var scrollTimeout;var throttle=200;var tocHeight=$("#bd-toc-nav").outerHeight(true)+$(".bd-toc").outerHeight(true);var hideTocAfter=tocHeight+200;var checkTocScroll=function(){var margin_content=$(".margin, .tag_margin, .full-width, .full_width, .tag_full-width, .tag_full_width, .sidebar, .tag_sidebar, .popout, .tag_popout");margin_content.each((index,item)=>{var topOffset=$(item).offset().top-$(window).scrollTop();var bottomOffset=topOffset+$(item).outerHeight(true);var topOverlaps=((topOffset>=0)&&(topOffset<hideTocAfter));var bottomOverlaps=((bottomOffset>=0)&&(bottomOffset<hideTocAfter));var removeToc=(topOverlaps||bottomOverlaps);if(removeToc&&window.pageYOffset>20){$("div.bd-toc").removeClass("show")
|
||||||
|
return false}else{$("div.bd-toc").addClass("show")};})};var manageScrolledClassOnBody=function(){if(window.scrollY>0){document.body.classList.add("scrolled");}else{document.body.classList.remove("scrolled");}}
|
||||||
|
$(window).on('scroll',function(){if(!scrollTimeout){scrollTimeout=setTimeout(function(){checkTocScroll();manageScrolledClassOnBody();scrollTimeout=null;},throttle);}});}
|
||||||
|
var initThebeSBT=()=>{var title=$("div.section h1")[0]
|
||||||
|
if(!$(title).next().hasClass("thebe-launch-button")){$("<button class='thebe-launch-button'></button>").insertAfter($(title))}
|
||||||
|
initThebe();}
|
||||||
|
sbRunWhenDOMLoaded(initTooltips)
|
||||||
|
sbRunWhenDOMLoaded(initTriggerNavBar)
|
||||||
|
sbRunWhenDOMLoaded(scrollToActive)
|
||||||
|
sbRunWhenDOMLoaded(initTocHide)
|
@ -0,0 +1,34 @@
|
|||||||
|
Font Awesome Free License
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Font Awesome Free is free, open source, and GPL friendly. You can use it for
|
||||||
|
commercial projects, open source projects, or really almost whatever you want.
|
||||||
|
Full Font Awesome Free license: https://fontawesome.com/license/free.
|
||||||
|
|
||||||
|
# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
|
||||||
|
In the Font Awesome Free download, the CC BY 4.0 license applies to all icons
|
||||||
|
packaged as SVG and JS file types.
|
||||||
|
|
||||||
|
# Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL)
|
||||||
|
In the Font Awesome Free download, the SIL OFL license applies to all icons
|
||||||
|
packaged as web and desktop font files.
|
||||||
|
|
||||||
|
# Code: MIT License (https://opensource.org/licenses/MIT)
|
||||||
|
In the Font Awesome Free download, the MIT license applies to all non-font and
|
||||||
|
non-icon files.
|
||||||
|
|
||||||
|
# Attribution
|
||||||
|
Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
|
||||||
|
Awesome Free files already contain embedded comments with sufficient
|
||||||
|
attribution, so you shouldn't need to do anything additional when using these
|
||||||
|
files normally.
|
||||||
|
|
||||||
|
We've kept attribution comments terse, so we ask that you do not actively work
|
||||||
|
to remove them from files, especially code. They're a great way for folks to
|
||||||
|
learn about Font Awesome.
|
||||||
|
|
||||||
|
# Brand Icons
|
||||||
|
All brand icons are trademarks of their respective owners. The use of these
|
||||||
|
trademarks does not indicate endorsement of the trademark holder by Font
|
||||||
|
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
|
||||||
|
to represent the company, product, or service to which they refer.**
|
After Width: | Height: | Size: 699 KiB |
After Width: | Height: | Size: 141 KiB |
After Width: | Height: | Size: 876 KiB |
@ -0,0 +1,25 @@
|
|||||||
|
<!-- these macros are generated by "yarn build:production". do not edit by hand. -->
|
||||||
|
{% macro head_pre_icons() %}
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="{{ pathto('_static/vendor/fontawesome/5.13.0/css/all.min.css', 1) }}">
|
||||||
|
<link rel="preload" as="font" type="font/woff2" crossorigin
|
||||||
|
href="{{ pathto('_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2', 1) }}">
|
||||||
|
<link rel="preload" as="font" type="font/woff2" crossorigin
|
||||||
|
href="{{ pathto('_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2', 1) }}">
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro head_pre_fonts() %}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro head_pre_bootstrap() %}
|
||||||
|
<link href="{{ pathto('_static/css/theme.css', 1) }}" rel="stylesheet" />
|
||||||
|
<link href="{{ pathto('_static/css/index.c5995385ac14fb8791e8eb36b4908be2.css', 1) }}" rel="stylesheet" />
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro head_js_preload() %}
|
||||||
|
<link rel="preload" as="script" href="{{ pathto('_static/js/index.1c5a1a01449ed65a7b51.js', 1) }}">
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro body_post() %}
|
||||||
|
<script src="{{ pathto('_static/js/index.1c5a1a01449ed65a7b51.js', 1) }}"></script>
|
||||||
|
{% endmacro %}
|
@ -1,289 +0,0 @@
|
|||||||
html {
|
|
||||||
scroll-padding-top: 70px;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
padding-top: 70px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p > img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.nav li.first-level {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.nav li.third-level {
|
|
||||||
padding-left: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.col-md-3 {
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.col-md-9 {
|
|
||||||
padding-bottom: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.source-links {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Side navigation
|
|
||||||
*
|
|
||||||
* Scrollspy and affixed enhanced navigation to highlight sections and secondary
|
|
||||||
* sections of docs content.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* By default it's not affixed in mobile views, so undo that */
|
|
||||||
.bs-sidebar.affix {
|
|
||||||
position: static;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bs-sidebar.well {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* First level of nav */
|
|
||||||
.bs-sidenav {
|
|
||||||
margin-top: 30px;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
padding-top: 10px;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* All levels of nav */
|
|
||||||
.bs-sidebar .nav > li > a {
|
|
||||||
display: block;
|
|
||||||
padding: 5px 20px;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
.bs-sidebar .nav > li > a:hover,
|
|
||||||
.bs-sidebar .nav > li > a:focus {
|
|
||||||
text-decoration: none;
|
|
||||||
border-right: 1px solid;
|
|
||||||
}
|
|
||||||
.bs-sidebar .nav > .active > a,
|
|
||||||
.bs-sidebar .nav > .active:hover > a,
|
|
||||||
.bs-sidebar .nav > .active:focus > a {
|
|
||||||
font-weight: bold;
|
|
||||||
background-color: transparent;
|
|
||||||
border-right: 1px solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Nav: second level (shown on .active) */
|
|
||||||
.bs-sidebar .nav .nav {
|
|
||||||
display: none; /* Hide by default, but at >768px, show it */
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
.bs-sidebar .nav .nav > li > a {
|
|
||||||
padding-top: 3px;
|
|
||||||
padding-bottom: 3px;
|
|
||||||
padding-left: 30px;
|
|
||||||
font-size: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Show and affix the side nav when space allows it */
|
|
||||||
@media (min-width: 992px) {
|
|
||||||
.bs-sidebar .nav > .active > ul {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
/* Widen the fixed sidebar */
|
|
||||||
.bs-sidebar.affix,
|
|
||||||
.bs-sidebar.affix-bottom {
|
|
||||||
width: 213px;
|
|
||||||
}
|
|
||||||
.bs-sidebar.affix {
|
|
||||||
position: fixed; /* Undo the static from mobile first approach */
|
|
||||||
top: 80px;
|
|
||||||
max-height: calc(100% - 180px);
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
.bs-sidebar.affix-bottom {
|
|
||||||
position: absolute; /* Undo the static from mobile first approach */
|
|
||||||
}
|
|
||||||
.bs-sidebar.affix-bottom .bs-sidenav,
|
|
||||||
.bs-sidebar.affix .bs-sidenav {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
/* Widen the fixed sidebar again */
|
|
||||||
.bs-sidebar.affix-bottom,
|
|
||||||
.bs-sidebar.affix {
|
|
||||||
width: 263px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Added to support >2 level nav in drop down */
|
|
||||||
|
|
||||||
.dropdown-submenu {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-submenu>.dropdown-menu {
|
|
||||||
top: 0;
|
|
||||||
left: 100%;
|
|
||||||
margin-top: 0px;
|
|
||||||
margin-left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-submenu:hover>.dropdown-menu {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-submenu>a:after {
|
|
||||||
display: block;
|
|
||||||
content: " ";
|
|
||||||
float: right;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
border-color: transparent;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 5px 0 5px 5px;
|
|
||||||
border-left-color: #ccc;
|
|
||||||
margin-top: 5px;
|
|
||||||
margin-right: -10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-submenu:hover>a:after {
|
|
||||||
border-left-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-submenu.pull-left {
|
|
||||||
float: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-submenu.pull-left>.dropdown-menu {
|
|
||||||
left: -100%;
|
|
||||||
margin-left: 00px;
|
|
||||||
}
|
|
||||||
/* Start Bootstrap Callouts CSS Source by Chris Pratt (https://codepen.io/chrisdpratt/pen/IAymB) MIT License*/
|
|
||||||
.bs-callout {
|
|
||||||
padding: 20px;
|
|
||||||
margin: 20px 0;
|
|
||||||
border: 1px solid #eee;
|
|
||||||
border-left-width: 5px;
|
|
||||||
border-radius: 3px;
|
|
||||||
background-color: #FCFDFF;
|
|
||||||
}
|
|
||||||
.bs-callout h4 {
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
.bs-callout p:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
.bs-callout code {
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
.bs-callout+.bs-callout {
|
|
||||||
margin-top: -5px;
|
|
||||||
}
|
|
||||||
.bs-callout-default {
|
|
||||||
border-left-color: #FA023C; /*modified from upstream default by Christopher Simpkins*/
|
|
||||||
}
|
|
||||||
.bs-callout-default h4 {
|
|
||||||
color: #FA023C; /*modified from upstream default by Christopher Simpkins*/
|
|
||||||
}
|
|
||||||
.bs-callout-primary {
|
|
||||||
border-left-color: #428bca;
|
|
||||||
}
|
|
||||||
.bs-callout-primary h4 {
|
|
||||||
color: #428bca;
|
|
||||||
}
|
|
||||||
.bs-callout-success {
|
|
||||||
border-left-color: #5cb85c;
|
|
||||||
}
|
|
||||||
.bs-callout-success h4 {
|
|
||||||
color: #5cb85c;
|
|
||||||
}
|
|
||||||
.bs-callout-danger {
|
|
||||||
border-left-color: #d9534f;
|
|
||||||
}
|
|
||||||
.bs-callout-danger h4 {
|
|
||||||
color: #d9534f;
|
|
||||||
}
|
|
||||||
.bs-callout-warning {
|
|
||||||
border-left-color: #f0ad4e;
|
|
||||||
}
|
|
||||||
.bs-callout-warning h4 {
|
|
||||||
color: #f0ad4e;
|
|
||||||
}
|
|
||||||
.bs-callout-info {
|
|
||||||
border-left-color: #5bc0de;
|
|
||||||
}
|
|
||||||
.bs-callout-info h4 {
|
|
||||||
color: #5bc0de;
|
|
||||||
}
|
|
||||||
/* End Bootstrap Callouts CSS Source by Chris Pratt */
|
|
||||||
|
|
||||||
/* Headerlinks */
|
|
||||||
.headerlink {
|
|
||||||
display: none;
|
|
||||||
padding-left: .5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .headerlink, h5:hover .headerlink, h6:hover .headerlink {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Admonitions */
|
|
||||||
.admonition {
|
|
||||||
padding: 20px;
|
|
||||||
margin: 20px 0;
|
|
||||||
border: 1px solid #eee;
|
|
||||||
border-left-width: 5px;
|
|
||||||
border-radius: 3px;
|
|
||||||
background-color: #FCFDFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition p:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
.admonition code {
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
.admonition+.admonition {
|
|
||||||
margin-top: -5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition.note { /* csslint allow: adjoining-classes */
|
|
||||||
border-left-color: #428bca;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition.warning { /* csslint allow: adjoining-classes */
|
|
||||||
border-left-color: #f0ad4e;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition.danger { /* csslint allow: adjoining-classes */
|
|
||||||
border-left-color: #d9534f;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition-title {
|
|
||||||
font-size: 19px;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition.note > .admonition-title {
|
|
||||||
color: #428bca;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition.warning > .admonition-title {
|
|
||||||
color: #f0ad4e;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admonition.danger > .admonition-title {
|
|
||||||
color: #d9534f;
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
html{scroll-padding-top:70px}body{padding-top:70px}p>img{max-width:100%;height:auto}ul.nav li.first-level{font-weight:bold}ul.nav li.third-level{padding-left:12px}div.col-md-3{padding-left:0}div.col-md-9{padding-bottom:100px}div.source-links{float:right}.bs-sidebar.affix{position:static}.bs-sidebar.well{padding:0}.bs-sidenav{margin-top:30px;margin-bottom:30px;padding-top:10px;padding-bottom:10px;border-radius:5px}.bs-sidebar .nav>li>a{display:block;padding:5px 20px;z-index:1}.bs-sidebar .nav>li>a:hover,.bs-sidebar .nav>li>a:focus{text-decoration:none;border-right:1px solid}.bs-sidebar .nav>.active>a,.bs-sidebar .nav>.active:hover>a,.bs-sidebar .nav>.active:focus>a{font-weight:bold;background-color:transparent;border-right:1px solid}.bs-sidebar .nav .nav{display:none;margin-bottom:8px}.bs-sidebar .nav .nav>li>a{padding-top:3px;padding-bottom:3px;padding-left:30px;font-size:90%}@media(min-width:992px){.bs-sidebar .nav>.active>ul{display:block}.bs-sidebar.affix,.bs-sidebar.affix-bottom{width:213px}.bs-sidebar.affix{position:fixed;top:80px;max-height:calc(100% - 180px);overflow-y:auto}.bs-sidebar.affix-bottom{position:absolute}.bs-sidebar.affix-bottom .bs-sidenav,.bs-sidebar.affix .bs-sidenav{margin-top:0;margin-bottom:0}}@media(min-width:1200px){.bs-sidebar.affix-bottom,.bs-sidebar.affix{width:263px}}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:0;margin-left:0}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#ccc;margin-top:5px;margin-right:-10px}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:00px}.bs-callout{padding:20px;margin:20px 0;border:1px solid #eee;border-left-width:5px;border-radius:3px;background-color:#fcfdff}.bs-callout h4{font-style:normal;font-weight:400;margin-top:0;margin-bottom:5px}.bs-callout p:last-child{margin-bottom:0}.bs-callout code{border-radius:3px}.bs-callout+.bs-callout{margin-top:-5px}.bs-callout-default{border-left-color:#fa023c}.bs-callout-default h4{color:#fa023c}.bs-callout-primary{border-left-color:#428bca}.bs-callout-primary h4{color:#428bca}.bs-callout-success{border-left-color:#5cb85c}.bs-callout-success h4{color:#5cb85c}.bs-callout-danger{border-left-color:#d9534f}.bs-callout-danger h4{color:#d9534f}.bs-callout-warning{border-left-color:#f0ad4e}.bs-callout-warning h4{color:#f0ad4e}.bs-callout-info{border-left-color:#5bc0de}.bs-callout-info h4{color:#5bc0de}.headerlink{display:none;padding-left:.5em}h1:hover .headerlink,h2:hover .headerlink,h3:hover .headerlink,h4:hover .headerlink,h5:hover .headerlink,h6:hover .headerlink{display:inline-block}.admonition{padding:20px;margin:20px 0;border:1px solid #eee;border-left-width:5px;border-radius:3px;background-color:#fcfdff}.admonition p:last-child{margin-bottom:0}.admonition code{border-radius:3px}.admonition+.admonition{margin-top:-5px}.admonition.note{border-left-color:#428bca}.admonition.warning{border-left-color:#f0ad4e}.admonition.danger{border-left-color:#d9534f}.admonition-title{font-size:19px;font-style:normal;font-weight:400;margin-top:0;margin-bottom:5px}.admonition.note>.admonition-title{color:#428bca}.admonition.warning>.admonition-title{color:#f0ad4e}.admonition.danger>.admonition-title{color:#d9534f}
|
|
@ -1,88 +0,0 @@
|
|||||||
/*
|
|
||||||
Cinder Theme for MkDocs | Copyright 2015 Christopher Simpkins | MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family:"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 1.7;
|
|
||||||
background-color: #FFF;
|
|
||||||
color: #343838;
|
|
||||||
}
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
|
||||||
font-family:'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
||||||
color: #222;
|
|
||||||
}
|
|
||||||
h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small, h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small, .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small {
|
|
||||||
color: #B1B7B9;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
margin-top: 35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2 {
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
h4 {
|
|
||||||
font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
||||||
font-weight: 300;
|
|
||||||
margin-top: 20px;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
h5 {
|
|
||||||
font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
||||||
font-weight: 300;
|
|
||||||
font-variant: small-caps;
|
|
||||||
}
|
|
||||||
pre, code {
|
|
||||||
background-color: #FCFDFF;
|
|
||||||
}
|
|
||||||
pre>code {
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
margin-top: 25px;
|
|
||||||
margin-bottom: 25px;
|
|
||||||
}
|
|
||||||
.lead {
|
|
||||||
font-family:"Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 1.4;
|
|
||||||
letter-spacing: 0.0312em;
|
|
||||||
color: #B1B7B9;
|
|
||||||
}
|
|
||||||
.navbar-default {
|
|
||||||
background-color: #343838;
|
|
||||||
border-bottom: 8px #EBF2F2 solid;
|
|
||||||
}
|
|
||||||
.bs-sidenav {
|
|
||||||
background-image: url("../img/grid11.png");
|
|
||||||
background-repeat: repeat;
|
|
||||||
font-family: Inter,"Helvetica Neue",Helvetica,Arial,sans-serif;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
.well {
|
|
||||||
background-color: #FCFDFF;
|
|
||||||
}
|
|
||||||
.btn-default {
|
|
||||||
background-color:#FCFDFF;
|
|
||||||
}
|
|
||||||
.table-striped > tbody > tr:nth-child(2n+1) > td, .table-striped > tbody > tr:nth-child(2n+1) > th {
|
|
||||||
background-color: #FCFDFF;
|
|
||||||
}
|
|
||||||
#mkdocs-search-query:focus {
|
|
||||||
outline: none;
|
|
||||||
-webkit-box-shadow: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
#mkdocs-search-query {
|
|
||||||
font-family:"Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 700;
|
|
||||||
color: #343838;
|
|
||||||
height: 45px;
|
|
||||||
}
|
|
||||||
footer > hr {
|
|
||||||
width: 35%;
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
body{font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.7;background-color:#FFF;color:#343838}h1,h2,h3,h4,h5,h6{font-family:'Inter','Helvetica Neue',Helvetica,Arial,sans-serif;color:#222}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{color:#b1b7b9}h2{margin-top:35px}h1,h2{font-weight:700}h4{font-family:'Inter','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:300;margin-top:20px;font-style:italic}h5{font-family:'Inter','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:300;font-variant:small-caps}pre,code{background-color:#fcfdff}pre>code{font-size:13px}pre{margin-top:25px;margin-bottom:25px}.lead{font-family:"Inter","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;line-height:1.4;letter-spacing:.0312em;color:#b1b7b9}.navbar-default{background-color:#343838;border-bottom:8px #ebf2f2 solid}.bs-sidenav{background-image:url("../img/grid11.png");background-repeat:repeat;font-family:Inter,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px}.well{background-color:#fcfdff}.btn-default{background-color:#fcfdff}.table-striped>tbody>tr:nth-child(2n+1)>td,.table-striped>tbody>tr:nth-child(2n+1)>th{background-color:#fcfdff}#mkdocs-search-query:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}#mkdocs-search-query{font-family:"Inter","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:20px;font-weight:700;color:#343838;height:45px}footer>hr{width:35%}
|
|
@ -1,28 +0,0 @@
|
|||||||
.navbar-default {
|
|
||||||
border-bottom: 0px;
|
|
||||||
background-color: #fff;
|
|
||||||
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
a, .navbar-default a {
|
|
||||||
color: #06a !important;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.disabled > a {
|
|
||||||
color: #999 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-default a:hover,
|
|
||||||
.navbar-default .active,
|
|
||||||
.active > a {
|
|
||||||
background-color: #f0f0f0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-bar {
|
|
||||||
background-color: #666 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-collapse {
|
|
||||||
border-color: #fff !important;
|
|
||||||
}
|
|
@ -1,99 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
.hljs {
|
|
||||||
display: block;
|
|
||||||
overflow-x: auto;
|
|
||||||
padding: 0.5em;
|
|
||||||
color: #333;
|
|
||||||
background: #FCFDFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-comment,
|
|
||||||
.hljs-quote {
|
|
||||||
color: #998;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-keyword,
|
|
||||||
.hljs-selector-tag,
|
|
||||||
.hljs-subst {
|
|
||||||
color: #333;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-number,
|
|
||||||
.hljs-literal,
|
|
||||||
.hljs-variable,
|
|
||||||
.hljs-template-variable,
|
|
||||||
.hljs-tag .hljs-attr {
|
|
||||||
color: #008080;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-string,
|
|
||||||
.hljs-doctag {
|
|
||||||
color: #d14;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-title,
|
|
||||||
.hljs-section,
|
|
||||||
.hljs-selector-id {
|
|
||||||
color: #900;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-subst {
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-type,
|
|
||||||
.hljs-class .hljs-title {
|
|
||||||
color: #458;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-tag,
|
|
||||||
.hljs-name,
|
|
||||||
.hljs-attribute {
|
|
||||||
color: #000080;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-regexp,
|
|
||||||
.hljs-link {
|
|
||||||
color: #009926;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-symbol,
|
|
||||||
.hljs-bullet {
|
|
||||||
color: #990073;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-built_in,
|
|
||||||
.hljs-builtin-name {
|
|
||||||
color: #0086b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-meta {
|
|
||||||
color: #999;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-deletion {
|
|
||||||
background: #fdd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-addition {
|
|
||||||
background: #dfd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-emphasis {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-strong {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
.hljs{display:block;overflow-x:auto;padding:.5em;color:#333;background:#fcfdff}.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#333;font-weight:bold}.hljs-number,.hljs-literal,.hljs-variable,.hljs-template-variable,.hljs-tag .hljs-attr{color:teal}.hljs-string,.hljs-doctag{color:#d14}.hljs-title,.hljs-section,.hljs-selector-id{color:#900;font-weight:bold}.hljs-subst{font-weight:normal}.hljs-type,.hljs-class .hljs-title{color:#458;font-weight:bold}.hljs-tag,.hljs-name,.hljs-attribute{color:navy;font-weight:normal}.hljs-regexp,.hljs-link{color:#009926}.hljs-symbol,.hljs-bullet{color:#990073}.hljs-built_in,.hljs-builtin-name{color:#0086b3}.hljs-meta{color:#999;font-weight:bold}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}
|
|
Before Width: | Height: | Size: 197 KiB |
@ -0,0 +1,192 @@
|
|||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Index — UnitCommitment.jl<br/><small>0.2</small></title>
|
||||||
|
|
||||||
|
<link href="../_static/css/theme.css" rel="stylesheet" />
|
||||||
|
<link href="../_static/css/index.c5995385ac14fb8791e8eb36b4908be2.css" rel="stylesheet" />
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="../_static/vendor/fontawesome/5.13.0/css/all.min.css">
|
||||||
|
<link rel="preload" as="font" type="font/woff2" crossorigin
|
||||||
|
href="../_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2">
|
||||||
|
<link rel="preload" as="font" type="font/woff2" crossorigin
|
||||||
|
href="../_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../_static/sphinx-book-theme.acff12b8f9c144ce68a297486a2fa670.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../_static/custom.css" />
|
||||||
|
|
||||||
|
<link rel="preload" as="script" href="../_static/js/index.1c5a1a01449ed65a7b51.js">
|
||||||
|
|
||||||
|
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||||
|
<script src="../_static/jquery.js"></script>
|
||||||
|
<script src="../_static/underscore.js"></script>
|
||||||
|
<script src="../_static/doctools.js"></script>
|
||||||
|
<script src="../_static/sphinx-book-theme.12a9622fbb08dcb3a2a40b2c02b83a57.js"></script>
|
||||||
|
<link rel="index" title="Index" href="#" />
|
||||||
|
<link rel="search" title="Search" href="../search/" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="docsearch:language" content="en" />
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80">
|
||||||
|
|
||||||
|
<div class="container-fluid" id="banner"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-xl">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-12 col-md-3 bd-sidebar site-navigation show" id="site-navigation">
|
||||||
|
|
||||||
|
<div class="navbar-brand-box">
|
||||||
|
<a class="navbar-brand text-wrap" href="../">
|
||||||
|
|
||||||
|
|
||||||
|
<h1 class="site-logo" id="site-title">UnitCommitment.jl<br/><small>0.2</small></h1>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div><form class="bd-search d-flex align-items-center" action="../search/" method="get">
|
||||||
|
<i class="icon fas fa-search"></i>
|
||||||
|
<input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" >
|
||||||
|
</form><nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
|
||||||
|
<div class="bd-toc-item active">
|
||||||
|
<ul class="nav bd-sidenav">
|
||||||
|
<li class="toctree-l1">
|
||||||
|
<a class="reference internal" href="../usage/">
|
||||||
|
<span class="sectnum">
|
||||||
|
1.
|
||||||
|
</span>
|
||||||
|
Usage
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l1">
|
||||||
|
<a class="reference internal" href="../format/">
|
||||||
|
<span class="sectnum">
|
||||||
|
2.
|
||||||
|
</span>
|
||||||
|
Data Format
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l1">
|
||||||
|
<a class="reference internal" href="../instances/">
|
||||||
|
<span class="sectnum">
|
||||||
|
3.
|
||||||
|
</span>
|
||||||
|
Instances
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav> <!-- To handle the deprecated key -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main class="col py-md-3 pl-md-4 bd-content overflow-auto" role="main">
|
||||||
|
|
||||||
|
<div class="topbar container-xl fixed-top">
|
||||||
|
<div class="topbar-contents row">
|
||||||
|
<div class="col-12 col-md-3 bd-topbar-whitespace site-navigation show"></div>
|
||||||
|
<div class="col pl-md-4 topbar-main">
|
||||||
|
|
||||||
|
<button id="navbar-toggler" class="navbar-toggler ml-0" type="button" data-toggle="collapse"
|
||||||
|
data-toggle="tooltip" data-placement="bottom" data-target=".site-navigation" aria-controls="navbar-menu"
|
||||||
|
aria-expanded="true" aria-label="Toggle navigation" aria-controls="site-navigation"
|
||||||
|
title="Toggle navigation" data-toggle="tooltip" data-placement="left">
|
||||||
|
<i class="fas fa-bars"></i>
|
||||||
|
<i class="fas fa-arrow-left"></i>
|
||||||
|
<i class="fas fa-arrow-up"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Source interaction buttons -->
|
||||||
|
|
||||||
|
<div class="dropdown-buttons-trigger">
|
||||||
|
<button id="dropdown-buttons-trigger" class="btn btn-secondary topbarbtn"
|
||||||
|
aria-label="Connect with source repository"><i class="fab fa-github"></i></button>
|
||||||
|
<div class="dropdown-buttons sourcebuttons">
|
||||||
|
<a class="repository-button"
|
||||||
|
href="https://github.com/ANL-CEEESA/UnitCommitment.jl/"><button type="button" class="btn btn-secondary topbarbtn"
|
||||||
|
data-toggle="tooltip" data-placement="left" title="Source repository"><i
|
||||||
|
class="fab fa-github"></i>repository</button></a>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Full screen (wrap in <a> to have style consistency -->
|
||||||
|
|
||||||
|
<a class="full-screen-button"><button type="button" class="btn btn-secondary topbarbtn" data-toggle="tooltip"
|
||||||
|
data-placement="bottom" onclick="toggleFullScreen()" aria-label="Fullscreen mode"
|
||||||
|
title="Fullscreen mode"><i
|
||||||
|
class="fas fa-expand"></i></button></a>
|
||||||
|
|
||||||
|
<!-- Launch buttons -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Table of contents -->
|
||||||
|
<div class="d-none d-md-block col-md-2 bd-toc show">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="main-content" class="row">
|
||||||
|
<div class="col-12 col-md-9 pl-md-3 pr-md-0">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="index">Index</h1>
|
||||||
|
|
||||||
|
<div class="genindex-jumpbox">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='prev-next-bottom'>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<footer class="footer mt-5 mt-md-0">
|
||||||
|
<div class="container">
|
||||||
|
<p>
|
||||||
|
|
||||||
|
© Copyright 2020-2021, UChicago Argonne, LLC.<br/>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="../_static/js/index.1c5a1a01449ed65a7b51.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 495 B |
Before Width: | Height: | Size: 253 B |
Before Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 457 B |
Before Width: | Height: | Size: 427 B |
Before Width: | Height: | Size: 271 B |
Before Width: | Height: | Size: 493 B |
Before Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 457 B |
Before Width: | Height: | Size: 456 B |
@ -1,225 +0,0 @@
|
|||||||
function getSearchTerm() {
|
|
||||||
var sPageURL = window.location.search.substring(1);
|
|
||||||
var sURLVariables = sPageURL.split('&');
|
|
||||||
for (var i = 0; i < sURLVariables.length; i++) {
|
|
||||||
var sParameterName = sURLVariables[i].split('=');
|
|
||||||
if (sParameterName[0] == 'q') {
|
|
||||||
return sParameterName[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Taken from themes/mkdocs/js/base.js
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
var search_term = getSearchTerm(),
|
|
||||||
$search_modal = $('#mkdocs_search_modal'),
|
|
||||||
$keyboard_modal = $('#mkdocs_keyboard_modal');
|
|
||||||
|
|
||||||
if (search_term) {
|
|
||||||
$search_modal.modal();
|
|
||||||
}
|
|
||||||
|
|
||||||
// make sure search input gets autofocus everytime modal opens.
|
|
||||||
$search_modal.on('shown.bs.modal', function() {
|
|
||||||
$search_modal.find('#mkdocs-search-query').focus();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Close search modal when result is selected
|
|
||||||
// The links get added later so listen to parent
|
|
||||||
$('#mkdocs-search-results').click(function(e) {
|
|
||||||
if ($(e.target).is('a')) {
|
|
||||||
$search_modal.modal('hide');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (typeof shortcuts !== 'undefined') {
|
|
||||||
// Populate keyboard modal with proper Keys
|
|
||||||
$keyboard_modal.find('.help.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.help];
|
|
||||||
$keyboard_modal.find('.prev.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.previous];
|
|
||||||
$keyboard_modal.find('.next.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.next];
|
|
||||||
$keyboard_modal.find('.search.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.search];
|
|
||||||
|
|
||||||
// Keyboard navigation
|
|
||||||
document.addEventListener("keydown", function(e) {
|
|
||||||
if ($(e.target).is(':input')) return true;
|
|
||||||
var key = e.which || e.key || window.event && window.event.key;
|
|
||||||
var page;
|
|
||||||
switch (key) {
|
|
||||||
case shortcuts.next:
|
|
||||||
page = $('.navbar a[rel="next"]:first').prop('href');
|
|
||||||
break;
|
|
||||||
case shortcuts.previous:
|
|
||||||
page = $('.navbar a[rel="prev"]:first').prop('href');
|
|
||||||
break;
|
|
||||||
case shortcuts.search:
|
|
||||||
e.preventDefault();
|
|
||||||
$keyboard_modal.modal('hide');
|
|
||||||
$search_modal.modal('show');
|
|
||||||
$search_modal.find('#mkdocs-search-query').focus();
|
|
||||||
break;
|
|
||||||
case shortcuts.help:
|
|
||||||
$search_modal.modal('hide');
|
|
||||||
$keyboard_modal.modal('show');
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (page) {
|
|
||||||
$keyboard_modal.modal('hide');
|
|
||||||
window.location.href = page;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$('table').addClass('table table-striped table-hover');
|
|
||||||
|
|
||||||
// Improve the scrollspy behaviour when users click on a TOC item.
|
|
||||||
$(".bs-sidenav a").on("click", function() {
|
|
||||||
var clicked = this;
|
|
||||||
setTimeout(function() {
|
|
||||||
var active = $('.nav li.active a');
|
|
||||||
active = active[active.length - 1];
|
|
||||||
if (clicked !== active) {
|
|
||||||
$(active).parent().removeClass("active");
|
|
||||||
$(clicked).parent().addClass("active");
|
|
||||||
}
|
|
||||||
}, 50);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
* Taken from themes/mkdocs/js/base.js
|
|
||||||
* ------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
$('body').scrollspy({
|
|
||||||
target: '.bs-sidebar',
|
|
||||||
offset: 100
|
|
||||||
});
|
|
||||||
|
|
||||||
/* Prevent disabled links from causing a page reload */
|
|
||||||
$("li.disabled a").click(function() {
|
|
||||||
event.preventDefault();
|
|
||||||
});
|
|
||||||
|
|
||||||
// See https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
|
|
||||||
// We only list common keys below. Obscure keys are omited and their use is discouraged.
|
|
||||||
var keyCodes = {
|
|
||||||
8: 'backspace',
|
|
||||||
9: 'tab',
|
|
||||||
13: 'enter',
|
|
||||||
16: 'shift',
|
|
||||||
17: 'ctrl',
|
|
||||||
18: 'alt',
|
|
||||||
19: 'pause/break',
|
|
||||||
20: 'caps lock',
|
|
||||||
27: 'escape',
|
|
||||||
32: 'spacebar',
|
|
||||||
33: 'page up',
|
|
||||||
34: 'page down',
|
|
||||||
35: 'end',
|
|
||||||
36: 'home',
|
|
||||||
37: '←',
|
|
||||||
38: '↑',
|
|
||||||
39: '→',
|
|
||||||
40: '↓',
|
|
||||||
45: 'insert',
|
|
||||||
46: 'delete',
|
|
||||||
48: '0',
|
|
||||||
49: '1',
|
|
||||||
50: '2',
|
|
||||||
51: '3',
|
|
||||||
52: '4',
|
|
||||||
53: '5',
|
|
||||||
54: '6',
|
|
||||||
55: '7',
|
|
||||||
56: '8',
|
|
||||||
57: '9',
|
|
||||||
65: 'a',
|
|
||||||
66: 'b',
|
|
||||||
67: 'c',
|
|
||||||
68: 'd',
|
|
||||||
69: 'e',
|
|
||||||
70: 'f',
|
|
||||||
71: 'g',
|
|
||||||
72: 'h',
|
|
||||||
73: 'i',
|
|
||||||
74: 'j',
|
|
||||||
75: 'k',
|
|
||||||
76: 'l',
|
|
||||||
77: 'm',
|
|
||||||
78: 'n',
|
|
||||||
79: 'o',
|
|
||||||
80: 'p',
|
|
||||||
81: 'q',
|
|
||||||
82: 'r',
|
|
||||||
83: 's',
|
|
||||||
84: 't',
|
|
||||||
85: 'u',
|
|
||||||
86: 'v',
|
|
||||||
87: 'w',
|
|
||||||
88: 'x',
|
|
||||||
89: 'y',
|
|
||||||
90: 'z',
|
|
||||||
91: 'Left Windows Key / Left ⌘',
|
|
||||||
92: 'Right Windows Key',
|
|
||||||
93: 'Windows Menu / Right ⌘',
|
|
||||||
96: 'numpad 0',
|
|
||||||
97: 'numpad 1',
|
|
||||||
98: 'numpad 2',
|
|
||||||
99: 'numpad 3',
|
|
||||||
100: 'numpad 4',
|
|
||||||
101: 'numpad 5',
|
|
||||||
102: 'numpad 6',
|
|
||||||
103: 'numpad 7',
|
|
||||||
104: 'numpad 8',
|
|
||||||
105: 'numpad 9',
|
|
||||||
106: 'multiply',
|
|
||||||
107: 'add',
|
|
||||||
109: 'subtract',
|
|
||||||
110: 'decimal point',
|
|
||||||
111: 'divide',
|
|
||||||
112: 'f1',
|
|
||||||
113: 'f2',
|
|
||||||
114: 'f3',
|
|
||||||
115: 'f4',
|
|
||||||
116: 'f5',
|
|
||||||
117: 'f6',
|
|
||||||
118: 'f7',
|
|
||||||
119: 'f8',
|
|
||||||
120: 'f9',
|
|
||||||
121: 'f10',
|
|
||||||
122: 'f11',
|
|
||||||
123: 'f12',
|
|
||||||
124: 'f13',
|
|
||||||
125: 'f14',
|
|
||||||
126: 'f15',
|
|
||||||
127: 'f16',
|
|
||||||
128: 'f17',
|
|
||||||
129: 'f18',
|
|
||||||
130: 'f19',
|
|
||||||
131: 'f20',
|
|
||||||
132: 'f21',
|
|
||||||
133: 'f22',
|
|
||||||
134: 'f23',
|
|
||||||
135: 'f24',
|
|
||||||
144: 'num lock',
|
|
||||||
145: 'scroll lock',
|
|
||||||
186: ';',
|
|
||||||
187: '=',
|
|
||||||
188: ',',
|
|
||||||
189: '‐',
|
|
||||||
190: '.',
|
|
||||||
191: '?',
|
|
||||||
192: '`',
|
|
||||||
219: '[',
|
|
||||||
220: '\',
|
|
||||||
221: ']',
|
|
||||||
222: ''',
|
|
||||||
};
|
|
@ -1,8 +0,0 @@
|
|||||||
MathJax.Hub.Config({
|
|
||||||
"tex2jax": { inlineMath: [ [ '$', '$' ] ] }
|
|
||||||
});
|
|
||||||
MathJax.Hub.Config({
|
|
||||||
config: ["MMLorHTML.js"],
|
|
||||||
jax: ["input/TeX", "output/HTML-CSS", "output/NativeMML"],
|
|
||||||
extensions: ["MathMenu.js", "MathZoom.js"]
|
|
||||||
});
|
|
@ -0,0 +1,212 @@
|
|||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Search — UnitCommitment.jl<br/><small>0.2</small></title>
|
||||||
|
|
||||||
|
<link href="../_static/css/theme.css" rel="stylesheet" />
|
||||||
|
<link href="../_static/css/index.c5995385ac14fb8791e8eb36b4908be2.css" rel="stylesheet" />
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="../_static/vendor/fontawesome/5.13.0/css/all.min.css">
|
||||||
|
<link rel="preload" as="font" type="font/woff2" crossorigin
|
||||||
|
href="../_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2">
|
||||||
|
<link rel="preload" as="font" type="font/woff2" crossorigin
|
||||||
|
href="../_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../_static/sphinx-book-theme.acff12b8f9c144ce68a297486a2fa670.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../_static/custom.css" />
|
||||||
|
|
||||||
|
<link rel="preload" as="script" href="../_static/js/index.1c5a1a01449ed65a7b51.js">
|
||||||
|
|
||||||
|
|
||||||
|
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||||
|
<script src="../_static/jquery.js"></script>
|
||||||
|
<script src="../_static/underscore.js"></script>
|
||||||
|
<script src="../_static/doctools.js"></script>
|
||||||
|
<script src="../_static/sphinx-book-theme.12a9622fbb08dcb3a2a40b2c02b83a57.js"></script>
|
||||||
|
<script src="../_static/searchtools.js"></script>
|
||||||
|
<script src="../_static/language_data.js"></script>
|
||||||
|
<link rel="index" title="Index" href="../genindex/" />
|
||||||
|
<link rel="search" title="Search" href="#" />
|
||||||
|
<script src="../searchindex.js" defer></script>
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="docsearch:language" content="en" />
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80">
|
||||||
|
|
||||||
|
<div class="container-fluid" id="banner"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-xl">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-12 col-md-3 bd-sidebar site-navigation show" id="site-navigation">
|
||||||
|
|
||||||
|
<div class="navbar-brand-box">
|
||||||
|
<a class="navbar-brand text-wrap" href="../">
|
||||||
|
|
||||||
|
|
||||||
|
<h1 class="site-logo" id="site-title">UnitCommitment.jl<br/><small>0.2</small></h1>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div><form class="bd-search d-flex align-items-center" action="#" method="get">
|
||||||
|
<i class="icon fas fa-search"></i>
|
||||||
|
<input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" >
|
||||||
|
</form><nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
|
||||||
|
<div class="bd-toc-item active">
|
||||||
|
<ul class="nav bd-sidenav">
|
||||||
|
<li class="toctree-l1">
|
||||||
|
<a class="reference internal" href="../usage/">
|
||||||
|
<span class="sectnum">
|
||||||
|
1.
|
||||||
|
</span>
|
||||||
|
Usage
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l1">
|
||||||
|
<a class="reference internal" href="../format/">
|
||||||
|
<span class="sectnum">
|
||||||
|
2.
|
||||||
|
</span>
|
||||||
|
Data Format
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l1">
|
||||||
|
<a class="reference internal" href="../instances/">
|
||||||
|
<span class="sectnum">
|
||||||
|
3.
|
||||||
|
</span>
|
||||||
|
Instances
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav> <!-- To handle the deprecated key -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main class="col py-md-3 pl-md-4 bd-content overflow-auto" role="main">
|
||||||
|
|
||||||
|
<div class="topbar container-xl fixed-top">
|
||||||
|
<div class="topbar-contents row">
|
||||||
|
<div class="col-12 col-md-3 bd-topbar-whitespace site-navigation show"></div>
|
||||||
|
<div class="col pl-md-4 topbar-main">
|
||||||
|
|
||||||
|
<button id="navbar-toggler" class="navbar-toggler ml-0" type="button" data-toggle="collapse"
|
||||||
|
data-toggle="tooltip" data-placement="bottom" data-target=".site-navigation" aria-controls="navbar-menu"
|
||||||
|
aria-expanded="true" aria-label="Toggle navigation" aria-controls="site-navigation"
|
||||||
|
title="Toggle navigation" data-toggle="tooltip" data-placement="left">
|
||||||
|
<i class="fas fa-bars"></i>
|
||||||
|
<i class="fas fa-arrow-left"></i>
|
||||||
|
<i class="fas fa-arrow-up"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Source interaction buttons -->
|
||||||
|
|
||||||
|
<div class="dropdown-buttons-trigger">
|
||||||
|
<button id="dropdown-buttons-trigger" class="btn btn-secondary topbarbtn"
|
||||||
|
aria-label="Connect with source repository"><i class="fab fa-github"></i></button>
|
||||||
|
<div class="dropdown-buttons sourcebuttons">
|
||||||
|
<a class="repository-button"
|
||||||
|
href="https://github.com/ANL-CEEESA/UnitCommitment.jl/"><button type="button" class="btn btn-secondary topbarbtn"
|
||||||
|
data-toggle="tooltip" data-placement="left" title="Source repository"><i
|
||||||
|
class="fab fa-github"></i>repository</button></a>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Full screen (wrap in <a> to have style consistency -->
|
||||||
|
|
||||||
|
<a class="full-screen-button"><button type="button" class="btn btn-secondary topbarbtn" data-toggle="tooltip"
|
||||||
|
data-placement="bottom" onclick="toggleFullScreen()" aria-label="Fullscreen mode"
|
||||||
|
title="Fullscreen mode"><i
|
||||||
|
class="fas fa-expand"></i></button></a>
|
||||||
|
|
||||||
|
<!-- Launch buttons -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Table of contents -->
|
||||||
|
<div class="d-none d-md-block col-md-2 bd-toc show">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="main-content" class="row">
|
||||||
|
<div class="col-12 col-md-9 pl-md-3 pr-md-0">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<h1 id="search-documentation">Search</h1>
|
||||||
|
<div id="fallback" class="admonition warning">
|
||||||
|
<script>$('#fallback').hide();</script>
|
||||||
|
<p>
|
||||||
|
Please activate JavaScript to enable the search
|
||||||
|
functionality.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
Searching for multiple words only shows matches that contain
|
||||||
|
all words.
|
||||||
|
</p>
|
||||||
|
<form action="" method="get">
|
||||||
|
<input type="text" name="q" aria-labelledby="search-documentation" value="" />
|
||||||
|
<input type="submit" value="search" />
|
||||||
|
<span id="search-progress" style="padding-left: 10px"></span>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div id="search-results">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='prev-next-bottom'>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<footer class="footer mt-5 mt-md-0">
|
||||||
|
<div class="container">
|
||||||
|
<p>
|
||||||
|
|
||||||
|
© Copyright 2020-2021, UChicago Argonne, LLC.<br/>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="../_static/js/index.1c5a1a01449ed65a7b51.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,98 +0,0 @@
|
|||||||
function getSearchTermFromLocation() {
|
|
||||||
var sPageURL = window.location.search.substring(1);
|
|
||||||
var sURLVariables = sPageURL.split('&');
|
|
||||||
for (var i = 0; i < sURLVariables.length; i++) {
|
|
||||||
var sParameterName = sURLVariables[i].split('=');
|
|
||||||
if (sParameterName[0] == 'q') {
|
|
||||||
return decodeURIComponent(sParameterName[1].replace(/\+/g, '%20'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function joinUrl (base, path) {
|
|
||||||
if (path.substring(0, 1) === "/") {
|
|
||||||
// path starts with `/`. Thus it is absolute.
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
if (base.substring(base.length-1) === "/") {
|
|
||||||
// base ends with `/`
|
|
||||||
return base + path;
|
|
||||||
}
|
|
||||||
return base + "/" + path;
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatResult (location, title, summary) {
|
|
||||||
return '<article><h3><a href="' + joinUrl(base_url, location) + '">'+ title + '</a></h3><p>' + summary +'</p></article>';
|
|
||||||
}
|
|
||||||
|
|
||||||
function displayResults (results) {
|
|
||||||
var search_results = document.getElementById("mkdocs-search-results");
|
|
||||||
while (search_results.firstChild) {
|
|
||||||
search_results.removeChild(search_results.firstChild);
|
|
||||||
}
|
|
||||||
if (results.length > 0){
|
|
||||||
for (var i=0; i < results.length; i++){
|
|
||||||
var result = results[i];
|
|
||||||
var html = formatResult(result.location, result.title, result.summary);
|
|
||||||
search_results.insertAdjacentHTML('beforeend', html);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
search_results.insertAdjacentHTML('beforeend', "<p>No results found</p>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function doSearch () {
|
|
||||||
var query = document.getElementById('mkdocs-search-query').value;
|
|
||||||
if (query.length > min_search_length) {
|
|
||||||
if (!window.Worker) {
|
|
||||||
displayResults(search(query));
|
|
||||||
} else {
|
|
||||||
searchWorker.postMessage({query: query});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Clear results for short queries
|
|
||||||
displayResults([]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function initSearch () {
|
|
||||||
var search_input = document.getElementById('mkdocs-search-query');
|
|
||||||
if (search_input) {
|
|
||||||
search_input.addEventListener("keyup", doSearch);
|
|
||||||
}
|
|
||||||
var term = getSearchTermFromLocation();
|
|
||||||
if (term) {
|
|
||||||
search_input.value = term;
|
|
||||||
doSearch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onWorkerMessage (e) {
|
|
||||||
if (e.data.allowSearch) {
|
|
||||||
initSearch();
|
|
||||||
} else if (e.data.results) {
|
|
||||||
var results = e.data.results;
|
|
||||||
displayResults(results);
|
|
||||||
} else if (e.data.config) {
|
|
||||||
min_search_length = e.data.config.min_search_length-1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!window.Worker) {
|
|
||||||
console.log('Web Worker API not supported');
|
|
||||||
// load index in main thread
|
|
||||||
$.getScript(joinUrl(base_url, "search/worker.js")).done(function () {
|
|
||||||
console.log('Loaded worker');
|
|
||||||
init();
|
|
||||||
window.postMessage = function (msg) {
|
|
||||||
onWorkerMessage({data: msg});
|
|
||||||
};
|
|
||||||
}).fail(function (jqxhr, settings, exception) {
|
|
||||||
console.error('Could not load worker.js');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// Wrap search in a web worker
|
|
||||||
var searchWorker = new Worker(joinUrl(base_url, "search/worker.js"));
|
|
||||||
searchWorker.postMessage({init: true});
|
|
||||||
searchWorker.onmessage = onWorkerMessage;
|
|
||||||
}
|
|