File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 4848 "mosek" ,
4949 "copt" ,
5050 "mindopt" ,
51+ "knitro"
5152]
5253
5354# Solvers that don't need a solution file when keep_files=False
@@ -145,6 +146,9 @@ class xpress_Namespaces: # type: ignore[no-redef]
145146 except coptpy .CoptError :
146147 pass
147148
149+ with contextlib .suppress (ModuleNotFoundError , ImportError ):
150+ import knitro
151+
148152quadratic_solvers = [s for s in QUADRATIC_SOLVERS if s in available_solvers ]
149153logger = logging .getLogger (__name__ )
150154
@@ -176,6 +180,7 @@ class SolverName(enum.Enum):
176180 COPT = "copt"
177181 MindOpt = "mindopt"
178182 PIPS = "pips"
183+ Knitro = "knitro"
179184
180185
181186def path_to_string (path : Path ) -> str :
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ docs = [
5858 " gurobipy==11.0.2" ,
5959 " ipykernel==6.29.5" ,
6060 " matplotlib==3.9.1" ,
61+ " knitro>=15.0.1" ,
6162]
6263dev = [
6364 " pytest" ,
@@ -70,6 +71,7 @@ dev = [
7071 " types-requests" ,
7172 " gurobipy" ,
7273 " highspy" ,
74+ " knitro" ,
7375]
7476solvers = [
7577 " gurobipy" ,
@@ -81,6 +83,7 @@ solvers = [
8183 " coptpy!=7.2.1" ,
8284 " xpress; platform_system != 'Darwin' and python_version < '3.11'" ,
8385 " pyscipopt; platform_system != 'Darwin'" ,
86+ " knitro>=15.0.1" ,
8487]
8588
8689[tool .setuptools .packages .find ]
You can’t perform that action at this time.
0 commit comments