fix to attempts logic
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user