17 lines
321 B
Python
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%
|