graphhopper/jsprit

Bug in VrpXMLReader when calling .read with solutions, all solutions have zeros arrTime and endTime

asma-safaya opened this issue · 2 comments

I think this is a bug,
I read an xml file (wrote using VrpXMLWriter) with problem and solutions as following:

VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
ArrayList solutions = new ArrayList<>();
new VrpXMLReader(builder, solutions).read(fileName);
VehicleRoutingProblem vrp = builder.build();

While debugging I found that in all solutions, all activities have 0.0 values for both arrTime and endTime (although I see their values in the xml file)

arrTime and endTime are modified and determined by the search for a solution, therefore, I do not see any point to specify it here.

Hi @oblonski could you reconsider adding it in the reader?
In our use case we use jsprit to plan a tour and want to translate the output further by reading and processing the solution based on the arrival/end times found. What would be the point in writing them out then?

Similarly, the "name" attribute of shipment locations are lost when writing/reading. Currently we're overwritng the Reader/Writer in our classpath but I would prefer a "cleaner" solution.

What do you think?
Thanks in advance