mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-08 10:28:52 -06:00
Split documentation into separate pages
This commit is contained in:
17
docs/customization.md
Normal file
17
docs/customization.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Customization
|
||||
|
||||
|
||||
### 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:
|
||||
```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)
|
||||
```
|
||||
Reference in New Issue
Block a user