mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
add editorconfig - #174
This commit is contained in:
parent
33075b479f
commit
cc507e9cf5
42 changed files with 42 additions and 42 deletions
|
|
@ -110,7 +110,7 @@ public class ExperimentalSchrimpfAcceptance implements SolutionAcceptor, Iterati
|
|||
this.nOfTotalIterations = algorithm.getMaxIterations();
|
||||
|
||||
/*
|
||||
* randomWalk to determine standardDev
|
||||
* randomWalk to determine standardDev
|
||||
*/
|
||||
final double[] results = new double[nOfRandomWalks];
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class SchrimpfInitialThresholdGenerator implements AlgorithmStartsListene
|
|||
double now = System.currentTimeMillis();
|
||||
|
||||
/*
|
||||
* randomWalk to determine standardDev
|
||||
* randomWalk to determine standardDev
|
||||
*/
|
||||
final double[] results = new double[nOfRandomWalks];
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ public final class BestInsertionConcurrent extends AbstractInsertionStrategy {
|
|||
List<Batch> batches = new ArrayList<Batch>();
|
||||
for (int i = 0; i < nuOfBatches; i++) batches.add(new Batch());
|
||||
/*
|
||||
* if route.size < nuOfBatches add as much routes as empty batches are available
|
||||
* if route.size < nuOfBatches add as much routes as empty batches are available
|
||||
* else add one empty route anyway
|
||||
*/
|
||||
if (vehicleRoutes.size() < nuOfBatches) {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class TimeWindowConstraint implements HardActivityConstraint {
|
|||
latestVehicleArrival < nextAct.getTheoreticalEarliestOperationStartTime()) {
|
||||
return ConstraintsStatus.NOT_FULFILLED_BREAK;
|
||||
}
|
||||
/*
|
||||
/*
|
||||
* if the latest operation start-time of new activity is smaller than the earliest start of prev. activity,
|
||||
* then
|
||||
*
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class VehicleDependentTimeWindowConstraints implements HardActivityConstr
|
|||
latestVehicleArrival < nextAct.getTheoreticalEarliestOperationStartTime()) {
|
||||
return ConstraintsStatus.NOT_FULFILLED_BREAK;
|
||||
}
|
||||
/*
|
||||
/*
|
||||
* if the latest operation start-time of new activity is smaller than the earliest start of prev. activity,
|
||||
* then
|
||||
*
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_IT {
|
|||
|
||||
|
||||
/*
|
||||
* create vehicle-type and vehicle
|
||||
* create vehicle-type and vehicle
|
||||
*/
|
||||
VehicleTypeImpl.Builder typeBuilder = VehicleTypeImpl.Builder.newInstance("vehicle-type").addCapacityDimension(0, 23);
|
||||
typeBuilder.setCostPerDistance(1.0);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_withTimeAndD
|
|||
|
||||
|
||||
/*
|
||||
* create vehicle-type and vehicle
|
||||
* create vehicle-type and vehicle
|
||||
*/
|
||||
VehicleTypeImpl.Builder typeBuilder = VehicleTypeImpl.Builder.newInstance("vehicle-type").addCapacityDimension(0, 23);
|
||||
typeBuilder.setCostPerDistance(1.0).setCostPerTime(1.);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class RefuseCollection_IT {
|
|||
VehicleImpl bigVehicle = vehicleBuilder.build();
|
||||
|
||||
/*
|
||||
* start building the problem
|
||||
* start building the problem
|
||||
*/
|
||||
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
|
||||
vrpBuilder.setFleetSize(FleetSize.INFINITE);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class SchrimpfAcceptanceTest {
|
|||
public void respectsTheNonZeroThreshold_usingWorstCostSolution() {
|
||||
schrimpfAcceptance.setInitialThreshold(0.5);
|
||||
/*
|
||||
* it should be accepted since 2.1 < 2.0 + 0.5 (2.0 is the best solution found so far and 0.5 the ini threshold
|
||||
* it should be accepted since 2.1 < 2.0 + 0.5 (2.0 is the best solution found so far and 0.5 the ini threshold
|
||||
* since the threshold of 0.5 allows new solutions to be <0.5 worse than the current best solution
|
||||
*/
|
||||
assertTrue("Worst cost solution (2.1 > 2.0) should be accepted", schrimpfAcceptance.acceptSolution(memory, createSolutionWithCost(2.1)));
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ public class JobInsertionConsideringFixCostsCalculatorTest {
|
|||
when(stateGetter.getRouteState(route, InternalStates.MAXLOAD, Capacity.class)).thenReturn(Capacity.Builder.newInstance().addDimension(0, 25).addDimension(1, 100).build());
|
||||
//(0.5*absFix + 0.5*relFix) * 0.5 * 0.= (0.5*(100-50)+0.5*(75-25))*0.5*0.5 = 12.5
|
||||
/*
|
||||
* (0.5*(100-50)+0.5*(
|
||||
* (0.5*(100-50)+0.5*(
|
||||
* relFixNew - relFixOld = (75/100+100/400)/2.*100 - ((25/50+100/100)/2.*50.) =
|
||||
* )*0.5*0.5
|
||||
* = (0.5*(100-50)+0.5*((75/100+100/400)/2.*100 - ((25/50+100/100)/2.*50.)))*0.5*0.5
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class TestMixedServiceAndShipmentsProblemOnRouteLevel {
|
|||
@Test(expected = UnsupportedOperationException.class)
|
||||
public void whenHavingShipmentsAndServicesInOneProblem_andInsertionShouldBeMadeOnRouteLevel_throwException() {
|
||||
/* get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2
|
||||
*/
|
||||
*/
|
||||
VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 2);
|
||||
VehicleType vehicleType = vehicleTypeBuilder.build();
|
||||
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ public class BicycleMessenger {
|
|||
Examples.createOutputFolder();
|
||||
|
||||
/*
|
||||
build the problem
|
||||
build the problem
|
||||
*/
|
||||
VehicleRoutingProblem.Builder problemBuilder = VehicleRoutingProblem.Builder.newInstance();
|
||||
problemBuilder.setFleetSize(FleetSize.FINITE);
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ public class BuildAlgorithmFromScratch {
|
|||
RuinStrategy radialRuin = new RadialRuinStrategyFactory(0.3, new AvgServiceAndShipmentDistance(vrp.getTransportCosts())).createStrategy(vrp);
|
||||
|
||||
/*
|
||||
* objective function
|
||||
* objective function
|
||||
*/
|
||||
SolutionCostCalculator objectiveFunction = getObjectiveFunction(vrp);
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class ConfigureAlgorithmInCodeInsteadOfPerXml {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class CostMatrixExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class EnRoutePickupAndDeliveryWithMultipleDepotsAndOpenRoutesExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class MultipleDepotExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class MultipleDepotExample2 {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class MultipleDepotWithInitialRoutesExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class PickupAndDeliveryExample {
|
|||
public static void main(String[] args) {
|
||||
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class PickupAndDeliveryExample2 {
|
|||
Examples.createOutputFolder();
|
||||
|
||||
/*
|
||||
* Build the problem.
|
||||
* Build the problem.
|
||||
*
|
||||
* But define a problem-builder first.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class PickupAndDeliveryOpenExample {
|
|||
public static void main(String[] args) {
|
||||
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class RefuseCollectionExample {
|
|||
|
||||
public static void main(String[] args) throws IOException {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class RefuseCollectionWithFastMatrixExample {
|
|||
|
||||
public static void main(String[] args) throws IOException {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class ServicePickupsWithMultipleDepotsExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class SimpleDepotBoundedPickupAndDeliveryExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class SimpleEnRoutePickupAndDeliveryExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class SimpleEnRoutePickupAndDeliveryOpenRoutesExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class SimpleEnRoutePickupAndDeliveryWithDepotBoundedDeliveriesExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class SimpleExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
File dir = new File("output");
|
||||
// if the directory does not exist, create it
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class SimpleExampleOpenRoutes {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class SimpleExampleWithSkills {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
File dir = new File("output");
|
||||
// if the directory does not exist, create it
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class SimpleVRPWithBackhaulsExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class SolomonExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class SolomonExampleWithSpecifiedVehicleEndLocations {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
File dir = new File("output");
|
||||
// if the directory does not exist, create it
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class SolomonExampleWithSpecifiedVehicleEndLocationsWithoutTWs {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
File dir = new File("output");
|
||||
// if the directory does not exist, create it
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class SolomonOpenExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class SolomonR101Example {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class SolomonWithRegretInsertionExample {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class TransportOfDisabledPeople {
|
|||
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class VRPWithBackhaulsExample {
|
|||
public static void main(String[] args) {
|
||||
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class VRPWithBackhaulsExample2 {
|
|||
public static void main(String[] args) {
|
||||
|
||||
/*
|
||||
* some preparation - create output folder
|
||||
* some preparation - create output folder
|
||||
*/
|
||||
Examples.createOutputFolder();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue