1
0
Fork 0
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:
oblonski 2015-09-11 12:36:49 +02:00
parent 33075b479f
commit cc507e9cf5
42 changed files with 42 additions and 42 deletions

View file

@ -110,7 +110,7 @@ public class ExperimentalSchrimpfAcceptance implements SolutionAcceptor, Iterati
this.nOfTotalIterations = algorithm.getMaxIterations(); this.nOfTotalIterations = algorithm.getMaxIterations();
/* /*
* randomWalk to determine standardDev * randomWalk to determine standardDev
*/ */
final double[] results = new double[nOfRandomWalks]; final double[] results = new double[nOfRandomWalks];

View file

@ -53,7 +53,7 @@ public class SchrimpfInitialThresholdGenerator implements AlgorithmStartsListene
double now = System.currentTimeMillis(); double now = System.currentTimeMillis();
/* /*
* randomWalk to determine standardDev * randomWalk to determine standardDev
*/ */
final double[] results = new double[nOfRandomWalks]; final double[] results = new double[nOfRandomWalks];

View file

@ -167,7 +167,7 @@ public final class BestInsertionConcurrent extends AbstractInsertionStrategy {
List<Batch> batches = new ArrayList<Batch>(); List<Batch> batches = new ArrayList<Batch>();
for (int i = 0; i < nuOfBatches; i++) batches.add(new 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 * else add one empty route anyway
*/ */
if (vehicleRoutes.size() < nuOfBatches) { if (vehicleRoutes.size() < nuOfBatches) {

View file

@ -71,7 +71,7 @@ class TimeWindowConstraint implements HardActivityConstraint {
latestVehicleArrival < nextAct.getTheoreticalEarliestOperationStartTime()) { latestVehicleArrival < nextAct.getTheoreticalEarliestOperationStartTime()) {
return ConstraintsStatus.NOT_FULFILLED_BREAK; return ConstraintsStatus.NOT_FULFILLED_BREAK;
} }
/* /*
* if the latest operation start-time of new activity is smaller than the earliest start of prev. activity, * if the latest operation start-time of new activity is smaller than the earliest start of prev. activity,
* then * then
* *

View file

@ -78,7 +78,7 @@ public class VehicleDependentTimeWindowConstraints implements HardActivityConstr
latestVehicleArrival < nextAct.getTheoreticalEarliestOperationStartTime()) { latestVehicleArrival < nextAct.getTheoreticalEarliestOperationStartTime()) {
return ConstraintsStatus.NOT_FULFILLED_BREAK; return ConstraintsStatus.NOT_FULFILLED_BREAK;
} }
/* /*
* if the latest operation start-time of new activity is smaller than the earliest start of prev. activity, * if the latest operation start-time of new activity is smaller than the earliest start of prev. activity,
* then * then
* *

View file

@ -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); VehicleTypeImpl.Builder typeBuilder = VehicleTypeImpl.Builder.newInstance("vehicle-type").addCapacityDimension(0, 23);
typeBuilder.setCostPerDistance(1.0); typeBuilder.setCostPerDistance(1.0);

View file

@ -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); VehicleTypeImpl.Builder typeBuilder = VehicleTypeImpl.Builder.newInstance("vehicle-type").addCapacityDimension(0, 23);
typeBuilder.setCostPerDistance(1.0).setCostPerTime(1.); typeBuilder.setCostPerDistance(1.0).setCostPerTime(1.);

View file

@ -60,7 +60,7 @@ public class RefuseCollection_IT {
VehicleImpl bigVehicle = vehicleBuilder.build(); VehicleImpl bigVehicle = vehicleBuilder.build();
/* /*
* start building the problem * start building the problem
*/ */
VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
vrpBuilder.setFleetSize(FleetSize.INFINITE); vrpBuilder.setFleetSize(FleetSize.INFINITE);

View file

@ -70,7 +70,7 @@ public class SchrimpfAcceptanceTest {
public void respectsTheNonZeroThreshold_usingWorstCostSolution() { public void respectsTheNonZeroThreshold_usingWorstCostSolution() {
schrimpfAcceptance.setInitialThreshold(0.5); 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 * 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))); assertTrue("Worst cost solution (2.1 > 2.0) should be accepted", schrimpfAcceptance.acceptSolution(memory, createSolutionWithCost(2.1)));

View file

@ -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()); 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*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.) = * relFixNew - relFixOld = (75/100+100/400)/2.*100 - ((25/50+100/100)/2.*50.) =
* )*0.5*0.5 * )*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 * = (0.5*(100-50)+0.5*((75/100+100/400)/2.*100 - ((25/50+100/100)/2.*50.)))*0.5*0.5

View file

