PolarNick239 / macs-vrptw

Java implementation of http://people.idsia.ch/~luca/tr-idsia-06-99.pdf
0 stars 2 forks source link

Problems reading the code #1

Closed dantesun closed 7 years ago

dantesun commented 7 years ago

Hi @PolarNick239, I am interested in your macs-vrptw project since I recently need to solve a VRPTW problem on my work. But I have trouble reading your code. The following method AntColonyProblem.java public int getTimeDistance(int from, int to) { return (int) Math.round(Math.ceil(this.distances[from][to])); } And the corresponding usage in AbstractACS.java, line 100 maxT[prevI] = Math.min(maxT[nextI] - problem.getTimeDistance(nodes.get(prevI), nodes.get(nextI)) - prev.delayT, prev.toT); It seems that you use distance value for time. Is that a bug or your intension to do so?

PolarNick239 commented 7 years ago

Hi! Distance values measured in seconds, because speed of all vehicles assumed to be the same.

By the way I don't believe that my implementation is good - it was not finished, it was experiment just for fun :) So I recommend you to read original papers or try to find better and more serious implementation

dantesun commented 7 years ago

Thanks for your quick reply! Could you explain to me which part you are not finished? I am interested in improving and completing your existing code. It would be very helpful you can give me some updates on this project.

PolarNick239 commented 7 years ago

I don't remember, but I think implementation is in state: most part of the paper implemented (in the way I understood it) but the result solutions are quite bad. So I think that this code is useful only as framework with sketch implementation + some bugs. So be skeptical :)