enforce bundle first ordering if bundles ordering is true
This commit is contained in:
parent
86d6d2fcec
commit
a3ca233953
@ -125,7 +125,8 @@ def solution_items(variables: list, solver_run: SolverRun) -> Tuple[list]:
|
||||
if bundle: form_bundles.append(bundle)
|
||||
|
||||
for bundle in form_bundles:
|
||||
for item in bundle.ordered_items:
|
||||
items = bundle.ordered_items if solver_run.bundle_first_ordering else bundle.items
|
||||
for item in items:
|
||||
final_items.append(item)
|
||||
|
||||
for item in form_items:
|
||||
|
@ -15,6 +15,7 @@ from models.advanced_options import AdvancedOptions
|
||||
class SolverRun(BaseModel):
|
||||
items: List[Item] = []
|
||||
bundles: List[Bundle] = []
|
||||
bundle_first_ordering: bool = True
|
||||
constraints: List[Constraint]
|
||||
irt_model: IRTModel
|
||||
objective_function: ObjectiveFunction
|
||||
|
Loading…
x
Reference in New Issue
Block a user