Skip to content

Commit 25e2972

Browse files
committed
code: include merge conflicts
2 parents 32617a4 + 65799de commit 25e2972

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

linopy/solvers.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,9 +1975,7 @@ def set_param_by_name(kc: Any, name: str, value: Any) -> None:
19751975
def get_solver_solution() -> Solution:
19761976
# Get objective value
19771977
try:
1978-
obj_val, obj_rc = unpack_value_and_rc(
1979-
knitro.KN_get_obj_value(kc)
1980-
)
1978+
obj_val, obj_rc = unpack_value_and_rc(knitro.KN_get_obj_value(kc))
19811979
objective = float(obj_val) if obj_rc == 0 else np.nan
19821980
except Exception:
19831981
objective = np.nan
@@ -2004,9 +2002,7 @@ def get_solver_solution() -> Solution:
20042002
else:
20052003
var_names = [f"x{i}" for i in range(n_vars)]
20062004

2007-
sol = pd.Series(
2008-
x_val, index=var_names, dtype=float
2009-
)
2005+
sol = pd.Series(x_val, index=var_names, dtype=float)
20102006
else:
20112007
sol = pd.Series(dtype=float)
20122008
else:

0 commit comments

Comments
 (0)