Open yaccos opened 2 years ago
@yaccos May I ask a rather silly question about solver. How could I make the reframed to the gurobi solver which I have installed and tested?
I have tried the set_default_solver, but it didn't work. However, I have the /gurobi951/linux64/bin in the path. I am using v1.2.1.
from reframed import *
set_default_solver("gurobi")
RuntimeError: Solver gurobi not available.
Thanks!
Have you tried interfacing directly with gurobipy
? Try running
from gurobipy import Model
Model()
and see whether you get any error messages. If you get an ImportError
, please follow these instructions: https://support.gurobi.com/hc/en-us/articles/360044290292-How-do-I-install-Gurobi-for-Python-
Thanks for the quick updates! I guess you mean from gurobipy import Model
? Yes, grobipy worked.
I just relealized I installed reframed
via pip install gurobipy
, which gives the latest version of 1.2.1. However, the master branch is ahead of the released version.
After uninsalling old released version and installing the current master, test examples worked smoothly without need of any further configurations. I hope not to run into othe configuration issures in the future.
When I work with solutions generated by
reframed
, I often have to look into the optimization status. This becomes a little tricky when the status enumeration is hidden deep into the API. Here is an example:Instead of writing
reframed.solvers.solution.Status.OPTIMAL
I would think it would be sufficient to access it withreframed.Status.OPTIMAL
.