Closed wupeng1998 closed 1 year ago
You can now do this in the latest version (1.5.2). Just use --solver gurobi
:)
I am having issues setting gurobi as my solver.
This is my input;
carve --dna genomic.fna --init M9 --solver gurobi --fbc2 -o carved_model.xml
Which produces the following error:
Traceback (most recent call last):
File "C:\Users\mol131\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\mol131\Anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\mol131\Anaconda3\Scripts\carve.exe\__main__.py", line 4, in <module>
File "C:\Users\mol131\Anaconda3\lib\site-packages\carveme\__init__.py", line 14, in <module>
set_default_solver(config.get('solver', 'default_solver'))
File "C:\Users\mol131\Anaconda3\lib\site-packages\reframed\solvers\__init__.py", line 82, in set_default_solver
raise RuntimeError(f"Solver {solvername} not available.")
RuntimeError: Solver cplex not available.
Thanks for your help
Hey @jmol0917,
I found the same error, I think due to a single uncommented line. See this issue
Cheers
Thanks @Robaina! That solved my issue
I have some problems when using cplex. How can I change the default solver of carveme to gurobi?