*/
//map mapping nearest messengers, i.e. for each envelope the direct-delivery-time with the fastest messenger is stored here
Map<String,Double> nearestMessengers = getNearestMessengers(routingCosts, problemBuilder.getAddedJobs(), problemBuilder.getAddedVehicles());
//define stateManager to update the required activity-state: "latest-activity-start-time"
StateManager stateManager = new StateManager(bicycleMessengerProblem);
//create state
StateId latest_act_arrival_time_stateId = stateManager.createStateId("latest-act-arrival-time");
//and make sure you update the activity-state "latest-activity-start-time" the way it is defined above
stateManager.addStateUpdater(new UpdateLatestActivityStartTimes(latest_act_arrival_time_stateId, stateManager, routingCosts, nearestMessengers));
stateManager.updateLoadStates();
ConstraintManager constraintManager = new ConstraintManager(bicycleMessengerProblem,stateManager);
constraintManager.addLoadConstraint();
constraintManager.addConstraint(new ThreeTimesLessThanBestDirectRouteConstraint(latest_act_arrival_time_stateId,nearestMessengers,routingCosts,stateManager), ConstraintManager.Priority.CRITICAL);
constraintManager.addConstraint(new IgnoreMessengerThatCanNeverMeetTimeRequirements(nearestMessengers, routingCosts));