refactor of model targets and constraints, addition of new constraint types and constraint construction process
This commit is contained in:
17
app/models/constraints/generic_constraint.py
Normal file
17
app/models/constraints/generic_constraint.py
Normal file
@ -0,0 +1,17 @@
|
||||
import logging
|
||||
|
||||
from pulp import lpSum
|
||||
from pydantic import BaseModel
|
||||
from typing import TypeVar, Type
|
||||
|
||||
from helpers.common_helper import *
|
||||
|
||||
from models.attribute import Attribute
|
||||
from models.problem import Problem
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class GenericConstraint(BaseModel):
|
||||
reference_attribute: Attribute
|
||||
minimum: float
|
||||
maximum: float
|
Reference in New Issue
Block a user