Combine capacity constraints into VRPTW didnt show results #2570
-
|
Currently, im trying to combine capacity constraints from cvrp into vrptw due to my project on school. I'm combining those codes using defaults data (time matrix, time window, capacity, demand, num vehicle). The execution stopped at 37m 48s (sometimes less or more) with an error (it gives me an exclamation mark beside the execution time) but doesnt tell me whats wrong, but it showed results when i stopped it. (Sometimes i cant interrupt the execution, and i try to restart the runtime but no results showing from the codes). I also trying to limit the execution time to 10 sec and 30 minutes, but it showed nothing, as far as i know that causes by there are no solution found, but i dont know whats wrong, is that from print_solution or from the constraints i added. It appears like this I am currently using python language and google colab to code, any further help will be so much appreciated, thank you. And also, i've been trying to modify cvrptw.py to adapt with my problems in school project, but i'm confused with adapting the location and distance evaluator with my problems, i have my own distance matrix for that, can someone enlight me to change the data for location and distance just like on vrp_capacity.ipynb I have 41 nodes to visit with different service time and 1 depot, for the vehicles i have 5 with different capacity. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
did you try this: https://gist.github.com/Mizux/4870e4af09b31dd45b7ac632d1830a73 |
Beta Was this translation helpful? Give feedback.
-
|
I have not, but it seems helpful to me! Thank you! But in case i wanted to
delete the pickup and deliveries things, what should i do to make it right?
You're so kind and helpful, thank you very much!
Pada tanggal Min, 30 Mei 2021 pukul 21.38 Mizux ***@***.***>
menulis:
… did you try this:
https://gist.github.com/Mizux/4870e4af09b31dd45b7ac632d1830a73
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2570 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUIW3ALVH5IELI5Q2CDNGUDTQJEVRANCNFSM45ZNL6WQ>
.
|
Beta Was this translation helpful? Give feedback.
-
|
The way you make or-tools simplified is always amazing. I am suggesting the
same code you recommended, but I'm afraid it will ruin the code. I have
tried it and it works delightfully.
One last simple question though, I don't understand with lines 154 to 157,
what's the penalties supposed to be?
Pada tanggal Sel, 1 Jun 2021 pukul 14.05 Mizux ***@***.***>
menulis:
… I guess simply remove:
https://gist.github.com/Mizux/4870e4af09b31dd45b7ac632d1830a73#file-cvrptw-py-L68-L73
and
https://gist.github.com/Mizux/4870e4af09b31dd45b7ac632d1830a73#file-cvrptw-py-L237-L247
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2570 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUIW3AKZNUS3MLKCLKZGZ2DTQSBFNANCNFSM45ZNL6WQ>
.
|
Beta Was this translation helpful? Give feedback.
https://gist.github.com/Mizux/4870e4af09b31dd45b7ac632d1830a73#file-cvrptw-py-L154-L157
The idea here, is to "allow solver to drop nodes if we can't visit ALL locations" (e.g. at 6pm you want to go to the cinema and at 6pm you also want to go to a restaurant instead of returning infeasible we accept as a valid solution to not going to the cinema or the restaurant or both) but if penalty is very low then the best objective is to drop all nodes (since you pay the penalty BUT not the arc cost !)....and that's clearly not what we want !
Here we would like to visit the most locations possible even if it increase the objective cost so to make it the dominant factor I used a "big enough" number …