Reformat source code

This commit is contained in:
2024-05-29 09:04:59 -05:00
parent e9deac94a5
commit 93e604817b
15 changed files with 106 additions and 107 deletions

View File

@@ -8,11 +8,11 @@ using SCIP
function test_problems_stab()
nx = pyimport("networkx")
data = MaxWeightStableSetData(
graph=nx.gnp_random_graph(25, 0.5, seed=42),
weights=repeat([1.0], 25),
graph = nx.gnp_random_graph(25, 0.5, seed = 42),
weights = repeat([1.0], 25),
)
h5 = H5File(tempname(), "w")
model = build_stab_model_jump(data, optimizer=SCIP.Optimizer)
model = build_stab_model_jump(data, optimizer = SCIP.Optimizer)
model.extract_after_load(h5)
model.optimize()
model.extract_after_mip(h5)

View File

@@ -10,17 +10,12 @@ function test_problems_tsp()
squareform = pyimport("scipy.spatial.distance").squareform
data = TravelingSalesmanData(
n_cities=6,
distances=squareform(pdist([
[0.0, 0.0],
[1.0, 0.0],
[2.0, 0.0],
[3.0, 0.0],
[0.0, 1.0],
[3.0, 1.0],
])),
n_cities = 6,
distances = squareform(
pdist([[0.0, 0.0], [1.0, 0.0], [2.0, 0.0], [3.0, 0.0], [0.0, 1.0], [3.0, 1.0]]),
),
)
model = build_tsp_model_jump(data, optimizer=GLPK.Optimizer)
model = build_tsp_model_jump(data, optimizer = GLPK.Optimizer)
model.optimize()
@test objective_value(model.inner) == 8.0
return