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

Error with matrix #2

Closed
bgnq opened this issue Jul 31, 2018 · 4 comments
Closed

Error with matrix #2

bgnq opened this issue Jul 31, 2018 · 4 comments
Labels

Comments

@bgnq
Copy link

bgnq commented Jul 31, 2018

Hello !

I have an error when I use matrix system :

"avancement": "The task failed because of an error: undefined method []' for nil:NilClass", (/home/www/optimizer-api/optimizer_wrapper.rb:563:in block in route_total_dimension')

My json :
{ "vrp": { "configuration": { "preprocessing": { "cluster_threshold": 0.0, "prefer_short_segment": true }, "resolution": { "duration": 600000, "initial_time_out": 18000, "iterations_without_improvment": 300, "time_out_multiplier": 2 }, "restitution": { "intermediate_solutions": false } }, "matrices": [ { "distance": [ [ 0, 41512.1, 20525.1, 50609, 37095.3 ], [ 40837.4, 0, 41662.6, 20075.9, 9429.4 ], [ 19289.4, 43685.5, 0, 37427.4, 39268.7 ], [ 50317, 19821.3, 37287.9, 0, 28403.1 ], [ 37252.1, 9548.8, 38077.3, 27283.8, 0 ] ], "id": "matrice1", "time": [ [ 0, 2630.8, 1280.3, 2925.5, 2079.8 ], [ 2576.8, 0, 2759.2, 1470.8, 780.8 ], [ 1208.6, 2802.8, 0, 2357.5, 2251.8 ], [ 2866.7, 1441.1, 2312.1, 0, 1917.8 ], [ 2062.6, 777.9, 2245, 1948, 0 ] ] } ], "points": [ { "id": "l0", "matrix_index": 0 }, { "id": "l1", "matrix_index": 2 }, { "id": "l2", "matrix_index": 3 }, { "id": "l3", "matrix_index": 4 }, { "id": "l4", "matrix_index": 5 } ], "services": [ { "activity": { "duration": 1800, "point_id": "l1", "timewindows": [ { "end": 43200, "start": 0 } ] }, "id": "s1", "type": "service" }, { "activity": { "duration": 1800, "point_id": "l2", "timewindows": [ { "end": 43200, "start": 0 } ] }, "id": "s2", "type": "service" }, { "activity": { "duration": 1800, "point_id": "l3", "timewindows": [ { "end": 43200, "start": 0 } ] }, "id": "s3", "type": "service" }, { "activity": { "duration": 1800, "point_id": "l4", "timewindows": [ { "end": 43200, "start": 0 } ] }, "id": "s4", "type": "service" } ], "vehicles": [ { "end_point_id": "l0", "id": "c1", "matrix_id": "matrice1", "start_point_id": "l0", "timewindow": { "end": 64800, "start": 0 } }, { "end_point_id": "l0", "id": "c2", "matrix_id": "matrice1", "start_point_id": "l0", "timewindow": { "end": 64800, "start": 0 } }, { "end_point_id": "l0", "id": "c3", "matrix_id": "matrice1", "start_point_id": "l0", "timewindow": { "end": 64800, "start": 0 } }, { "end_point_id": "l0", "id": "c4", "matrix_id": "matrice1", "start_point_id": "l0", "timewindow": { "end": 64800, "start": 0 } }, { "end_point_id": "l0", "id": "c5", "matrix_id": "matrice1", "start_point_id": "l0", "timewindow": { "end": 64800, "start": 0 } } ] } }

Can you help me please ?
Thanks a lot

@bgnq bgnq changed the title Hello Error with matrix Aug 1, 2018
@bgnq bgnq closed this as completed Aug 1, 2018
@braktar
Copy link
Contributor

braktar commented Aug 1, 2018

Hello,

Thanks for the report, we usually don't provide directly the matrix. Some fixes will be available soon into the dev branch.

By the way, your matrix indices are incorrect, the matrix size is 5 (indices from 0 to 4) and your biggest matrix_index is 5.

@braktar braktar reopened this Aug 1, 2018
@bgnq
Copy link
Author

bgnq commented Aug 1, 2018

Yes, thank, i found my nooby problem... and close issue.
Sorry

Thank a lots

@bgnq bgnq closed this as completed Aug 1, 2018
@frodrigo
Copy link
Contributor

frodrigo commented Aug 1, 2018

But there is still an issue. It should not raise a source code error.

@frodrigo frodrigo reopened this Aug 1, 2018
@braktar
Copy link
Contributor

braktar commented Aug 1, 2018

This commits should allow you to get some information about why the resolution is not performed :

b36b955

Thanks again for the report.

As said by frodrigo, an error should never be raised without being catch. So don't hesitate if your are facing any other issue.

@braktar braktar closed this as completed Aug 1, 2018
@braktar braktar added the bug label Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants