Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Wrong Result #34

Open
arncode90 opened this issue Mar 9, 2022 · 1 comment
Open

Getting Wrong Result #34

arncode90 opened this issue Mar 9, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@arncode90
Copy link

arncode90 commented Mar 9, 2022

Hello there, actually i like your packing solver because it came out with visualization.

The issue here im getting wrong placement of the result (or im just using wrong code i dont know).

problem = rps.Problem(rectangles=[
    {"width": 30, "height": 60, "rotatable": True},
    {"width": 30, "height": 50, "rotatable": True}
])
solution = rps.Solver().solve(problem=problem, width_limit=60, show_progress=True, seed=1111)
print("solution:", solution)

###
solution: Solution({'sequence_pair': SequencePair(([0, 1], [1, 0])), 'floorplan': Floorplan({'positions': [{'id': 0, 'x': 0, 'y': 50, 'width': 30, 'height': 60}, {'id': 1, 'x': 0, 'y': 0, 'width': 30, 'height': 50}], 'bounding_box': (30, 110), 'area': 3300})})

for the bounding box, it should be this right ?

'bounding_box': (60, 60)

@kotarot
Copy link
Owner

kotarot commented Mar 12, 2022

@catherinezera88 Hi! Thank you for reporting the issue. I reproduce the same issue in my environment, and it seems a bug in the solver. Yes, it should be (60, 60). I'll try to fix it.

@kotarot kotarot self-assigned this Mar 12, 2022
@kotarot kotarot added the bug Something isn't working label Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants