You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ poetry shell
62
62
poetry install
63
63
```
64
64
65
-
To exploit the fast implementations of dingo, you have to install the [Gurobi solver](https://www.gurobi.com/). Run
65
+
You can install the [Gurobi solver](https://www.gurobi.com/) for faster linear programming optimization. Run
66
66
67
67
```
68
68
pip3 install -i https://pypi.gurobi.com gurobipy
@@ -75,7 +75,7 @@ Then, you will need a [license](https://www.gurobi.com/downloads/end-user-licens
75
75
76
76
## Unit tests
77
77
78
-
Now, you can run the unit tests by the following commands:
78
+
Now, you can run the unit tests by the following commands (with the default solver `highs`):
79
79
```
80
80
python3 tests/fba.py
81
81
python3 tests/full_dimensional.py
@@ -87,7 +87,12 @@ python3 tests/sampling.py
87
87
88
88
If you have installed Gurobi successfully, then run
89
89
```
90
-
python3 tests/fast_implementation_test.py
90
+
python3 tests/fba.py gurobi
91
+
python3 tests/full_dimensional.py gurobi
92
+
python3 tests/max_ball.py gurobi
93
+
python3 tests/scaling.py gurobi
94
+
python3 tests/rounding.py gurobi
95
+
python3 tests/sampling.py gurobi
91
96
```
92
97
93
98
## Tutorial
@@ -184,21 +189,16 @@ The MCMC methods that dingo (through `volesti` library) provides are the followi
184
189
185
190
186
191
192
+
#### Switch the linear programming solver
187
193
188
-
189
-
#### Fast and slow mode
190
-
191
-
If you have installed successfully the `gurobi` library, dingo turns to the *fast mode* by default. To set a certain mode you could use the following member functions,
194
+
We use `pyoptinterface` to interface with the linear programming solvers. To switch the solver that `dingo` uses, you can use the `set_default_solver` function. The default solver is `highs` and you can switch to `gurobi` by running,
192
195
193
196
```python
194
-
sampler = polytope_sampler(model)
195
-
196
-
#set fast mode to use gurobi library
197
-
sampler.set_fast_mode()
198
-
#set slow mode to use scipy functions
199
-
sampler.set_slow_mode()
197
+
from dingo import set_default_solver
198
+
set_default_solver("gurobi")
200
199
```
201
200
201
+
You can also switch to other solvers that `pyoptinterface` supports, but we recommend using `highs` or `gurobi`. If you have issues with the solver, you can check the `pyoptinterface`[documentation](https://metab0t.github.io/PyOptInterface/getting_started.html).
Copy file name to clipboardExpand all lines: tutorials/dingo_tutorial.ipynb
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -463,7 +463,8 @@
463
463
"%pip install sparseqr &> /dev/null\n",
464
464
"%pip install Cython &> /dev/null\n",
465
465
"%pip install cobra &> /dev/null\n",
466
-
"%pip install kaleido &> /dev/null"
466
+
"%pip install kaleido &> /dev/null\n",
467
+
"%pip install pyoptinterface[highs] &> /dev/null"
467
468
]
468
469
},
469
470
{
@@ -611,7 +612,7 @@
611
612
"id": "rWJ00dGySfol"
612
613
},
613
614
"source": [
614
-
"If you look at the output of that command, you should see that every test passed, with the possible exception of `fast_implementation_test` if you haven't installed Gurobi.\n"
615
+
"If you look at the output of that command, you should see that every test passed.\n"
0 commit comments