Skip to content

Commit 9c45c37

Browse files
committed
highs.py: formatting with black
1 parent c2c752d commit 9c45c37

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

mip/highs.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
else:
2424
# Try library from highsbox, which is optional dependency.
2525
import highsbox
26+
2627
root = highsbox.highs_dist_dir()
2728

2829
# Need library matching operating system.
@@ -1098,7 +1099,9 @@ def set_max_nodes(self: "SolverHighs", max_nodes: int):
10981099
def get_max_nodes_same_incumbent(self: "SolverHighs") -> int:
10991100
return self._get_int_option_value("mip_max_stall_nodes")
11001101

1101-
def set_max_nodes_same_incumbent(self: "SolverHighs", max_nodes_same_incumbent: int):
1102+
def set_max_nodes_same_incumbent(
1103+
self: "SolverHighs", max_nodes_same_incumbent: int
1104+
):
11021105
self._set_int_option_value("mip_max_stall_nodes", max_nodes_same_incumbent)
11031106

11041107
def set_num_threads(self: "SolverHighs", threads: int):
@@ -1333,7 +1336,7 @@ def constr_get_index(self: "SolverHighs", name: str) -> int:
13331336
if status == STATUS_ERROR:
13341337
# This means that no constraint with that name was found. Unfortunately,
13351338
# Highs: getRowByName doesn't assign a value to idx in that case.
1336-
return -1
1339+
return -1
13371340
return idx[0]
13381341

13391342
# Variable-related getters/setters
@@ -1556,7 +1559,9 @@ def _get_dual_solution_status(self: "SolverHighs"):
15561559
return self._get_int_info_value("dual_solution_status")
15571560

15581561
def _has_dual_solution(self: "SolverHighs"):
1559-
return self._get_dual_solution_status() == self._lib.kHighsSolutionStatusFeasible
1562+
return (
1563+
self._get_dual_solution_status() == self._lib.kHighsSolutionStatusFeasible
1564+
)
15601565

15611566
def get_status(self: "SolverHighs") -> mip.OptimizationStatus:
15621567
OS = mip.OptimizationStatus
@@ -1584,7 +1589,9 @@ def get_status(self: "SolverHighs") -> mip.OptimizationStatus:
15841589
status = status_map[highs_status]
15851590
if status is None:
15861591
# depends on solution status
1587-
status = OS.FEASIBLE if self._has_primal_solution() else OS.NO_SOLUTION_FOUND
1592+
status = (
1593+
OS.FEASIBLE if self._has_primal_solution() else OS.NO_SOLUTION_FOUND
1594+
)
15881595
return status
15891596

15901597
def cgraph_density(self: "SolverHighs") -> float:

0 commit comments

Comments
 (0)