mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Remove sample.{get,set}
This commit is contained in:
@@ -38,16 +38,18 @@ def test_learning_solver(
|
||||
assert len(instance.get_samples()) > 0
|
||||
sample = instance.get_samples()[0]
|
||||
|
||||
assert sample.get("mip_var_values") == [1.0, 0.0, 1.0, 1.0, 61.0]
|
||||
assert sample.get("mip_lower_bound") == 1183.0
|
||||
assert sample.get("mip_upper_bound") == 1183.0
|
||||
mip_log = sample.get("mip_log")
|
||||
assert sample.get_vector("mip_var_values") == [1.0, 0.0, 1.0, 1.0, 61.0]
|
||||
assert sample.get_scalar("mip_lower_bound") == 1183.0
|
||||
assert sample.get_scalar("mip_upper_bound") == 1183.0
|
||||
mip_log = sample.get_scalar("mip_log")
|
||||
assert mip_log is not None
|
||||
assert len(mip_log) > 100
|
||||
|
||||
assert_equals(sample.get("lp_var_values"), [1.0, 0.923077, 1.0, 0.0, 67.0])
|
||||
assert_equals(sample.get("lp_value"), 1287.923077)
|
||||
lp_log = sample.get("lp_log")
|
||||
assert_equals(
|
||||
sample.get_vector("lp_var_values"), [1.0, 0.923077, 1.0, 0.0, 67.0]
|
||||
)
|
||||
assert_equals(sample.get_scalar("lp_value"), 1287.923077)
|
||||
lp_log = sample.get_scalar("lp_log")
|
||||
assert lp_log is not None
|
||||
assert len(lp_log) > 100
|
||||
|
||||
|
||||
Reference in New Issue
Block a user