diff --git a/.gitignore b/.gitignore index fd0123c..3fe15f1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ TODO.md +.idea *.bin *$py.class *.cover diff --git a/benchmark/Makefile b/benchmark/Makefile index 4a232ec..4572e4f 100644 --- a/benchmark/Makefile +++ b/benchmark/Makefile @@ -1,7 +1,7 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. +# Written by Alinson S. Xavier CHALLENGES := \ stab/ChallengeA \ diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index d83926c..74aef87 100755 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -1,8 +1,7 @@ #!/usr/bin/env python -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. """Benchmark script diff --git a/miplearn/__init__.py b/miplearn/__init__.py index 73c2e8f..9c1c350 100644 --- a/miplearn/__init__.py +++ b/miplearn/__init__.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from .components.component import Component from .components.warmstart import (WarmStartComponent, diff --git a/miplearn/benchmark.py b/miplearn/benchmark.py index 7e3594d..f59f759 100644 --- a/miplearn/benchmark.py +++ b/miplearn/benchmark.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from .solvers import LearningSolver from copy import deepcopy diff --git a/miplearn/components/__init__.py b/miplearn/components/__init__.py index e69de29..2e19678 100644 --- a/miplearn/components/__init__.py +++ b/miplearn/components/__init__.py @@ -0,0 +1,4 @@ +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. + diff --git a/miplearn/components/branching.jl b/miplearn/components/branching.jl index c57fe55..ea0e0bd 100644 --- a/miplearn/components/branching.jl +++ b/miplearn/components/branching.jl @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. import Base.Threads.@threads using TinyBnB, CPLEXW, Printf diff --git a/miplearn/components/branching.py b/miplearn/components/branching.py index 7606eb6..b076d8c 100644 --- a/miplearn/components/branching.py +++ b/miplearn/components/branching.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from .component import Component from ..extractors import Extractor diff --git a/miplearn/components/component.py b/miplearn/components/component.py index 2f8d88d..cb794c6 100644 --- a/miplearn/components/component.py +++ b/miplearn/components/component.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from abc import ABC, abstractmethod diff --git a/miplearn/components/tests/__init__.py b/miplearn/components/tests/__init__.py index e69de29..2e19678 100644 --- a/miplearn/components/tests/__init__.py +++ b/miplearn/components/tests/__init__.py @@ -0,0 +1,4 @@ +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. + diff --git a/miplearn/components/tests/test_branching.py b/miplearn/components/tests/test_branching.py index 5316814..0e455d1 100644 --- a/miplearn/components/tests/test_branching.py +++ b/miplearn/components/tests/test_branching.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from miplearn import BranchPriorityComponent, LearningSolver from miplearn.problems.knapsack import KnapsackInstance diff --git a/miplearn/components/tests/test_warmstart.py b/miplearn/components/tests/test_warmstart.py index b2faca3..e842e25 100644 --- a/miplearn/components/tests/test_warmstart.py +++ b/miplearn/components/tests/test_warmstart.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from miplearn import WarmStartComponent, LearningSolver from miplearn.problems.knapsack import KnapsackInstance diff --git a/miplearn/components/tests/test_warmstart_knn.py b/miplearn/components/tests/test_warmstart_knn.py index b6f836c..4031c6d 100644 --- a/miplearn/components/tests/test_warmstart_knn.py +++ b/miplearn/components/tests/test_warmstart_knn.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from miplearn import KnnWarmStartPredictor from sklearn.metrics import accuracy_score, precision_score diff --git a/miplearn/components/tests/test_warmstart_logistic.py b/miplearn/components/tests/test_warmstart_logistic.py index 59db276..23bada0 100644 --- a/miplearn/components/tests/test_warmstart_logistic.py +++ b/miplearn/components/tests/test_warmstart_logistic.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from miplearn import LogisticWarmStartPredictor from sklearn.metrics import accuracy_score, precision_score diff --git a/miplearn/components/warmstart.py b/miplearn/components/warmstart.py index e1fad62..326f2ac 100644 --- a/miplearn/components/warmstart.py +++ b/miplearn/components/warmstart.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from .component import Component from ..extractors import * diff --git a/miplearn/extractors.py b/miplearn/extractors.py index d01742c..1b6f529 100644 --- a/miplearn/extractors.py +++ b/miplearn/extractors.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. import numpy as np from abc import ABC, abstractmethod diff --git a/miplearn/instance.py b/miplearn/instance.py index 7404608..a3fda45 100644 --- a/miplearn/instance.py +++ b/miplearn/instance.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from abc import ABC, abstractmethod diff --git a/miplearn/problems/__init__.py b/miplearn/problems/__init__.py index be4c1c5..13c148b 100644 --- a/miplearn/problems/__init__.py +++ b/miplearn/problems/__init__.py @@ -1,3 +1,3 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright (C) 2019-2020 Argonne National Laboratory. All rights reserved. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. diff --git a/miplearn/problems/knapsack.py b/miplearn/problems/knapsack.py index ce8a6ae..5fb9415 100644 --- a/miplearn/problems/knapsack.py +++ b/miplearn/problems/knapsack.py @@ -1,6 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright (C) 2019-2020 Argonne National Laboratory. All rights reserved. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. import miplearn from miplearn import Instance diff --git a/miplearn/problems/stab.py b/miplearn/problems/stab.py index 536f4e3..9919138 100644 --- a/miplearn/problems/stab.py +++ b/miplearn/problems/stab.py @@ -1,6 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright (C) 2019-2020 Argonne National Laboratory. All rights reserved. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. import numpy as np import pyomo.environ as pe diff --git a/miplearn/problems/tests/__init__.py b/miplearn/problems/tests/__init__.py index e69de29..2e19678 100644 --- a/miplearn/problems/tests/__init__.py +++ b/miplearn/problems/tests/__init__.py @@ -0,0 +1,4 @@ +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. + diff --git a/miplearn/problems/tests/test_knapsack.py b/miplearn/problems/tests/test_knapsack.py index fb179e5..4414e07 100644 --- a/miplearn/problems/tests/test_knapsack.py +++ b/miplearn/problems/tests/test_knapsack.py @@ -1,6 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright (C) 2019-2020 Argonne National Laboratory. All rights reserved. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from miplearn import LearningSolver from miplearn.problems.knapsack import MultiKnapsackGenerator, MultiKnapsackInstance diff --git a/miplearn/problems/tests/test_stab.py b/miplearn/problems/tests/test_stab.py index 35d0e6a..c5c06bc 100644 --- a/miplearn/problems/tests/test_stab.py +++ b/miplearn/problems/tests/test_stab.py @@ -1,6 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright (C) 2019-2020 Argonne National Laboratory. All rights reserved. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from miplearn import LearningSolver from miplearn.problems.stab import MaxWeightStableSetInstance diff --git a/miplearn/solvers.py b/miplearn/solvers.py index 7c9bed7..2fafc8a 100644 --- a/miplearn/solvers.py +++ b/miplearn/solvers.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from . import WarmStartComponent, BranchPriorityComponent import pyomo.environ as pe diff --git a/miplearn/tests/__init__.py b/miplearn/tests/__init__.py index e69de29..2e19678 100644 --- a/miplearn/tests/__init__.py +++ b/miplearn/tests/__init__.py @@ -0,0 +1,4 @@ +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. + diff --git a/miplearn/tests/test_benchmark.py b/miplearn/tests/test_benchmark.py index 27184d6..c71b088 100644 --- a/miplearn/tests/test_benchmark.py +++ b/miplearn/tests/test_benchmark.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from miplearn import LearningSolver, BenchmarkRunner, KnnWarmStartPredictor from miplearn.problems.stab import MaxWeightStableSetGenerator diff --git a/miplearn/tests/test_extractors.py b/miplearn/tests/test_extractors.py index 95c54a0..cd7f015 100644 --- a/miplearn/tests/test_extractors.py +++ b/miplearn/tests/test_extractors.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from miplearn.problems.knapsack import KnapsackInstance from miplearn.extractors import (UserFeaturesExtractor, diff --git a/miplearn/tests/test_solver.py b/miplearn/tests/test_solver.py index 3598f06..1e99ae3 100644 --- a/miplearn/tests/test_solver.py +++ b/miplearn/tests/test_solver.py @@ -1,7 +1,6 @@ -# MIPLearn, an extensible framework for Learning-Enhanced Mixed-Integer Optimization -# Copyright © 2020, UChicago Argonne, LLC. All rights reserved. -# Released under the modified BSD license. See COPYING.md for more details. -# Written by Alinson S. Xavier +# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. from miplearn import LearningSolver, BranchPriorityComponent, WarmStartComponent from miplearn.problems.knapsack import KnapsackInstance