mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 17:38:51 -06:00
Remove obsolete methods
This commit is contained in:
@@ -155,11 +155,6 @@ class BasePyomoSolver(InternalSolver):
|
||||
"slack",
|
||||
]
|
||||
|
||||
@overrides
|
||||
def get_dual(self, cid: str) -> float:
|
||||
constr = self._cname_to_constr[cid]
|
||||
return self._pyomo_solver.dual[constr]
|
||||
|
||||
@overrides
|
||||
def get_solution(self) -> Optional[Solution]:
|
||||
assert self.model is not None
|
||||
@@ -173,21 +168,6 @@ class BasePyomoSolver(InternalSolver):
|
||||
solution[f"{var}[{index}]"] = var[index].value
|
||||
return solution
|
||||
|
||||
@overrides
|
||||
def get_variable_names(self) -> List[VariableName]:
|
||||
assert self.model is not None
|
||||
variables: List[VariableName] = []
|
||||
for var in self.model.component_objects(Var):
|
||||
for index in var:
|
||||
if var[index].fixed:
|
||||
continue
|
||||
variables += [f"{var}[{index}]"]
|
||||
return variables
|
||||
|
||||
@overrides
|
||||
def get_sense(self) -> str:
|
||||
return self._obj_sense
|
||||
|
||||
@overrides
|
||||
def get_variables(self) -> Dict[str, Variable]:
|
||||
assert self.model is not None
|
||||
|
||||
Reference in New Issue
Block a user