Implement MemorizingCutsComponent; STAB: switch to edge formulation

This commit is contained in:
2023-11-07 15:36:31 -06:00
parent b81815d35b
commit 8805a83c1c
25 changed files with 459 additions and 208 deletions

23
tests/fixtures/gen_stab.py vendored Normal file
View File

@@ -0,0 +1,23 @@
from os.path import dirname
import numpy as np
from scipy.stats import uniform, randint
from miplearn.collectors.basic import BasicCollector
from miplearn.io import write_pkl_gz
from miplearn.problems.stab import (
MaxWeightStableSetGenerator,
build_stab_model,
)
np.random.seed(42)
gen = MaxWeightStableSetGenerator(
w=uniform(10.0, scale=1.0),
n=randint(low=50, high=51),
p=uniform(loc=0.5, scale=0.0),
fix_graph=True,
)
data = gen.generate(3)
data_filenames = write_pkl_gz(data, dirname(__file__), prefix="stab-n50-")
collector = BasicCollector()
collector.collect(data_filenames, build_stab_model)

BIN
tests/fixtures/stab-n50-00000.h5 vendored Normal file

Binary file not shown.

BIN
tests/fixtures/stab-n50-00000.mps.gz vendored Normal file

Binary file not shown.

BIN
tests/fixtures/stab-n50-00000.pkl.gz vendored Normal file

Binary file not shown.

BIN
tests/fixtures/stab-n50-00001.h5 vendored Normal file

Binary file not shown.

BIN
tests/fixtures/stab-n50-00001.mps.gz vendored Normal file

Binary file not shown.

BIN
tests/fixtures/stab-n50-00001.pkl.gz vendored Normal file

Binary file not shown.

BIN
tests/fixtures/stab-n50-00002.h5 vendored Normal file

Binary file not shown.

BIN
tests/fixtures/stab-n50-00002.mps.gz vendored Normal file

Binary file not shown.

BIN
tests/fixtures/stab-n50-00002.pkl.gz vendored Normal file

Binary file not shown.