encapsulate the max_drift into the Target so it is open to customization
This commit is contained in:
parent
d8b4675f44
commit
84c34d9a90
@ -6,3 +6,11 @@ class Target(BaseModel):
|
|||||||
value: float
|
value: float
|
||||||
result: Optional[float]
|
result: Optional[float]
|
||||||
drift: float = 0.0
|
drift: float = 0.0
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def max_drift(cls):
|
||||||
|
return 10 # 10% elasticity
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def max_drift_increment(cls):
|
||||||
|
return 1 # 1%
|
||||||
|
@ -9,6 +9,7 @@ from models.solver_run import SolverRun
|
|||||||
from models.solution import Solution
|
from models.solution import Solution
|
||||||
from models.form import Form
|
from models.form import Form
|
||||||
from models.item import Item
|
from models.item import Item
|
||||||
|
from models.target import Target
|
||||||
|
|
||||||
from services.base import Base
|
from services.base import Base
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user