@ -39,7 +39,7 @@ public class TestMixedServiceAndShipmentsProblemOnRouteLevel {
@Test(expected = UnsupportedOperationException.class) @Test(expected = UnsupportedOperationException.class)
public void whenHavingShipmentsAndServicesInOneProblem_andInsertionShouldBeMadeOnRouteLevel_throwException() { public void whenHavingShipmentsAndServicesInOneProblem_andInsertionShouldBeMadeOnRouteLevel_throwException() {
/* get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 /* 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); VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 2);
VehicleType vehicleType = vehicleTypeBuilder.build(); VehicleType vehicleType = vehicleTypeBuilder.build();

View file

@ -234,7 +234,7 @@ public class BicycleMessenger {
Examples.createOutputFolder(); Examples.createOutputFolder();
/* /*
build the problem build the problem
*/ */
VehicleRoutingProblem.Builder problemBuilder = VehicleRoutingProblem.Builder.newInstance(); VehicleRoutingProblem.Builder problemBuilder = VehicleRoutingProblem.Builder.newInstance();
problemBuilder.setFleetSize(FleetSize.FINITE); problemBuilder.setFleetSize(FleetSize.FINITE);

View file

@ -156,7 +156,7 @@ public class BuildAlgorithmFromScratch {
RuinStrategy radialRuin = new RadialRuinStrategyFactory(0.3, new AvgServiceAndShipmentDistance(vrp.getTransportCosts())).createStrategy(vrp); RuinStrategy radialRuin = new RadialRuinStrategyFactory(0.3, new AvgServiceAndShipmentDistance(vrp.getTransportCosts())).createStrategy(vrp);
/* /*
* objective function * objective function
*/ */
SolutionCostCalculator objectiveFunction = getObjectiveFunction(vrp); SolutionCostCalculator objectiveFunction = getObjectiveFunction(vrp);

View file

@ -41,7 +41,7 @@ public class ConfigureAlgorithmInCodeInsteadOfPerXml {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -45,7 +45,7 @@ public class CostMatrixExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -44,7 +44,7 @@ public class EnRoutePickupAndDeliveryWithMultipleDepotsAndOpenRoutesExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -43,7 +43,7 @@ public class MultipleDepotExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -45,7 +45,7 @@ public class MultipleDepotExample2 {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -40,7 +40,7 @@ public class MultipleDepotWithInitialRoutesExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -38,7 +38,7 @@ public class PickupAndDeliveryExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -42,7 +42,7 @@ public class PickupAndDeliveryExample2 {
Examples.createOutputFolder(); Examples.createOutputFolder();
/* /*
* Build the problem. * Build the problem.
* *
* But define a problem-builder first. * But define a problem-builder first.
*/ */

View file

@ -36,7 +36,7 @@ public class PickupAndDeliveryOpenExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -50,7 +50,7 @@ public class RefuseCollectionExample {
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -49,7 +49,7 @@ public class RefuseCollectionWithFastMatrixExample {
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -42,7 +42,7 @@ public class ServicePickupsWithMultipleDepotsExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -41,7 +41,7 @@ public class SimpleDepotBoundedPickupAndDeliveryExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -42,7 +42,7 @@ public class SimpleEnRoutePickupAndDeliveryExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -41,7 +41,7 @@ public class SimpleEnRoutePickupAndDeliveryOpenRoutesExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -44,7 +44,7 @@ public class SimpleEnRoutePickupAndDeliveryWithDepotBoundedDeliveriesExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -41,7 +41,7 @@ public class SimpleExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
File dir = new File("output"); File dir = new File("output");
// if the directory does not exist, create it // if the directory does not exist, create it

View file

@ -39,7 +39,7 @@ public class SimpleExampleOpenRoutes {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -43,7 +43,7 @@ public class SimpleExampleWithSkills {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
File dir = new File("output"); File dir = new File("output");
// if the directory does not exist, create it // if the directory does not exist, create it

View file

@ -44,7 +44,7 @@ public class SimpleVRPWithBackhaulsExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -35,7 +35,7 @@ public class SolomonExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -36,7 +36,7 @@ public class SolomonExampleWithSpecifiedVehicleEndLocations {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
File dir = new File("output"); File dir = new File("output");
// if the directory does not exist, create it // if the directory does not exist, create it

View file

@ -35,7 +35,7 @@ public class SolomonExampleWithSpecifiedVehicleEndLocationsWithoutTWs {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
File dir = new File("output"); File dir = new File("output");
// if the directory does not exist, create it // if the directory does not exist, create it

View file

@ -35,7 +35,7 @@ public class SolomonOpenExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -34,7 +34,7 @@ public class SolomonR101Example {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -37,7 +37,7 @@ public class SolomonWithRegretInsertionExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -50,7 +50,7 @@ public class TransportOfDisabledPeople {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -38,7 +38,7 @@ public class VRPWithBackhaulsExample {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();

View file

@ -43,7 +43,7 @@ public class VRPWithBackhaulsExample2 {
public static void main(String[] args) { public static void main(String[] args) {
/* /*
* some preparation - create output folder * some preparation - create output folder
*/ */
Examples.createOutputFolder(); Examples.createOutputFolder();