You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
885 B
31 lines
885 B
# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization
|
|
# Copyright (C) 2020-2022, UChicago Argonne, LLC. All rights reserved.
|
|
# Released under the modified BSD license. See COPYING.md for more details.
|
|
|
|
from glob import glob
|
|
from os.path import dirname
|
|
from typing import List
|
|
|
|
import pytest
|
|
|
|
from miplearn.extractors.abstract import FeaturesExtractor
|
|
from miplearn.extractors.fields import H5FieldsExtractor
|
|
|
|
|
|
@pytest.fixture()
|
|
def multiknapsack_h5() -> List[str]:
|
|
return sorted(glob(f"{dirname(__file__)}/fixtures/multiknapsack-n100*.h5"))
|
|
|
|
|
|
@pytest.fixture()
|
|
def tsp_h5() -> List[str]:
|
|
return sorted(glob(f"{dirname(__file__)}/fixtures/tsp-n20*.h5"))
|
|
|
|
|
|
@pytest.fixture()
|
|
def default_extractor() -> FeaturesExtractor:
|
|
return H5FieldsExtractor(
|
|
instance_fields=["static_var_obj_coeffs"],
|
|
var_fields=["lp_var_features"],
|
|
)
|