mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-08 02:18:51 -06:00
28 lines
691 B
Python
28 lines
691 B
Python
# 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
|
|
|
|
|
|
class Component(ABC):
|
|
"""
|
|
A Component is an object which adds functionality to a LearningSolver.
|
|
"""
|
|
|
|
@abstractmethod
|
|
def before_solve(self, solver, instance, model):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def after_solve(self, solver, instance, model):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def merge(self, other):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def fit(self, solver):
|
|
pass
|