Skip to content

Commit e89128c

Browse files
authored
Update documentation for PR#104 (#106)
1 parent c0b5eae commit e89128c

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ poetry shell
6262
poetry install
6363
```
6464

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
6666

6767
```
6868
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
7575

7676
## Unit tests
7777

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`):
7979
```
8080
python3 tests/fba.py
8181
python3 tests/full_dimensional.py
@@ -87,7 +87,12 @@ python3 tests/sampling.py
8787

8888
If you have installed Gurobi successfully, then run
8989
```
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
9196
```
9297

9398
## Tutorial
@@ -184,21 +189,16 @@ The MCMC methods that dingo (through `volesti` library) provides are the followi
184189

185190

186191

192+
#### Switch the linear programming solver
187193

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,
192195

193196
```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")
200199
```
201200

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).
202202

203203
### Apply FBA and FVA methods
204204

tutorials/dingo_tutorial.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,8 @@
463463
"%pip install sparseqr &> /dev/null\n",
464464
"%pip install Cython &> /dev/null\n",
465465
"%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"
467468
]
468469
},
469470
{
@@ -611,7 +612,7 @@
611612
"id": "rWJ00dGySfol"
612613
},
613614
"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"
615616
]
616617
},
617618
{

0 commit comments

Comments
 (0)