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

Fix: Vroom handles quantities correctly #223

Merged
merged 4 commits into from
Jun 4, 2021
Merged

Conversation

senhalil
Copy link
Contributor

Vroom expects all quantities to be positive (delivery quantities are multiplied with -1)
It cannot handle durations begin modified by vehicle (assert added)
It shouldn't silently ignore services (both pickup and delivery amounts are sent to the solver)

@senhalil senhalil requested review from braktar and fonsecadeline May 27, 2021 17:35
Copy link
Contributor

@braktar braktar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test with mixed positive and negative quantities ?

wrappers/vroom.rb Show resolved Hide resolved
@senhalil
Copy link
Contributor Author

@braktar share me the test you have on your local when you have time and I will add it the PR

@braktar
Copy link
Contributor

braktar commented May 31, 2021

Here are the data i used. I didn't implement the asserts

    problem = VRP.basic
    problem[:units] << { id: 'l' }
    problem[:services].each{ |service|
      service[:quantities] = [{ unit_id: 'kg', value: 1 }, { unit_id: 'l', value: -1}]
    }
    problem[:vehicles].each{ |vehicle|
      vehicle[:capacities] = [{ unit_id: 'kg', limit: 3 }, { unit_id: 'l', limit: 2}]
    }

It would be nice to make the sign dependent on the service index to have a real mix

@fab-girard fab-girard merged commit 456fe00 into Mapotempo:dev Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants