only print problem when in local dev
This commit is contained in:
parent
37a5db4c9b
commit
e4f51b8a3f
@ -112,6 +112,9 @@ def solution_items(variables, solver_run):
|
||||
|
||||
return form_items
|
||||
|
||||
def print_problem_logs(problem):
|
||||
print(problem);
|
||||
for v in problem.variables(): print(v.name, "=", v.varValue);
|
||||
|
||||
# probably a better place for this...
|
||||
def is_float(element: String) -> bool:
|
||||
|
@ -163,7 +163,8 @@ class LoftService(Base):
|
||||
if current_drift == Target.max_drift(): # this is the last attempt, so lets finalize the solution
|
||||
for v in problem.variables(): print(v.name, "=", v.varValue);
|
||||
|
||||
logging.info(problem)
|
||||
if ApplicationConfigs.local_dev_env: service_helper.print_problem_logs(problem);
|
||||
|
||||
logging.info(f'No feasible solution found for Form {form_number}!')
|
||||
|
||||
self.add_form_to_solution(problem, solution)
|
||||
@ -172,9 +173,8 @@ class LoftService(Base):
|
||||
|
||||
current_drift += Target.max_drift_increment()
|
||||
else:
|
||||
for v in problem.variables(): print(v.name, "=", v.varValue);
|
||||
if ApplicationConfigs.local_dev_env: service_helper.print_problem_logs(problem);
|
||||
|
||||
logging.info(problem)
|
||||
logging.info(f'Optimal solution found with drift of {current_drift}%!')
|
||||
|
||||
self.add_form_to_solution(problem, solution)
|
||||
|
Loading…
x
Reference in New Issue
Block a user