From 20a2f5dd81d48f082f76eb5293968801fd0b98d8 Mon Sep 17 00:00:00 2001 From: Adrian Manteza Date: Mon, 7 Mar 2022 16:18:36 +0000 Subject: [PATCH] label it and add to the problem --- app/services/loft_service.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/services/loft_service.py b/app/services/loft_service.py index 6caf7a5..11e25dc 100644 --- a/app/services/loft_service.py +++ b/app/services/loft_service.py @@ -108,9 +108,11 @@ class LoftService(Base): ] + [ item.iif(self.solver_run, target.theta) * items[item.id] for item in self.solver_run.items - ]) + ]) <= target.value, f'min tif theta {target.theta} target for form {form_number}' + problem += tif problem_objective_functions.append(tif) + e = LpAffineExpression( [(bundles[bundle.id], bundle.tif(self.solver_run.irt_model, target.theta)) @@ -133,7 +135,9 @@ class LoftService(Base): ] + [ item.irf(self.solver_run, target.theta) * items[item.id] for item in self.solver_run.items - ]) + ]) <= target.value, f'min tcc theta {target.theta} target for form {form_number}' + + problem += tcc problem_objective_functions.append(tcc) e = LpAffineExpression(