Jsprit.Parameter.FAST_REGRET

is the initial route part of the input file input/cordeau01.xml?

No, it is not.
I understand your point. You are thinking that the services in the initial route are added to vrp if they are in input/cordeau01.xml.

what I mean is that, if the initial route is not part of the input file, then the ids of the jobs in the initial route (i.e., “26” and “44”) will not be in the set of freezedJobIds in VrpXMLReader, and thus those two jobs will be added to the vrp by .addJob().

btw, I am assuming services “26” and “44” are part of the input file, because, if not, I wonder how you get the jobs and add them to the initial route by .addService(getService(“44”, vrpBuilder))?

You are right, it is part of the input file. But it looks like for some reason the jobs in the initial route are not in the set of freezedJobIds, right?

job ids are added to the set of freezedJobIds only in readInitialRoutes(), so, if the initial route itself is not part of the input file, the ids of the jobs in it will not be in the set of freezedJobIds.

so I think what you need to do is 1) to add the initial route into the input xml file, and 2) to remove the following part of the code which adds the initial route to the vrp, because it will be duplicate and throw error.

/*
 * Add initial route with 1_4_vehicle and services 44, 26
 */
VehicleRoute initialRoute = VehicleRoute.Builder.newInstance(getVehicle("1_4_vehicle", vrpBuilder)).addService(getService("44", vrpBuilder))
    .addService(getService("26", vrpBuilder)).build();
vrpBuilder.addInitialVehicleRoute(initialRoute);

Ok, I got it. Thank you!