mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-07 18:08:51 -06:00
Convert LPSolveStats into dataclass
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
import logging
|
||||
from abc import ABC, abstractmethod
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from overrides import EnforceOverrides
|
||||
@@ -11,7 +12,6 @@ from overrides import EnforceOverrides
|
||||
from miplearn.features import Constraint, Variable
|
||||
from miplearn.instance.base import Instance
|
||||
from miplearn.types import (
|
||||
LPSolveStats,
|
||||
IterationCallback,
|
||||
LazyCallback,
|
||||
MIPSolveStats,
|
||||
@@ -24,6 +24,12 @@ from miplearn.types import (
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass
|
||||
class LPSolveStats:
|
||||
lp_log: Optional[str] = None
|
||||
lp_value: Optional[float] = None
|
||||
|
||||
|
||||
class InternalSolver(ABC, EnforceOverrides):
|
||||
"""
|
||||
Abstract class representing the MIP solver used internally by LearningSolver.
|
||||
|
||||
Reference in New Issue
Block a user