You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thank you for your great library!
We use it in order to find the best fit, with the minimum packages number.
I write this issue, because we have a specific request, and I'm not sure how I should handle it.
For specific item types, and specific boxes, when we want to pack multiple items in one package, we are asked to add additional dimensions between items.
Example with 2 items :
First item => Best fit into the best box ;
Second item
Try to fit it into the first box with the first item ;
We must add 5cm on all sides of both items, because there is already one item in the box ;
Check if both items still fit in the current box.
It would still be the same when we have more items.
If I understand your library right, I would say that I should use the ConstrainedPlacementItem interface.
But I'm not really sure how to do this request with this, because even if the canBePacked method returns true, it will not return the new X/Y/Z positions.
Do you have an idea on how to manage this edge case please ?
Thank you by advance for your help!
The text was updated successfully, but these errors were encountered:
Unfortunately, I can't think of an easy way to solve this, it's a problem that's just not in the architecture. The only thing I can think of is just to unconditionally pad the item size by 5cm always and accept that many packing solutions will be sub-optimal as a result.
I'll leave this open in case I ever think of a way this kind of constraint could be incorporated into a hook
Ok, that's what I thought after reading the code.
Maybe I will try to do the calculation in the canBePacked method for each item when called.
It will be a lot of calculation, and the 3D representation will not be accurate, but I will know that everything in the box can fit.
In any case, thank you for taking the time to answer my question 🙏
Hello,
First, thank you for your great library!
We use it in order to find the best fit, with the minimum packages number.
I write this issue, because we have a specific request, and I'm not sure how I should handle it.
For specific item types, and specific boxes, when we want to pack multiple items in one package, we are asked to add additional dimensions between items.
Example with 2 items :
It would still be the same when we have more items.
If I understand your library right, I would say that I should use the
ConstrainedPlacementItem
interface.But I'm not really sure how to do this request with this, because even if the
canBePacked
method returns true, it will not return the new X/Y/Z positions.Do you have an idea on how to manage this edge case please ?
Thank you by advance for your help!
The text was updated successfully, but these errors were encountered: