mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Branching: read priorities as float
This commit is contained in:
@@ -42,7 +42,8 @@ class BranchPriorityComponent(Component):
|
|||||||
check=True,
|
check=True,
|
||||||
capture_output=True)
|
capture_output=True)
|
||||||
self._merge(np.genfromtxt(priority_file.name,
|
self._merge(np.genfromtxt(priority_file.name,
|
||||||
delimiter=','))
|
delimiter=',',
|
||||||
|
dtype=np.float64))
|
||||||
|
|
||||||
|
|
||||||
def fit(self, solver):
|
def fit(self, solver):
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ def test_parallel_solve():
|
|||||||
def test_solver_random_branch_priority():
|
def test_solver_random_branch_priority():
|
||||||
instance = _get_instance()
|
instance = _get_instance()
|
||||||
components = {
|
components = {
|
||||||
"warm-start": BranchPriorityComponent(initial_priority=np.array([1, 2, 3, 4])),
|
"warm-start": BranchPriorityComponent(initial_priority=np.array([1., 2., 3., 4.])),
|
||||||
}
|
}
|
||||||
solver = LearningSolver(components=components)
|
solver = LearningSolver(components=components)
|
||||||
solver.solve(instance)
|
solver.solve(instance)
|
||||||
|
|||||||
Reference in New Issue
Block a user