Optaplanner remove customer from working VRP solution
问题 Based on this question i tried the following: public void doFactChange() { Location toBeRemovedLocation = customerToBeRemoved.getLocation(); Location lookUpWorkingObject = (Location) scoreDirector.lookUpWorkingObject(toBeRemovedLocation); scoreDirector.beforeProblemFactRemoved(lookUpWorkingObject); routingSolution.getLocationList().remove(lookUpWorkingObject); scoreDirector.afterProblemFactRemoved(lookUpWorkingObject); Customer workingCustomer = (Customer) scoreDirector.lookUpWorkingObject