[go: nahoru, domu]

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

trouble with other datasets #4

Open
SadeghRahmaniB opened this issue Aug 6, 2017 · 2 comments
Open

trouble with other datasets #4

SadeghRahmaniB opened this issue Aug 6, 2017 · 2 comments

Comments

@SadeghRahmaniB
Copy link

hello dear friend
when i changed the vrp dataset in your code, error occured for "heappush(self.chromosomes, (x.cost, x))" in cvrp_advancedga.py file that is "unorderable types: Solution() < Solution()"
i have to say that vrp file that i used, have same syntax with your file, and i download them from "http://neo.lcc.uma.es/vrp/vrp-instances/capacitated-vrp-instances/" and use "Set A" or "A-VRP".
also one time i created vrp file manually and again the same error occured.
how can i use other dataset in this code??
my python version is 3.4.0.
thank you.

@cmanny
Copy link
Owner
cmanny commented Aug 6, 2017

Hey,

Yes the problem you have been experiencing is a result of my lazy construction of the code to load in the VRP instance. It is hardcoded for a certain subset of VRP and does not allow all the parameters.

The data loading code can be found here

I can't say when I will be able to add this in correctly, however a quick search led me to this piece of code which seems to detail the correct steps required to load in the VRP file generally.

I will keep this in mind and try to get round to it, however, if you manage to fix it before, please make a PR and I'll update the repo with your changes!

@SadeghRahmaniB
Copy link
Author

hello again dear friend
i check your CVRPInfo class step by step and almost i am certain that your code haven't any error
can you tell me the "heappush(self.chromosomes, (x.cost, x))" what exactly does?
x is some route and cost is some cost, so how they are pushed in chromosomes heap??
and if you have any more information, i will be thankful to you if tell me that.

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