Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds container cost calculation support to the 3D packing library. It introduces a ContainerCostCalculator interface and several implementations (fixed, bucket-based, linear, volume-weight-based), integrates cost calculators into container items, and updates the OpenAPI spec to reflect new cost, resource limit, and temporal limit models.
Changes:
- New
ContainerCostCalculatorAPI interface with fixed, bucket, linear, and volume-weight implementations - OpenAPI schema updated: removed
StackableItemdiscriminator pattern, addedCost/WeightCostmodels,ResourceLimit,TemporalLimit, andPackagerFeatureschemas ControlledContainerItemextended with cost calculator support and validation inAbstractPackagerResultBuilder
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
api/.../ContainerCostCalculator.java |
New interface for container cost calculation |
core/.../AbstractBucketWeightContainerCostCalculator.java |
Abstract base for bucket-based weight cost calculators |
core/.../BucketContainerCostCalculator.java |
Simple weight-bucket cost calculator |
core/.../VolumeWeightBucketContainerCostCalculator.java |
Volume-weight aware bucket cost calculator with builder |
core/.../LinearBucketWeightContainerCostCalculator.java |
Linear per-weight-unit cost calculator |
core/.../FixedContainerCostCalculator.java |
Fixed cost calculator (weight-independent) |
core/.../ControlledContainerItem.java |
Adds cost calculator list to container items |
core/.../AbstractPackagerResultBuilder.java |
Validates all-or-none cost calculator presence |
open-api/.../3d-api.yaml |
Updated API spec with cost, resource limit, temporal limit schemas |
core/.../PlainPackagerTest.java |
Removed unused imports |
core/.../BucketContainerCostCalculatorTest.java |
Tests for bucket cost calculator |
core/.../VolumeWeightBucketContainerCostCalculatorTest.java |
Tests for volume-weight bucket calculator |
core/.../LinearBucketWeightContainerCostCalculatorTest.java |
Tests for linear cost calculator |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+308
to
+329
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
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.
Add cost as a dimension of controlledcontainer.
During packaging, select the best next container based on the estimated cost.