mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
add todo
This commit is contained in:
parent
9f49b96fa4
commit
3dd7706204
2 changed files with 2 additions and 27 deletions
|
|
@ -125,8 +125,7 @@ public class VehicleRoutingAlgorithm {
|
|||
initialSolutions.add(solution);
|
||||
}
|
||||
|
||||
|
||||
private void verify(VehicleRoutingProblemSolution solution) {
|
||||
private void verify(VehicleRoutingProblemSolution solution) {
|
||||
int nuJobs = 0;
|
||||
for(VehicleRoute route : solution.getRoutes()){
|
||||
nuJobs += route.getTourActivities().getJobs().size();
|
||||
|
|
@ -157,7 +156,6 @@ public class VehicleRoutingAlgorithm {
|
|||
public void setPrematureAlgorithmTermination(PrematureAlgorithmTermination prematureAlgorithmTermination){
|
||||
terminationManager = new TerminationManager();
|
||||
terminationManager.addTermination(prematureAlgorithmTermination);
|
||||
// this.prematureAlgorithmTermination = prematureAlgorithmTermination;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -237,18 +235,6 @@ public class VehicleRoutingAlgorithm {
|
|||
algoListeners.selectedStrategy(discoveredSolution,problem,solutions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of iterations.
|
||||
*
|
||||
* @return iterations
|
||||
* @deprecated use .getMaxIterations() instead
|
||||
*/
|
||||
@Deprecated
|
||||
public int getNuOfIterations(){
|
||||
return maxIterations;
|
||||
}
|
||||
|
||||
|
||||
private void algorithmEnds(VehicleRoutingProblem problem, Collection<VehicleRoutingProblemSolution> solutions) {
|
||||
algoListeners.algorithmEnds(problem, solutions);
|
||||
}
|
||||
|
|
@ -294,16 +280,5 @@ public class VehicleRoutingAlgorithm {
|
|||
return maxIterations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets max number of iterations.
|
||||
*
|
||||
* @param nOfIterations max number of iteration the algorithm runs
|
||||
* @deprecated use .setMaxIterations(int maxIterations) instead
|
||||
*/
|
||||
@Deprecated
|
||||
public void setNuOfIterations(int nOfIterations) {
|
||||
this.maxIterations = nOfIterations;
|
||||
logger.info("set nuOfIterations to " + nOfIterations);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ class InsertionNoiseMaker implements SoftActivityConstraint, IterationStartsList
|
|||
|
||||
private double noiseLevel = 0.1;
|
||||
|
||||
|
||||
public InsertionNoiseMaker(VehicleRoutingProblem vrp, double noiseLevel, double noiseProbability) {
|
||||
this.vrp = vrp;
|
||||
this.noiseLevel = noiseLevel;
|
||||
|
|
@ -39,6 +38,7 @@ class InsertionNoiseMaker implements SoftActivityConstraint, IterationStartsList
|
|||
determineMaxCosts(vrp);
|
||||
}
|
||||
|
||||
//@ToDo refactor determining max costs to allow skipping this
|
||||
private void determineMaxCosts(VehicleRoutingProblem vrp) {
|
||||
double max = 0.;
|
||||
for(Job i : vrp.getJobs().values()){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue