Skip to content

Commit

Permalink
solve typing issues and move util methods to functions in solvers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel.rdt committed Sep 23, 2024
1 parent 40de2b8 commit 53d6f3f
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 74 deletions.
2 changes: 1 addition & 1 deletion linopy/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Result:

status: Status
solution: Union[Solution, None] = None
solver_model: Union[Any, None] = None
solver_model: Any = None

def __repr__(self) -> str:
solver_model_string = (
Expand Down
5 changes: 4 additions & 1 deletion linopy/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
)
from linopy.matrices import MatrixAccessor
from linopy.objective import Objective
from linopy.solvers import available_solvers, quadratic_solvers
from linopy.solvers import available_solvers, quadratic_solvers, Solver
from linopy.types import (
ConstantLike,
ConstraintLike,
Expand Down Expand Up @@ -79,6 +79,9 @@ class Model:
the optimization process.
"""

solver_model: Any
solver_name: str

__slots__ = (
# containers
"_variables",
Expand Down
Loading

0 comments on commit 53d6f3f

Please sign in to comment.