From 71ac2cb11186ac5cead90575fe8b7f13bcfd4e95 Mon Sep 17 00:00:00 2001 From: Alinson S Xavier Date: Sat, 22 Feb 2020 20:23:33 -0600 Subject: [PATCH] Documentation: update supported solvers and solver customization --- docs-src/customization.md | 14 +- docs-src/usage.md | 2 +- docs/404.html | 30 ++-- docs/about/index.html | 30 ++-- docs/benchmark/index.html | 30 ++-- docs/css/cinder.css | 18 +- docs/css/cinder.min.css | 2 +- docs/customization/index.html | 43 ++--- docs/index.html | 32 ++-- docs/js/base.js | 324 ++++++++++++++++------------------ docs/problems/index.html | 32 ++-- docs/search/search_index.json | 2 +- docs/sitemap.xml | 12 +- docs/sitemap.xml.gz | Bin 198 -> 197 bytes docs/usage/index.html | 32 ++-- 15 files changed, 281 insertions(+), 322 deletions(-) diff --git a/docs-src/customization.md b/docs-src/customization.md index 2aecb14..2ffb60a 100644 --- a/docs-src/customization.md +++ b/docs-src/customization.md @@ -3,15 +3,11 @@ ### Selecting the internal MIP solver -By default, `LearningSolver` uses [Gurobi](https://www.gurobi.com/) as its internal MIP solver. Alternative solvers can be specified through the `internal_solver_factory` constructor argument. This argument should provide a function (with no arguments) that constructs, configures and returns the desired solver. To select CPLEX, for example: +By default, `LearningSolver` uses [Gurobi](https://www.gurobi.com/) as its internal MIP solver. Another supported solver is [IBM ILOG CPLEX](https://www.ibm.com/products/ilog-cplex-optimization-studio). To switch between solvers, use the `solver` constructor argument, as shown below. It is also possible to specify a time limit (in seconds) and a relative MIP gap tolerance. + ```python from miplearn import LearningSolver -import pyomo.environ as pe - -def cplex_factory(): - cplex = pe.SolverFactory("cplex") - cplex.options["threads"] = 4 - return cplex - -solver = LearningSolver(internal_solver_factory=cplex_factory) +solver = LearningSolver(solver="cplex", + time_limit=300, + gap_tolerance=1e-3) ``` diff --git a/docs-src/usage.md b/docs-src/usage.md index 32bd134..801f20c 100644 --- a/docs-src/usage.md +++ b/docs-src/usage.md @@ -108,4 +108,4 @@ After all training instances have been solved in parallel, the ML models can be * Only binary and continuous decision variables are currently supported. * Solver callbacks (lazy constraints, cutting planes) are not currently supported. -* Only `gurobi_persistent` is currently fully supported by all solver components. Other solvers may work if some components are disabled. \ No newline at end of file +* Only Gurobi and CPLEX are currently supported as internal MIP solvers. \ No newline at end of file diff --git a/docs/404.html b/docs/404.html index 79b6b0b..456b56a 100644 --- a/docs/404.html +++ b/docs/404.html @@ -14,14 +14,16 @@ MIPLearn - + + - + - + + - - - @@ -139,17 +132,17 @@

- Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.
+ Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.
- Documentation built with MkDocs.

+ Documentation built with MkDocs. +

- - + @@ -161,8 +154,11 @@