refactor: Redesign nesting engines with pipeline pattern and add exhaustive search
- Rename Result to PackResult to avoid confusion with Result<T> - Add PackingRequest as immutable configuration replacing mutable engine state - Add PackingStrategy enum (AdvancedFit, BestFit, Exhaustive) - Implement pipeline pattern for composable packing steps - Rewrite AdvancedFitEngine as stateless using pipeline - Rewrite BestFitEngine as stateless - Add ExhaustiveFitEngine with symmetry breaking for optimal solutions - Tries all bin assignments to find minimum bins - Falls back to AdvancedFit for >20 items - Configurable threshold via constructor - Update IEngine/IEngineFactory interfaces for new pattern - Add strategy parameter to MCP tools Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
15
CutList.Core/Nesting/Pipeline/IPackingStep.cs
Normal file
15
CutList.Core/Nesting/Pipeline/IPackingStep.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace CutList.Core.Nesting.Pipeline
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a single step in the packing pipeline.
|
||||
/// Each step modifies the PackingContext to progress toward a final result.
|
||||
/// </summary>
|
||||
public interface IPackingStep
|
||||
{
|
||||
/// <summary>
|
||||
/// Executes this step, modifying the context as needed.
|
||||
/// </summary>
|
||||
/// <param name="context">The mutable packing context.</param>
|
||||
void Execute(PackingContext context);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user