You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
443 lines
28 KiB
443 lines
28 KiB
<!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>Usage - MIPLearn</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="..">MIPLearn</a>
|
|
|
|
</div>
|
|
|
|
<!-- Expanded navigation -->
|
|
<div class="navbar-collapse collapse">
|
|
<!-- Main navigation -->
|
|
<ul class="nav navbar-nav">
|
|
|
|
|
|
<li >
|
|
<a href="..">Home</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li class="active">
|
|
<a href="./">Usage</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li >
|
|
<a href="../benchmark/">Benchmark</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li >
|
|
<a href="../problems/">Problems</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li >
|
|
<a href="../customization/">Customization</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li >
|
|
<a href="../about/">About</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li >
|
|
<a href="../api/miplearn/index.html">API</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 rel="prev" href="..">
|
|
<i class="fas fa-arrow-left"></i> Previous
|
|
</a>
|
|
</li>
|
|
<li >
|
|
<a rel="next" href="../benchmark/">
|
|
Next <i class="fas fa-arrow-right"></i>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://github.com/ANL-CEEESA/MIPLearn/edit/dev/docs/usage.md"><i class="fab fa-github"></i> Edit on GitHub</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
|
|
|
|
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
|
|
<ul class="nav bs-sidenav">
|
|
<li class="first-level active"><a href="#usage">Usage</a></li>
|
|
<li class="second-level"><a href="#1-installation">1. Installation</a></li>
|
|
|
|
<li class="second-level"><a href="#2-using-learningsolver">2. Using LearningSolver</a></li>
|
|
|
|
<li class="second-level"><a href="#3-describing-problem-instances">3. Describing problem instances</a></li>
|
|
|
|
<li class="second-level"><a href="#4-describing-lazy-constraints">4. Describing lazy constraints</a></li>
|
|
|
|
<li class="third-level"><a href="#41-adding-lazy-constraints-through-annotations">4.1 Adding lazy constraints through annotations</a></li>
|
|
<li class="third-level"><a href="#42-adding-lazy-constraints-through-callbacks">4.2 Adding lazy constraints through callbacks</a></li>
|
|
<li class="second-level"><a href="#5-obtaining-heuristic-solutions">5. Obtaining heuristic solutions</a></li>
|
|
|
|
<li class="second-level"><a href="#6-scaling-up">6. Scaling Up</a></li>
|
|
|
|
<li class="third-level"><a href="#61-saving-and-loading-solver-state">6.1 Saving and loading solver state</a></li>
|
|
<li class="third-level"><a href="#62-solving-instances-in-parallel">6.2 Solving instances in parallel</a></li>
|
|
<li class="third-level"><a href="#63-solving-instances-from-the-disk">6.3 Solving instances from the disk</a></li>
|
|
<li class="second-level"><a href="#7-current-limitations">7. Current Limitations</a></li>
|
|
|
|
</ul>
|
|
</div></div>
|
|
<div class="col-md-9" role="main">
|
|
|
|
<h1 id="usage">Usage</h1>
|
|
<h2 id="1-installation">1. Installation</h2>
|
|
<p>In these docs, we describe the Python/Pyomo version of the package, although a <a href="https://github.com/ANL-CEEESA/MIPLearn.jl">Julia/JuMP version</a> is also available. A mixed-integer solver is also required and its Python bindings must be properly installed. Supported solvers are currently CPLEX and Gurobi.</p>
|
|
<p>To install MIPLearn, run: </p>
|
|
<pre><code class="language-bash">pip3 install miplearn
|
|
</code></pre>
|
|
<p>After installation, the package <code>miplearn</code> should become available to Python. It can be imported
|
|
as follows:</p>
|
|
<pre><code class="language-python">import miplearn
|
|
</code></pre>
|
|
<h2 id="2-using-learningsolver">2. Using <code>LearningSolver</code></h2>
|
|
<p>The main class provided by this package is <code>LearningSolver</code>, a learning-enhanced MIP solver which uses information from previously solved instances to accelerate the solution of new instances. The following example shows its basic usage:</p>
|
|
<pre><code class="language-python">from miplearn import LearningSolver
|
|
|
|
# List of user-provided instances
|
|
training_instances = [...]
|
|
test_instances = [...]
|
|
|
|
# Create solver
|
|
solver = LearningSolver()
|
|
|
|
# Solve all training instances
|
|
for instance in training_instances:
|
|
solver.solve(instance)
|
|
|
|
# Learn from training instances
|
|
solver.fit(training_instances)
|
|
|
|
# Solve all test instances
|
|
for instance in test_instances:
|
|
solver.solve(instance)
|
|
</code></pre>
|
|
<p>In this example, we have two lists of user-provided instances: <code>training_instances</code> and <code>test_instances</code>. We start by solving all training instances. Since there is no historical information available at this point, the instances will be processed from scratch, with no ML acceleration. After solving each instance, the solver stores within each <code>instance</code> object the optimal solution, the optimal objective value, and other information that can be used to accelerate future solves. After all training instances are solved, we call <code>solver.fit(training_instances)</code>. This instructs the solver to train all its internal machine-learning models based on the solutions of the (solved) trained instances. Subsequent calls to <code>solver.solve(instance)</code> will automatically use the trained Machine Learning models to accelerate the solution process.</p>
|
|
<h2 id="3-describing-problem-instances">3. Describing problem instances</h2>
|
|
<p>Instances to be solved by <code>LearningSolver</code> must derive from the abstract class <code>miplearn.Instance</code>. The following three abstract methods must be implemented:</p>
|
|
<ul>
|
|
<li><code>instance.to_model()</code>, which returns a concrete Pyomo model corresponding to the instance;</li>
|
|
<li><code>instance.get_instance_features()</code>, which returns a 1-dimensional Numpy array of (numerical) features describing the entire instance;</li>
|
|
<li><code>instance.get_variable_features(var_name, index)</code>, which returns a 1-dimensional array of (numerical) features describing a particular decision variable.</li>
|
|
</ul>
|
|
<p>The first method is used by <code>LearningSolver</code> to construct a concrete Pyomo model, which will be provided to the internal MIP solver. The second and third methods provide an encoding of the instance, which can be used by the ML models to make predictions. In the knapsack problem, for example, an implementation may decide to provide as instance features the average weights, average prices, number of items and the size of the knapsack. The weight and the price of each individual item could be provided as variable features. See <code>src/python/miplearn/problems/knapsack.py</code> for a concrete example.</p>
|
|
<p>An optional method which can be implemented is <code>instance.get_variable_category(var_name, index)</code>, which returns a category (a string, an integer or any hashable type) for each decision variable. If two variables have the same category, <code>LearningSolver</code> will use the same internal ML model to predict the values of both variables. By default, all variables belong to the <code>"default"</code> category, and therefore only one ML model is used for all variables. If the returned category is <code>None</code>, ML predictors will ignore the variable.</p>
|
|
<p>It is not necessary to have a one-to-one correspondence between features and problem instances. One important (and deliberate) limitation of MIPLearn, however, is that <code>get_instance_features()</code> must always return arrays of same length for all relevant instances of the problem. Similarly, <code>get_variable_features(var_name, index)</code> must also always return arrays of same length for all variables in each category. It is up to the user to decide how to encode variable-length characteristics of the problem into fixed-length vectors. In graph problems, for example, graph embeddings can be used to reduce the (variable-length) lists of nodes and edges into a fixed-length structure that still preserves some properties of the graph. Different instance encodings may have significant impact on performance.</p>
|
|
<h2 id="4-describing-lazy-constraints">4. Describing lazy constraints</h2>
|
|
<p>For many MIP formulations, it is not desirable to add all constraints up-front, either because the total number of constraints is very large, or because some of the constraints, even in relatively small numbers, can still cause significant performance impact when added to the formulation. In these situations, it may be desirable to generate and add constraints incrementaly, during the solution process itself. Conventional MIP solvers typically start by solving the problem without any lazy constraints. Whenever a candidate solution is found, the solver finds all violated lazy constraints and adds them to the formulation. MIPLearn significantly accelerates this process by using ML to predict which lazy constraints should be enforced from the very beginning of the optimization process, even before a candidate solution is available.</p>
|
|
<p>MIPLearn supports two types of lazy constraints: through constraint annotations and through callbacks.</p>
|
|
<h3 id="41-adding-lazy-constraints-through-annotations">4.1 Adding lazy constraints through annotations</h3>
|
|
<p>The easiest way to create lazy constraints in MIPLearn is to add them to the model (just like any regular constraints), then annotate them as lazy, as described below. Just before the optimization starts, MIPLearn removes all lazy constraints from the model and places them in a lazy constraint pool. If any trained ML models are available, MIPLearn queries these models to decide which of these constraints should be moved back into the formulation. After this step, the optimization starts, and lazy constraints from the pool are added to the model in the conventional fashion.</p>
|
|
<p>To tag a constraint as lazy, the following methods must be implemented:</p>
|
|
<ul>
|
|
<li><code>instance.has_static_lazy_constraints()</code>, which returns <code>True</code> if the model has any annotated lazy constraints. By default, this method returns <code>False</code>.</li>
|
|
<li><code>instance.is_constraint_lazy(cid)</code>, which returns <code>True</code> if the constraint with name <code>cid</code> should be treated as a lazy constraint, and <code>False</code> otherwise.</li>
|
|
<li><code>instance.get_constraint_features(cid)</code>, which returns a 1-dimensional Numpy array of (numerical) features describing the constraint.</li>
|
|
</ul>
|
|
<p>For instances such that <code>has_lazy_constraints</code> returns <code>True</code>, MIPLearn calls <code>is_constraint_lazy</code> for each constraint in the formulation, providing the name of the constraint. For constraints such that <code>is_constraint_lazy</code> returns <code>True</code>, MIPLearn additionally calls <code>get_constraint_features</code> to gather a ML representation of each constraint. These features are used to predict which lazy constraints should be initially enforced.</p>
|
|
<p>An additional method that can be implemented is <code>get_lazy_constraint_category(cid)</code>, which returns a category (a string or any other hashable type) for each lazy constraint. Similarly to decision variable categories, if two lazy constraints have the same category, then MIPLearn will use the same internal ML model to decide whether to initially enforce them. By default, all lazy constraints belong to the <code>"default"</code> category, and therefore a single ML model is used.</p>
|
|
<div class="admonition warning">
|
|
<p class="admonition-title">Warning</p>
|
|
<p>If two lazy constraints belong to the same category, their feature vectors should have the same length.</p>
|
|
</div>
|
|
<h3 id="42-adding-lazy-constraints-through-callbacks">4.2 Adding lazy constraints through callbacks</h3>
|
|
<p>Although convenient, the method described in the previous subsection still requires the generation of all lazy constraints ahead of time, which can be prohibitively expensive. An alternative method is through a lazy constraint callbacks, described below. During the solution process, MIPLearn will repeatedly call a user-provided function to identify any violated lazy constraints. If violated constraints are identified, MIPLearn will additionally call another user-provided function to generate the constraint and add it to the formulation.</p>
|
|
<p>To describe lazy constraints through user callbacks, the following methods need to be implemented:</p>
|
|
<ul>
|
|
<li><code>instance.has_dynamic_lazy_constraints()</code>, which returns <code>True</code> if the model has any lazy constraints generated by user callbacks. By default, this method returns <code>False</code>.</li>
|
|
<li><code>instance.find_violated_lazy_constraints(model)</code>, which returns a list of identifiers corresponding to the lazy constraints found to be violated by the current solution. These identifiers should be strings, tuples or any other hashable type.</li>
|
|
<li><code>instance.build_violated_lazy_constraints(model, cid)</code>, which returns either a list of Pyomo constraints, or a single Pyomo constraint, corresponding to the given lazy constraint identifier.</li>
|
|
<li><code>instance.get_constraint_features(cid)</code>, which returns a 1-dimensional Numpy array of (numerical) features describing the constraint. If this constraint is not valid, returns <code>None</code>.</li>
|
|
<li><code>instance.get_lazy_constraint_category(cid)</code>, which returns a category (a string or any other hashable type) for each lazy constraint, indicating which ML model to use. By default, returns <code>"default"</code>.</li>
|
|
</ul>
|
|
<p>Assuming that trained ML models are available, immediately after calling <code>solver.solve</code>, MIPLearn will call <code>get_constraint_features</code> for each lazy constraint identifier found in the training set. For constraints such that <code>get_constraint_features</code> returns a vector (instead of <code>None</code>), MIPLearn will call <code>get_constraint_category</code> to decide which trained ML model to use. It will then query the ML model to decide whether the constraint should be initially enforced. Assuming that the ML predicts this constraint will be necessary, MIPLearn calls <code>build_violated_constraints</code> then adds the returned list of Pyomo constraints to the model. The optimization then starts. When no trained ML models are available, this entire initial process is skipped, and MIPLearn behaves like a conventional solver.</p>
|
|
<p>After the optimization process starts, MIPLearn will periodically call <code>find_violated_lazy_constraints</code> to verify if the current solution violates any lazy constraints. If any violated lazy constraints are found, MIPLearn will call the method <code>build_violated_lazy_constraints</code> and add the returned constraints to the formulation.</p>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>When implementing <code>find_violated_lazy_constraints(self, model)</code>, the current solution may be accessed through <code>self.solution[var_name][index]</code>.</p>
|
|
</div>
|
|
<h2 id="5-obtaining-heuristic-solutions">5. Obtaining heuristic solutions</h2>
|
|
<p>By default, <code>LearningSolver</code> uses Machine Learning to accelerate the MIP solution process, while maintaining all optimality guarantees provided by the MIP solver. In the default mode of operation, for example, predicted optimal solutions are used only as MIP starts.</p>
|
|
<p>For more significant performance benefits, <code>LearningSolver</code> can also be configured to place additional trust in the Machine Learning predictors, by using the <code>mode="heuristic"</code> constructor argument. When operating in this mode, if a ML model is statistically shown (through <em>stratified k-fold cross validation</em>) to have exceptionally high accuracy, the solver may decide to restrict the search space based on its predictions. The parts of the solution which the ML models cannot predict accurately will still be explored using traditional (branch-and-bound) methods. For particular applications, this mode has been shown to quickly produce optimal or near-optimal solutions (see <a href="../about/#references">references</a> and <a href="../benchmark/">benchmark results</a>).</p>
|
|
<div class="admonition danger">
|
|
<p class="admonition-title">Danger</p>
|
|
<p>The <code>heuristic</code> mode provides no optimality guarantees, and therefore should only be used if the solver is first trained on a large and representative set of training instances. Training on a small or non-representative set of instances may produce low-quality solutions, or make the solver incorrectly classify new instances as infeasible.</p>
|
|
</div>
|
|
<h2 id="6-scaling-up">6. Scaling Up</h2>
|
|
<h3 id="61-saving-and-loading-solver-state">6.1 Saving and loading solver state</h3>
|
|
<p>After solving a large number of training instances, it may be desirable to save the current state of <code>LearningSolver</code> to disk, so that the solver can still use the acquired knowledge after the application restarts. This can be accomplished by using the standard <code>pickle</code> module, as the following example illustrates:</p>
|
|
<pre><code class="language-python">from miplearn import LearningSolver
|
|
import pickle
|
|
|
|
# Solve training instances
|
|
training_instances = [...]
|
|
solver = LearningSolver()
|
|
for instance in training_instances:
|
|
solver.solve(instance)
|
|
|
|
# Train machine-learning models
|
|
solver.fit(training_instances)
|
|
|
|
# Save trained solver to disk
|
|
with open("solver.pickle", "wb") as file:
|
|
pickle.dump(solver, file)
|
|
|
|
# Application restarts...
|
|
|
|
# Load trained solver from disk
|
|
with open("solver.pickle", "rb") as file:
|
|
solver = pickle.load(file)
|
|
|
|
# Solve additional instances
|
|
test_instances = [...]
|
|
for instance in test_instances:
|
|
solver.solve(instance)
|
|
</code></pre>
|
|
<h3 id="62-solving-instances-in-parallel">6.2 Solving instances in parallel</h3>
|
|
<p>In many situations, instances can be solved in parallel to accelerate the training process. <code>LearningSolver</code> provides the method <code>parallel_solve(instances)</code> to easily achieve this:</p>
|
|
<pre><code class="language-python">from miplearn import LearningSolver
|
|
|
|
training_instances = [...]
|
|
solver = LearningSolver()
|
|
solver.parallel_solve(training_instances, n_jobs=4)
|
|
solver.fit(training_instances)
|
|
|
|
# Test phase...
|
|
test_instances = [...]
|
|
solver.parallel_solve(test_instances)
|
|
</code></pre>
|
|
<h3 id="63-solving-instances-from-the-disk">6.3 Solving instances from the disk</h3>
|
|
<p>In all examples above, we have assumed that instances are available as Python objects, stored in memory. When problem instances are very large, or when there is a large number of problem instances, this approach may require an excessive amount of memory. To reduce memory requirements, MIPLearn can also operate on instances that are stored on disk. More precisely, the methods <code>fit</code>, <code>solve</code> and <code>parallel_solve</code> in <code>LearningSolver</code> can operate on filenames (or lists of filenames) instead of instance objects, as the next example illustrates.
|
|
Instance files must be pickled instance objects. The method <code>solve</code> loads at most one instance to memory at a time, while <code>parallel_solve</code> loads at most <code>n_jobs</code> instances.</p>
|
|
<pre><code class="language-python">from miplearn import LearningSolver
|
|
|
|
# Construct and pickle 600 problem instances
|
|
for i in range(600):
|
|
instance = CustomInstance([...])
|
|
with open("instance_%03d.pkl" % i, "w") as file:
|
|
pickle.dump(instance, obj)
|
|
|
|
# Split instances into training and test
|
|
test_instances = ["instance_%03d.pkl" % i for i in range(500)]
|
|
train_instances = ["instance_%03d.pkl" % i for i in range(500, 600)]
|
|
|
|
# Create solver
|
|
solver = LearningSolver([...])
|
|
|
|
# Solve training instances
|
|
solver.parallel_solve(train_instances, n_jobs=4)
|
|
|
|
# Train ML models
|
|
solver.fit(train_instances)
|
|
|
|
# Solve test instances
|
|
solver.parallel_solve(test_instances, n_jobs=4)
|
|
</code></pre>
|
|
<p>By default, <code>solve</code> and <code>parallel_solve</code> modify files in place. That is, after the instances are loaded from disk and solved, MIPLearn writes them back to the disk, overwriting the original files. To write to an alternative file instead, the argument <code>output</code> may be used. In <code>solve</code>, this argument should be a single filename. In <code>parallel_solve</code>, it should be a list, containing exactly as many filenames as instances. If <code>output</code> is <code>None</code>, the modifications are simply discarded. This can be useful, for example, during benchmarks.</p>
|
|
<pre><code class="language-python"># Solve a single instance file and store the output to another file
|
|
solver.solve("knapsack_1.orig.pkl", output="knapsack_1.solved.pkl")
|
|
|
|
# Solve a list of instance files
|
|
instances = ["knapsack_%03d.orig.pkl" % i for i in range(100)]
|
|
output = ["knapsack_%03d.solved.pkl" % i for i in range(100)]
|
|
solver.parallel_solve(instances, output=output)
|
|
|
|
# Solve instances and discard solutions and training data
|
|
solver.parallel_solve(instances, output=None)
|
|
</code></pre>
|
|
<h2 id="7-current-limitations">7. Current Limitations</h2>
|
|
<ul>
|
|
<li>Only binary and continuous decision variables are currently supported. General integer variables are not currently supported by all solver components.</li>
|
|
</ul></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>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>
|