graphhopper/jsprit

making vehicles and jobs immutable again

Opened this issue · 3 comments

@michalmac suggests "to create copies for internal use just before optimisation starts (it is not much of an overhead), while at the end, the original objects will be referred to in the solution produced

Optional step: I would even consider getting rid of HasIndex from Job/Vehicle, and use JobWithIndex/VehicleWithIndex internally, both implementing HasIndex."

I like this idea but still we need to find out the implications for constraints.

These "...WithIndex" objects could be just simple wrappers around the original objects...