irt-service/app/models/target.py
2022-03-11 15:25:17 +00:00

17 lines
321 B
Python

from pydantic import BaseModel
from typing import Optional
class Target(BaseModel):
theta: float
value: float
result: Optional[float]
drift: float = 0.0
@classmethod
def max_drift(cls):
return 15 # 10% elasticity
@classmethod
def max_drift_increment(cls):
return 1 # 1%