-
Notifications
You must be signed in to change notification settings - Fork 328
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
Using custom matrix from JSON-object instead of OSRM. #47
Comments
Hey, thanks for sharing this! This feature might be a useful addition. My concerns here are:
Thanks for your input, I'm happy to discuss this further! |
|
I agree on your arguments in favour of a json implementation for this. Yet redundancy bothers me. The reason of the So I think the wise choice here would be to remove the TSPLIB format support altogether, replacing it as you suggest with an optional Using other benchmarks sources would only be a matter of setting an ad-hoc conversion to json, which is not a problem. |
About the concern 2. above:
So if |
I guess this would be the best approach. Maybe something like I'm also concerned about the output consistency for the The downside of this is that the way the output should be parsed (and the expected keys) becomes input-dependant. |
@PattyDePuh if you still feel like working on this (sorry for the delay), you can start off from the last commit in |
Got a first working version for the json-matrix-import. I've touched several classes for it:
Since i couldn't use
My questions @jcoupey :
|
Thanks for the work and sharing details! A few quick thoughts:
|
About the questions.
|
@PattyDePuh I just merged the |
Landed with #59 merge. |
Hey folks,
On my fork i implemented the first iteration of the
json-uploader
, another option to provide Cost-matrix, instead of OSRM. With the json-uploader, you can use the matrix from the JSON object, that is given to the application. Run the application with the-j
flag to unlock the feature:Usage example:
./vroom -i /path/to/json.txt -j
test8u.json.txt
Output with above file:
{"routes":[{"steps":[0,2,3,7,6,1,4,5,8],"cost":8362,"vehicle":1}],"solution":{"computing_times":{"loading":0,"solving":0},"cost":8362},"code":0}
(VROOM found one of the optimal solutions for the above instance.)
Because there are no location coordinates necessary in this case, the
"jobs"
-key becomes obsolet and the"vehicles"
-key provides with"start"
and"end"
the desired start and end-points associated with the columns from the matrix.For roundtrips currently you can't simply set
"start" = "end"
because of an assert in one of the solvers; Gonna' look on this one...The text was updated successfully, but these errors were encountered: