mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 17:38:51 -06:00
Replace Hashable by str
This commit is contained in:
@@ -6,7 +6,7 @@ import re
|
||||
import sys
|
||||
from io import StringIO
|
||||
from random import randint
|
||||
from typing import List, Any, Dict, Optional, Hashable, Tuple, TYPE_CHECKING
|
||||
from typing import List, Any, Dict, Optional, Tuple, TYPE_CHECKING
|
||||
|
||||
from overrides import overrides
|
||||
|
||||
@@ -672,7 +672,7 @@ class GurobiTestInstanceKnapsack(PyomoTestInstanceKnapsack):
|
||||
self,
|
||||
solver: InternalSolver,
|
||||
model: Any,
|
||||
violation: Hashable,
|
||||
violation: str,
|
||||
) -> None:
|
||||
x0 = model.getVarByName("x[0]")
|
||||
model.cbLazy(x0 <= 0)
|
||||
|
||||
@@ -6,7 +6,7 @@ import logging
|
||||
import re
|
||||
import sys
|
||||
from io import StringIO
|
||||
from typing import Any, List, Dict, Optional, Tuple, Hashable
|
||||
from typing import Any, List, Dict, Optional, Tuple
|
||||
|
||||
import numpy as np
|
||||
import pyomo
|
||||
@@ -639,5 +639,5 @@ class PyomoTestInstanceKnapsack(Instance):
|
||||
}
|
||||
|
||||
@overrides
|
||||
def get_variable_categories(self) -> Dict[str, Hashable]:
|
||||
def get_variable_categories(self) -> Dict[str, str]:
|
||||
return {f"x[{i}]": "default" for i in range(len(self.weights))}
|
||||
|
||||
Reference in New Issue
Block a user