Feature/parallelize lp problem generation#43
Merged
Conversation
…atching to reduce IPC overhead
…ical in structure and more compact (tested, works)
…me stray comments and such
…orphaned helper functions and fallback (commented out) code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔥 Parallel Constraint Compilation Overhaul (
ws3)Tag:
v1.1.0-devDate: 2025-08-06
Author: Gregory Paradis
✨ Overview
This release introduces a major performance overhaul of the constraint compilation pipeline in
ws3, especially forcflwandcgenconstraint sets. Improvements include persistent parallel execution, smart batching, and phase-specific tuning — resulting in significantly faster reformulation for large-scale forest estate models.🚀 Highlights
🧠 Adaptive Auto-Batching
auto_batch()function:size_fnweighting.max_batch_factor, defaulting to empirically tuned values.⚙️ Parallel Reformulation Rewrite
_cmp_cflw_m1and_cmp_cgen_m1restructured to:PersistentWorkerPoolcreated inadd_problem.Constraint generation (
Phase 3) now batched by workload size.🔄 Execution Details
forkmultiprocessing context for better startup cost on Linux.max_batch_factor:mbf = 1(high-variance tasks)mbf = auto(default ~2–4)workers=1.📊 Performance Benchmarks (TSA40)
✅ Validation
add_problempasses a persistent executor to all compilation phases.🧹 Cleanup & Future Work
max_batch_factoroverride for expert users.cgenconstraint sets.📝 API Notes
forest.pyreformulation methods.