mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
remove redundant dependency apache.commons.math
This commit is contained in:
parent
3966590fc7
commit
cf284ee27d
8 changed files with 64 additions and 47 deletions
|
|
@ -26,7 +26,7 @@ import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolutio
|
|||
import com.graphhopper.jsprit.core.util.BenchmarkInstance;
|
||||
import com.graphhopper.jsprit.core.util.BenchmarkResult;
|
||||
import com.graphhopper.jsprit.core.util.Solutions;
|
||||
import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
|
||||
import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
|
|
|||
|
|
@ -88,14 +88,6 @@
|
|||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-math</artifactId>
|
||||
<version>2.2</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-configuration</groupId>
|
||||
<artifactId>commons-configuration</artifactId>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
|||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.util.Resource;
|
||||
import com.graphhopper.jsprit.core.util.Solutions;
|
||||
import org.apache.commons.math.stat.descriptive.moment.StandardDeviation;
|
||||
import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
|||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.util.Resource;
|
||||
import com.graphhopper.jsprit.core.util.Solutions;
|
||||
import org.apache.commons.math.stat.descriptive.moment.StandardDeviation;
|
||||
import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class BreakScheduling implements InsertionStartsListener,JobInsertedListe
|
|||
stateManager.removed(aBreak,inRoute);
|
||||
stateManager.reCalculateStates(inRoute);
|
||||
}
|
||||
if(inRoute.getEnd().getArrTime() > aBreak.getTimeWindow().getEnd()){
|
||||
// if(inRoute.getEnd().getArrTime() > aBreak.getTimeWindow().getEnd()){
|
||||
InsertionData iData = breakInsertionCalculator.getInsertionData(inRoute, aBreak, inRoute.getVehicle(), inRoute.getDepartureTime(), inRoute.getDriver(), Double.MAX_VALUE);
|
||||
if(!(iData instanceof InsertionData.NoInsertionFound)){
|
||||
logger.trace("insert: [jobId={}]{}", aBreak.getId(), iData);
|
||||
|
|
@ -55,7 +55,7 @@ public class BreakScheduling implements InsertionStartsListener,JobInsertedListe
|
|||
}
|
||||
stateManager.informJobInserted(aBreak,inRoute,0,0);
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ public class BreakScheduling implements InsertionStartsListener,JobInsertedListe
|
|||
for(VehicleRoute route : vehicleRoutes){
|
||||
Break aBreak = route.getVehicle().getBreak();
|
||||
if(aBreak != null && !route.getTourActivities().servesJob(aBreak)){
|
||||
if(route.getEnd().getArrTime() > aBreak.getTimeWindow().getEnd()){
|
||||
// if(route.getEnd().getArrTime() > aBreak.getTimeWindow().getEnd()){
|
||||
InsertionData iData = breakInsertionCalculator.getInsertionData(route, aBreak, route.getVehicle(), route.getDepartureTime(), route.getDriver(), Double.MAX_VALUE);
|
||||
if(!(iData instanceof InsertionData.NoInsertionFound)){
|
||||
logger.trace("insert: [jobId={}]{}", aBreak.getId(), iData);
|
||||
|
|
@ -99,7 +99,7 @@ public class BreakScheduling implements InsertionStartsListener,JobInsertedListe
|
|||
}
|
||||
stateManager.informJobInserted(aBreak,route,0,0);
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ import com.graphhopper.jsprit.core.algorithm.listener.IterationStartsListener;
|
|||
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
|
||||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.util.Solutions;
|
||||
import org.apache.commons.math.stat.StatUtils;
|
||||
import org.apache.commons.math.stat.descriptive.moment.StandardDeviation;
|
||||
import org.apache.commons.math3.stat.StatUtils;
|
||||
import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
******************************************************************************/
|
||||
package com.graphhopper.jsprit.core.util;
|
||||
|
||||
import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
|
||||
import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
|
||||
|
||||
|
||||
public class BenchmarkResult {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<problem xmlns="http://www.w3schools.com"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com vrp_xml_schema.xsd">
|
||||
<problemType>
|
||||
<fleetSize>FINITE</fleetSize>
|
||||
<fleetSize>INFINITE</fleetSize>
|
||||
</problemType>
|
||||
<vehicles>
|
||||
<vehicle>
|
||||
|
|
@ -20,21 +20,6 @@
|
|||
</timeSchedule>
|
||||
<returnToDepot>true</returnToDepot>
|
||||
</vehicle>
|
||||
<vehicle>
|
||||
<id>v2</id>
|
||||
<typeId>vehType2</typeId>
|
||||
<startLocation>
|
||||
<id>loc</id>
|
||||
</startLocation>
|
||||
<endLocation>
|
||||
<id>loc</id>
|
||||
</endLocation>
|
||||
<timeSchedule>
|
||||
<start>0.0</start>
|
||||
<end>1.7976931348623157E308</end>
|
||||
</timeSchedule>
|
||||
<returnToDepot>true</returnToDepot>
|
||||
</vehicle>
|
||||
</vehicles>
|
||||
<vehicleTypes>
|
||||
<type>
|
||||
|
|
@ -50,18 +35,58 @@
|
|||
<wait>0.0</wait>
|
||||
</costs>
|
||||
</type>
|
||||
<type>
|
||||
<id>vehType2</id>
|
||||
<capacity-dimensions>
|
||||
<dimension index="0">200</dimension>
|
||||
</capacity-dimensions>
|
||||
<costs>
|
||||
<fixed>0.0</fixed>
|
||||
<distance>1.0</distance>
|
||||
<time>0.0</time>
|
||||
<service>0.0</service>
|
||||
<wait>0.0</wait>
|
||||
</costs>
|
||||
</type>
|
||||
</vehicleTypes>
|
||||
<services>
|
||||
<service id="1" type="service">
|
||||
<location>
|
||||
<id>loc</id>
|
||||
</location>
|
||||
<capacity-dimensions>
|
||||
<dimension index="0">1</dimension>
|
||||
</capacity-dimensions>
|
||||
<duration>2.0</duration>
|
||||
<timeWindows>
|
||||
<timeWindow>
|
||||
<start>0.0</start>
|
||||
<end>1.7976931348623157E308</end>
|
||||
</timeWindow>
|
||||
</timeWindows>
|
||||
</service>
|
||||
<service id="2" type="service">
|
||||
<location>
|
||||
<id>loc2</id>
|
||||
</location>
|
||||
<capacity-dimensions>
|
||||
<dimension index="0">1</dimension>
|
||||
</capacity-dimensions>
|
||||
<duration>4.0</duration>
|
||||
<timeWindows>
|
||||
<timeWindow>
|
||||
<start>0.0</start>
|
||||
<end>1.7976931348623157E308</end>
|
||||
</timeWindow>
|
||||
</timeWindows>
|
||||
</service>
|
||||
</services>
|
||||
<solutions>
|
||||
<solution>
|
||||
<cost>10.0</cost>
|
||||
<routes>
|
||||
<route>
|
||||
<driverId>noDriver</driverId>
|
||||
<vehicleId>v1</vehicleId>
|
||||
<start>0.0</start>
|
||||
<act type="service">
|
||||
<serviceId>1</serviceId>
|
||||
<arrTime>0.0</arrTime>
|
||||
<endTime>0.0</endTime>
|
||||
</act>
|
||||
<end>0.0</end>
|
||||
</route>
|
||||
</routes>
|
||||
<unassignedJobs>
|
||||
<job id="2"/>
|
||||
</unassignedJobs>
|
||||
</solution>
|
||||
</solutions>
|
||||
</problem>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue