mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Merge remote-tracking branch 'choose_remote_name/relaxAPI' into
PickupAndDelivery Conflicts: jsprit-core/src/main/java/algorithms/CalculatorBuilder.java jsprit-core/src/main/java/algorithms/HardConstraints.java jsprit-core/src/main/java/algorithms/ServiceInsertionCalculator.java jsprit-core/src/main/java/basics/route/TourActivities.java jsprit-core/src/test/java/algorithms/BuildCVRPAlgoFromScratchTest.java jsprit-core/src/test/java/algorithms/BuildPDVRPAlgoFromScratchTest.java jsprit-core/src/test/java/algorithms/GendreauPostOptTest.java jsprit-core/src/test/java/algorithms/TestCalculatesServiceInsertion.java
This commit is contained in:
commit
d63abea764
122 changed files with 3454 additions and 3171 deletions
|
|
@ -118,8 +118,10 @@ public class AlgorithmSearchProgressChartListener implements IterationEndsListen
|
|||
XYPlot plot = chart.getXYPlot();
|
||||
|
||||
NumberAxis yAxis = (NumberAxis) plot.getRangeAxis();
|
||||
Range rangeY = new Range(minValue-0.05*minValue,maxValue + 0.05*maxValue);
|
||||
yAxis.setRange(rangeY);
|
||||
Range rangeBounds = coll.getRangeBounds(true);
|
||||
double upper = Math.min(rangeBounds.getUpperBound(), rangeBounds.getLowerBound()*5);
|
||||
if(upper == 0.0){ upper = 10000; }
|
||||
yAxis.setRangeWithMargins(rangeBounds.getLowerBound(),upper);
|
||||
|
||||
try {
|
||||
ChartUtilities.saveChartAsJPEG(new File(filename), chart, 1000, 600);
|
||||
|
|
@ -143,9 +145,9 @@ public class AlgorithmSearchProgressChartListener implements IterationEndsListen
|
|||
double best = Double.MAX_VALUE;
|
||||
double sum = 0.0;
|
||||
for(VehicleRoutingProblemSolution sol : solutions){
|
||||
if(sol.getCost() > worst) worst = sol.getCost();
|
||||
if(sol.getCost() > worst) worst = Math.min(sol.getCost(),Double.MAX_VALUE);
|
||||
if(sol.getCost() < best) best = sol.getCost();
|
||||
sum += sol.getCost();
|
||||
sum += Math.min(sol.getCost(),Double.MAX_VALUE);
|
||||
}
|
||||
bestResultList.add(best);
|
||||
worstResultList.add(worst);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue