logfest 2059
This commit is contained in:
@ -7,6 +7,8 @@ from models.bundle import Bundle
|
||||
from lib.errors.item_generation_error import ItemGenerationError
|
||||
|
||||
def build_constraints(solver_run, problem, items, bundles):
|
||||
logging.info('Creating Constraints...')
|
||||
|
||||
try:
|
||||
total_form_items = solver_run.total_form_items
|
||||
constraints = solver_run.constraints
|
||||
@ -53,6 +55,7 @@ def build_constraints(solver_run, problem, items, bundles):
|
||||
* items[item.id]
|
||||
for item in solver_run.items]) == solver_run.total_form_items - total_bundle_items, f'Remaining items are not of a bundle type'
|
||||
|
||||
logging.info('Constraints Created...')
|
||||
return problem
|
||||
except ValueError as error:
|
||||
logging.error(error)
|
||||
|
Reference in New Issue
Block a user