cleanup
This commit is contained in:
parent
1dbf672383
commit
07af0ac0ac
@ -90,7 +90,7 @@ class Problem(BaseModel):
|
|||||||
except ValueError as error:
|
except ValueError as error:
|
||||||
logging.error(error)
|
logging.error(error)
|
||||||
raise ItemGenerationError(
|
raise ItemGenerationError(
|
||||||
"Bundle min and/or max larger than bundle amount provided",
|
error.msg,
|
||||||
error.args[0])
|
error.args[0])
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,4 +28,4 @@ class TccTarget(Target):
|
|||||||
problem_handler.solver_items_var[item.id]
|
problem_handler.solver_items_var[item.id]
|
||||||
for item in problem_handler.items
|
for item in problem_handler.items
|
||||||
]) <= self.maximum(
|
]) <= self.maximum(
|
||||||
), f'Max TCC theta({self.theta}) at target {self.value} with a drift % of {self.drift}'
|
), f'Max TCC theta({self.theta}) at target {self.value} with a drift % of {self.drift}'
|
||||||
|
@ -28,4 +28,4 @@ class TifTarget(Target):
|
|||||||
problem_handler.solver_items_var[item.id]
|
problem_handler.solver_items_var[item.id]
|
||||||
for item in problem_handler.items
|
for item in problem_handler.items
|
||||||
]) <= self.maximum(
|
]) <= self.maximum(
|
||||||
), f'Max TIF theta({self.theta}) at target {self.value} with a drift % of {self.drift}'
|
), f'Max TIF theta({self.theta}) at target {self.value} with a drift % of {self.drift}'
|
||||||
|
@ -85,7 +85,6 @@ class FormGenerationService(Base):
|
|||||||
problem_handler.generate_constraints(self.solver_run, current_drift)
|
problem_handler.generate_constraints(self.solver_run, current_drift)
|
||||||
|
|
||||||
problem = problem_handler.solve()
|
problem = problem_handler.solve()
|
||||||
logging.info(problem)
|
|
||||||
|
|
||||||
if LpStatus[problem.status] == 'Infeasible':
|
if LpStatus[problem.status] == 'Infeasible':
|
||||||
logging.info(
|
logging.info(
|
||||||
@ -99,6 +98,7 @@ class FormGenerationService(Base):
|
|||||||
logging.info(
|
logging.info(
|
||||||
f'No feasible solution found for Form {form_number}!'
|
f'No feasible solution found for Form {form_number}!'
|
||||||
)
|
)
|
||||||
|
logging.error(problem)
|
||||||
|
|
||||||
self.add_form_to_solution(problem, solution)
|
self.add_form_to_solution(problem, solution)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user