diff --git a/app/main.py b/app/main.py index e9f0143..5d307c1 100644 --- a/app/main.py +++ b/app/main.py @@ -43,7 +43,7 @@ class ServiceListener(Consumer): logging.error(f'action of type {action} does not exist.') def main(): - logging.info('Starting IRT Service: The Enemies Within (v1.7.0)...') + logging.info('Starting IRT Service: Tokyo Drift 2: Driftocolypse (v1.8.0)...') # ToDo: Figure out a much better way of doing this. # LocalStack wants 'endpoint_url', while prod doesnt :( diff --git a/app/models/solver_run.py b/app/models/solver_run.py index 85f015f..36adc5b 100644 --- a/app/models/solver_run.py +++ b/app/models/solver_run.py @@ -18,10 +18,6 @@ from models.bundle import Bundle from models.objective_function import ObjectiveFunction from models.advanced_options import AdvancedOptions -if TYPE_CHECKING: - from models.solution import Solution - from models.problem import Problem - ConstraintType = TypeVar('ConstraintType', bound=GenericConstraint) class SolverRun(BaseModel): @@ -37,6 +33,7 @@ class SolverRun(BaseModel): drift_style: Literal['constant', 'variable'] = 'constant' allow_enemies: bool = False max_attempts: int + max_drift: int = 15 advanced_options: Optional[AdvancedOptions] engine: str diff --git a/app/services/form_generation_service.py b/app/services/form_generation_service.py index 9994700..7f14729 100644 --- a/app/services/form_generation_service.py +++ b/app/services/form_generation_service.py @@ -71,6 +71,7 @@ class FormGenerationService(Base): # iterate for number of forms that require creation for form_count in range(self.solver_run.total_forms): form_number = form_count + 1 + drift_increment = self.solver_run.max_drift / (self.solver_run.max_attempts - 1) current_drift = 0 # FF Tokyo Drift current_attempt = 0 @@ -78,7 +79,7 @@ class FormGenerationService(Base): # respect max attempts # this will likely be more built out when we add increment rate & drif limit - while current_drift <= Target.max_drift() or current_attempt <= self.solver_run.max_attempts: + while current_attempt <= self.solver_run.max_attempts: drift_percent = current_drift / 100 self.solver_run.objective_function.update_targets_drift( drift_percent) @@ -107,7 +108,7 @@ class FormGenerationService(Base): break - current_drift += Target.max_drift_increment() + current_drift += drift_increment current_attempt += 1 else: if ApplicationConfigs.local_dev_env: