leet the solver drift

This commit is contained in:
Adrian Manteza
2022-03-16 02:51:39 +00:00
parent cc704d97da
commit 812e7aaad9
4 changed files with 67 additions and 67 deletions

View File

@ -9,8 +9,14 @@ class Target(BaseModel):
@classmethod
def max_drift(cls):
return 10 # 10% elasticity
return 120 # let it drift...
@classmethod
def max_drift_increment(cls):
return 1 # 1%
return 10 # 10%
def minimum(self, drift_percent = 0.0) -> float:
return round(self.value - (self.value * drift_percent), 2)
def maximum(self, drift_percent = 0.0) -> float:
return round(self.value + (self.value * drift_percent), 2)