Skip to content

feat: Branch and bound optimizations in schedule enumeration#50

Merged
codyroux merged 3 commits intocodyroux:chamelean/mainfrom
segevem:chamelean/branch-and-bound
Dec 1, 2025
Merged

feat: Branch and bound optimizations in schedule enumeration#50
codyroux merged 3 commits intocodyroux:chamelean/mainfrom
segevem:chamelean/branch-and-bound

Conversation

@segevem
Copy link

@segevem segevem commented Nov 25, 2025

Branch and bound optimization prunes swaths of bad schedules as soon as their PreScheduleScore exceeds the best found (we are minimizing).

@segevem segevem changed the title feat: Branch and bound optimizations in schedule enumeration feat: Branch and bound optimizations in schedule enumeration (WIP) Nov 25, 2025
@segevem segevem marked this pull request as draft November 25, 2025 22:41
@segevem segevem marked this pull request as ready for review November 25, 2025 23:03
@segevem segevem changed the title feat: Branch and bound optimizations in schedule enumeration (WIP) feat: Branch and bound optimizations in schedule enumeration Nov 25, 2025
private partial def enumSchedulesChunkedWithPruning {α v} [BEq v] [Repr α] [Repr v] [Hashable v] (vars : List v) (matchableVars : List v) (hypComps : List (LazyList (List (α × List (List v) × List v)))) (env : List v) (numHyps : Nat)
: LazyList (List (PreScheduleStep α v)) :=
let matchableSet := Std.HashSet.ofList matchableVars
let rec go (hypComps : List (LazyList (List (α × List (List v) × List v)))) (env : List v) (sched : List (PreScheduleStep α v)) (numHypsRemaining : Nat) (bestScore : PreScheduleScore)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 2 nested (and somewhat non-trivial) recursive functions, I wonder if we want a little more comments explaining what's going on.

@codyroux codyroux merged commit a8d0156 into codyroux:chamelean/main Dec 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants