Ignore travel from / to start location


We have a scenario where travel to the first job and travel after the last job is not considered part of a workers shift. This means we need to be able to ignore the cost of travel for these journeys. Is this possible in Jsprit? Alternatively, is it possible to simply not include a start location for a vehicle so that it starts at it’s first job and ends at the last job?



Hi Jon

When you build the vehicle just set the returnToDepot as false:

			Builder vehicleBuilder = VehicleImpl.Builder.newInstance(deviceID)
					.setStartLocation(loc(Coordinate.newInstance(vehicleStartLat, vehicleStartLon)))

Im fairly certain you have to set the startLocation or you will get a null exception error. (a quick test did for me)

I hope this helps.