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

Worse results after Hashset modification #511

Open
ismaelrh opened this issue Oct 29, 2020 · 1 comment
Open

Worse results after Hashset modification #511

ismaelrh opened this issue Oct 29, 2020 · 1 comment

Comments

@ismaelrh
Copy link

Commit 1ebf236 slightly changes RuinAndRecreateModule.java, by modifying the creation and populationof the HashSet from

Set<Job> ruinedJobSet = new HashSet<>(ruinedJobs);
ruinedJobSet.addAll(ruinedJobs);

to

 Set<Job> ruinedJobSet = new HashSet<>(ruinedJobs);

Even though this should not produce any difference, as they are equivalents, I am obtaining slightly poorer results with the second approach on the optimizations I perform, in different projects with different constraints, with a number of services about 100, and 20-100 vehicles. I run it multiple times and the final cost is always equals or higher with the changes introduced in this commit.

Using JDK 1.8.0_192. Will prepare an example if I have time.

@ismaelrh ismaelrh changed the title Worst results after Hashset modification Worse results after Hashset modification Oct 29, 2020
@bednic
Copy link

bednic commented Jan 10, 2022

Can you tell in percentage how much it differ, if it is worth solving.

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

No branches or pull requests

2 participants