mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
replaced old TimeWindowUpdater with new one
This commit is contained in:
parent
0215b8eac6
commit
3f9e217e6c
1 changed files with 6 additions and 7 deletions
|
|
@ -18,18 +18,17 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.problem.constraint;
|
package jsprit.core.problem.constraint;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.misc.JobInsertionContext;
|
import jsprit.core.problem.misc.JobInsertionContext;
|
||||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||||
import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manager that manage hard- and soft constraints, both on route and activity level.
|
* Manager that manage hard- and soft constraints, both on route and activity level.
|
||||||
*
|
*
|
||||||
|
|
@ -99,7 +98,7 @@ public class ConstraintManager implements HardActivityStateLevelConstraint, Hard
|
||||||
|
|
||||||
public void addTimeWindowConstraint(){
|
public void addTimeWindowConstraint(){
|
||||||
if(!timeWindowConstraintsSet){
|
if(!timeWindowConstraintsSet){
|
||||||
addConstraint(new TimeWindowConstraint(stateManager, vrp.getTransportCosts()),Priority.HIGH);
|
addConstraint(new VehicleDependentTimeWindowConstraints(stateManager, vrp.getTransportCosts()),Priority.HIGH);
|
||||||
timeWindowConstraintsSet = true;
|
timeWindowConstraintsSet = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue