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

Invalid solution with negative amount #197

Closed
jcoupey opened this issue Jan 15, 2019 · 3 comments · Fixed by #262
Closed

Invalid solution with negative amount #197

jcoupey opened this issue Jan 15, 2019 · 3 comments · Fixed by #262
Assignees
Labels
Milestone

Comments

@jcoupey
Copy link
Collaborator

jcoupey commented Jan 15, 2019

When using a negative amount, an invalid solution can be reached and chosen for output, hitting an assertion when trying to format the solution:

vroom: ./utils/helpers.h:196: vroom::Solution vroom::utils::format_solution(const vroom::Input&, const RawSolution&): Assertion `amount <= v.capacity' failed.

This happens because during the local search there is no validity check wrt capacity for removing a job from a route. But removing a job can break the capacity restrictions if it holds a negative amount.

The rationale behind capacity values being signed integers is that I was thinking this could be useful to model some pick-up and drop-off situations. I'd like to keep this as is, so the fix would be to add validity checks for capacity to all local search operators upon job removals.

Note : using current master or v1.3.0 with positive values only for capacities is safe from this bug.

@rishabhdeepsingh
Copy link

Any updates on this error?
also the line number has been changed.

@jcoupey
Copy link
Collaborator Author

jcoupey commented Jun 27, 2019

@rishabhdeepsingh I plan to start working on this in the next few weeks, along with #241.

@jcoupey jcoupey self-assigned this Jun 27, 2019
@jcoupey jcoupey mentioned this issue Aug 8, 2019
18 tasks
@stefanocudini
Copy link

stefanocudini commented Mar 31, 2020

may be related to this #317 amount zero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants