GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Failed
Push — master ( 77a95b...6c805f )
by Igor
08:36 queued 12s
created
examples/AdvancedConstraints/PersistentLocation.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -23,25 +23,25 @@  discard block
 block discarded – undo
23 23
 //**********************************************************************
24 24
 // General Route Parameters
25 25
 $parameters = RouteParameters::fromArray([
26
-    'rt' => false,
27
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
28
-    'route_name' => 'Persistent Location - Single Depot - Multiple Driver '.date('Y-m-d H:i:s', time()),
29
-    'route_time' => 25200,
30
-    'distance_unit' => DistanceUnit::MILES,
31
-    'device_type' => DeviceType::WEB,
32
-    'optimize' => OptimizationType::DISTANCE,
33
-    'travel_mode' => TravelMode::DRIVING,
34
-    'advanced_constraints' => [] 
26
+	'rt' => false,
27
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
28
+	'route_name' => 'Persistent Location - Single Depot - Multiple Driver '.date('Y-m-d H:i:s', time()),
29
+	'route_time' => 25200,
30
+	'distance_unit' => DistanceUnit::MILES,
31
+	'device_type' => DeviceType::WEB,
32
+	'optimize' => OptimizationType::DISTANCE,
33
+	'travel_mode' => TravelMode::DRIVING,
34
+	'advanced_constraints' => [] 
35 35
 ]);
36 36
 
37 37
 //**********************************************************************
38 38
 // Persistent Location
39 39
 $persistent_location = [
40
-    'alias' =>  'DEPOT END LOCATION',
41
-    'address' =>  '4738 BELLEVUE AVE, Louisville, KY, 40215',
42
-    'lat' =>  38.179806,
43
-    'lng' =>  -85.775558,
44
-    'time' =>  300
40
+	'alias' =>  'DEPOT END LOCATION',
41
+	'address' =>  '4738 BELLEVUE AVE, Louisville, KY, 40215',
42
+	'lat' =>  38.179806,
43
+	'lng' =>  -85.775558,
44
+	'time' =>  300
45 45
 ];
46 46
 
47 47
 //**********************************************************************
@@ -50,23 +50,23 @@  discard block
 block discarded – undo
50 50
 // Time Window Start:  2:00 am EST
51 51
 // Time Window End:   15:50 am EST
52 52
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
53
-    'max_cargo_volume' => 0.0,
54
-    'max_capacity' => 200,
55
-    'members_count' => 10,
56
-    'available_time_windows' => [[25200, 75000]
57
-    ],
58
-    'location_sequence_pattern' => ['', $persistent_location]
53
+	'max_cargo_volume' => 0.0,
54
+	'max_capacity' => 200,
55
+	'members_count' => 10,
56
+	'available_time_windows' => [[25200, 75000]
57
+	],
58
+	'location_sequence_pattern' => ['', $persistent_location]
59 59
 ]);
60 60
 
61 61
 // Schedule 2
62 62
 // Time Window Start:  7:33 am EST
63 63
 // Time Window End:   21:23 am EST
64 64
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
65
-    'max_cargo_volume' => 0.0,
66
-    'max_capacity' => 200,
67
-    'members_count' => 10,
68
-    'available_time_windows' => [[45200, 95000]],
69
-    'location_sequence_pattern' => ['', $persistent_location]
65
+	'max_cargo_volume' => 0.0,
66
+	'max_capacity' => 200,
67
+	'members_count' => 10,
68
+	'available_time_windows' => [[45200, 95000]],
69
+	'location_sequence_pattern' => ['', $persistent_location]
70 70
 ]);
71 71
 
72 72
 //**********************************************************************
@@ -75,25 +75,25 @@  discard block
 block discarded – undo
75 75
 
76 76
 // Depot
77 77
 $addresses[] = Address::fromArray([
78
-    'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
79
-    'is_depot' => true,
80
-    'lat' => 38.141598,
81
-    'lng' => -85.793846,
82
-    'time' => 0
78
+	'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
79
+	'is_depot' => true,
80
+	'lat' => 38.141598,
81
+	'lng' => -85.793846,
82
+	'time' => 0
83 83
 ]);
84 84
 
85 85
 // Stops
86 86
 foreach ($json as $address) {
87 87
 
88
-    // skip persistent
89
-    if($address['address'] == '4738 BELLEVUE AVE, Louisville, KY, 40215') continue;
88
+	// skip persistent
89
+	if($address['address'] == '4738 BELLEVUE AVE, Louisville, KY, 40215') continue;
90 90
 
91
-    $addresses[] = Address::fromArray([
92
-        'address' => $address['address'],
93
-        'lat' => $address['lat'],
94
-        'lng' => $address['lng'],
95
-        'time' => $address['time']
96
-    ]);
91
+	$addresses[] = Address::fromArray([
92
+		'address' => $address['address'],
93
+		'lat' => $address['lat'],
94
+		'lng' => $address['lng'],
95
+		'time' => $address['time']
96
+	]);
97 97
 }
98 98
 
99 99
 $optimizationParams = new OptimizationProblemParams();
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 echo "Routes:" . PHP_EOL;
109 109
 foreach($problem->routes as $route)
110 110
 {
111
-    echo "\tID: " . $route->route_id . PHP_EOL;
112
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
113
-    echo "\tAddresses:" . PHP_EOL;
111
+	echo "\tID: " . $route->route_id . PHP_EOL;
112
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
113
+	echo "\tAddresses:" . PHP_EOL;
114 114
 
115
-    foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
115
+	foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
116 116
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/DriversScheduleswithTerritoriesV2.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
 //**********************************************************************
28 28
 // General Route Parameters
29 29
 $parameters = RouteParameters::fromArray([
30
-    'rt' => true,
31
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
32
-    'route_name' => '5 Drivers Schedules '.date('Y-m-d H:i:s', time()),
33
-    'distance_unit' => DistanceUnit::MILES,
34
-    'device_type' => DeviceType::WEB,
35
-    'optimize' => OptimizationType::DISTANCE,
36
-    'travel_mode' => TravelMode::DRIVING,
37
-    'parts' => 5,
38
-    'advanced_constraints' => []
30
+	'rt' => true,
31
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
32
+	'route_name' => '5 Drivers Schedules '.date('Y-m-d H:i:s', time()),
33
+	'distance_unit' => DistanceUnit::MILES,
34
+	'device_type' => DeviceType::WEB,
35
+	'optimize' => OptimizationType::DISTANCE,
36
+	'travel_mode' => TravelMode::DRIVING,
37
+	'parts' => 5,
38
+	'advanced_constraints' => []
39 39
 ]);
40 40
 
41 41
 //**********************************************************************
@@ -46,19 +46,19 @@  discard block
 block discarded – undo
46 46
 // Schedules
47 47
 // Time: 9:00 am EST => (9 + 5) * 3600 => 50400
48 48
 $available_time_windows = [
49
-    [50400, 64800], [54000, 75600], [57600, 72000], [57600, 75600], [54000, 68400], 
50
-    [54000, 75600], [54000, 68400], [57600, 79200], [43200, 57600], [57600, 79200],
51
-    [50400, 64800], [43200, 61200]
49
+	[50400, 64800], [54000, 75600], [57600, 72000], [57600, 75600], [54000, 68400], 
50
+	[54000, 75600], [54000, 68400], [57600, 79200], [43200, 57600], [57600, 79200],
51
+	[50400, 64800], [43200, 61200]
52 52
 ];
53 53
 
54 54
 for($i = 0; $i < 12; ++$i)
55 55
 {
56
-    $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
57
-        'max_cargo_volume' => 0.0,
58
-        'members_count' => 1,
59
-        'available_time_windows' => [$available_time_windows[$i]],
60
-        'tags' => $zones[$i % 3]
61
-    ]);
56
+	$parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
57
+		'max_cargo_volume' => 0.0,
58
+		'members_count' => 1,
59
+		'available_time_windows' => [$available_time_windows[$i]],
60
+		'tags' => $zones[$i % 3]
61
+	]);
62 62
 }
63 63
 
64 64
 //**********************************************************************
@@ -67,16 +67,16 @@  discard block
 block discarded – undo
67 67
 
68 68
 // Depot
69 69
 $addresses[] = Address::fromArray([
70
-    'address' => 'DEPOT',
71
-    'is_depot' => true,
72
-    'lat' => 25.694341,
73
-    'lng' => -80.166036,
74
-    'time' => 0
70
+	'address' => 'DEPOT',
71
+	'is_depot' => true,
72
+	'lat' => 25.694341,
73
+	'lng' => -80.166036,
74
+	'time' => 0
75 75
 ]);
76 76
 
77 77
 // Stops
78 78
 foreach ($json as $address) {
79
-    $addresses[] = Address::fromArray($address);
79
+	$addresses[] = Address::fromArray($address);
80 80
 }
81 81
 
82 82
 $optimizationParams = new OptimizationProblemParams();
@@ -91,6 +91,6 @@  discard block
 block discarded – undo
91 91
 echo "Routes:" . PHP_EOL;
92 92
 foreach($problem->routes as $route)
93 93
 {
94
-    echo "\tID: " . $route->route_id . PHP_EOL;
95
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
94
+	echo "\tID: " . $route->route_id . PHP_EOL;
95
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
96 96
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/RetailLocation.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
 //**********************************************************************
24 24
 // General Route Parameters
25 25
 $parameters = RouteParameters::fromArray([
26
-    'rt' => TRUE,
27
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
28
-    'route_name' => 'Retail Location - Single Depot - Multiple Driver '.date('Y-m-d H:i:s', time()),
29
-    'route_time' => 25200,
30
-    'distance_unit' => DistanceUnit::MILES,
31
-    'device_type' => DeviceType::WEB,
32
-    'optimize' => OptimizationType::DISTANCE,
33
-    'travel_mode' => TravelMode::DRIVING,
34
-    'advanced_constraints' => [] 
26
+	'rt' => TRUE,
27
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
28
+	'route_name' => 'Retail Location - Single Depot - Multiple Driver '.date('Y-m-d H:i:s', time()),
29
+	'route_time' => 25200,
30
+	'distance_unit' => DistanceUnit::MILES,
31
+	'device_type' => DeviceType::WEB,
32
+	'optimize' => OptimizationType::DISTANCE,
33
+	'travel_mode' => TravelMode::DRIVING,
34
+	'advanced_constraints' => [] 
35 35
 ]);
36 36
 
37 37
 //**********************************************************************
@@ -40,26 +40,26 @@  discard block
 block discarded – undo
40 40
 // Time Window Start:  2:00 am EST
41 41
 // Time Window End:    3:20 am EST
42 42
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
43
-    'members_count' => 10,
44
-    'available_time_windows' => [[25200, 30000]],
45
-    'location_sequence_pattern' =>
46
-    [
47
-        [
48
-            'alias' => 'AFTER DEPOT LOCATION',
49
-            'address' => '1407 MCCOY, Louisville, KY, 40215',
50
-            'lat' => 38.202496,
51
-            'lng' => -85.786514,
52
-            'time' => 300
53
-        ],
54
-        '',
55
-        [
56
-            'alias' => 'BEFORE DEPOT LOCATION',
57
-            'address' => '4738 BELLEVUE AVE, Louisville, KY, 40215',
58
-            'lat' => 38.179806,
59
-            'lng' => -85.775558,
60
-            'time' => 300
61
-        ]
62
-    ]
43
+	'members_count' => 10,
44
+	'available_time_windows' => [[25200, 30000]],
45
+	'location_sequence_pattern' =>
46
+	[
47
+		[
48
+			'alias' => 'AFTER DEPOT LOCATION',
49
+			'address' => '1407 MCCOY, Louisville, KY, 40215',
50
+			'lat' => 38.202496,
51
+			'lng' => -85.786514,
52
+			'time' => 300
53
+		],
54
+		'',
55
+		[
56
+			'alias' => 'BEFORE DEPOT LOCATION',
57
+			'address' => '4738 BELLEVUE AVE, Louisville, KY, 40215',
58
+			'lat' => 38.179806,
59
+			'lng' => -85.775558,
60
+			'time' => 300
61
+		]
62
+	]
63 63
 ]);
64 64
 
65 65
 //**********************************************************************
@@ -68,27 +68,27 @@  discard block
 block discarded – undo
68 68
 
69 69
 // Depot
70 70
 $addresses[] = Address::fromArray([
71
-    'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
72
-    'is_depot' => true,
73
-    'lat' => 38.141598,
74
-    'lng' => -85.793846,
75
-    'time' => 0
71
+	'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
72
+	'is_depot' => true,
73
+	'lat' => 38.141598,
74
+	'lng' => -85.793846,
75
+	'time' => 0
76 76
 ]);
77 77
 
78 78
 // Stops
79 79
 foreach ($json as $address) {
80 80
 
81
-    // skip retail
82
-    if($address['address'] == '1407 MCCOY, Louisville, KY, 40215') continue;
83
-    if($address['address'] == '4738 BELLEVUE AVE, Louisville, KY, 40215') continue;
84
-
85
-    $addresses[] = Address::fromArray([
86
-        'address' => $address['address'],
87
-        'alias' => 'DEPOT',
88
-        'lat' => $address['lat'],
89
-        'lng' => $address['lng'],
90
-        'time' => $address['time']
91
-    ]);
81
+	// skip retail
82
+	if($address['address'] == '1407 MCCOY, Louisville, KY, 40215') continue;
83
+	if($address['address'] == '4738 BELLEVUE AVE, Louisville, KY, 40215') continue;
84
+
85
+	$addresses[] = Address::fromArray([
86
+		'address' => $address['address'],
87
+		'alias' => 'DEPOT',
88
+		'lat' => $address['lat'],
89
+		'lng' => $address['lng'],
90
+		'time' => $address['time']
91
+	]);
92 92
 }
93 93
 
94 94
 $optimizationParams = new OptimizationProblemParams();
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 echo "Routes:" . PHP_EOL;
104 104
 foreach($problem->routes as $route)
105 105
 {
106
-    echo "\tID: " . $route->route_id . PHP_EOL;
107
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
108
-    echo "\tAddresses:" . PHP_EOL;
106
+	echo "\tID: " . $route->route_id . PHP_EOL;
107
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
108
+	echo "\tAddresses:" . PHP_EOL;
109 109
 
110
-    foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
110
+	foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
111 111
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/DriversDifferentWorkingTime.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -25,28 +25,28 @@  discard block
 block discarded – undo
25 25
 
26 26
 // Depot
27 27
 $depots = [
28
-    Address::fromArray([
29
-        'alias' => 'Start Depot',
30
-        'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
31
-        'lat' => 38.141598,
32
-        'lng' => -80.190211
33
-    ])
28
+	Address::fromArray([
29
+		'alias' => 'Start Depot',
30
+		'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
31
+		'lat' => 38.141598,
32
+		'lng' => -80.190211
33
+	])
34 34
 ];
35 35
 
36 36
 //**********************************************************************
37 37
 // General Route Parameters
38 38
 $parameters = RouteParameters::fromArray([
39
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
40
-    'route_name' => 'Drivers Different Working Time Example - Single Depot, Multiple Driver '.date('Y-m-d H:i:s', time()),
41
-    'route_date' => time() + 24 * 60 * 60,
42
-    'route_time' => 6 * 3600,
43
-    'distance_unit' => DistanceUnit::MILES,
44
-    'device_type' => DeviceType::WEB,
45
-    'optimize' => OptimizationType::DISTANCE,
46
-    'travel_mode' => TravelMode::DRIVING,
47
-    'route_max_duration' => 8 * 60 * 60,
48
-    'parts' => 6,
49
-    'advanced_constraints' => []
39
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
40
+	'route_name' => 'Drivers Different Working Time Example - Single Depot, Multiple Driver '.date('Y-m-d H:i:s', time()),
41
+	'route_date' => time() + 24 * 60 * 60,
42
+	'route_time' => 6 * 3600,
43
+	'distance_unit' => DistanceUnit::MILES,
44
+	'device_type' => DeviceType::WEB,
45
+	'optimize' => OptimizationType::DISTANCE,
46
+	'travel_mode' => TravelMode::DRIVING,
47
+	'route_max_duration' => 8 * 60 * 60,
48
+	'parts' => 6,
49
+	'advanced_constraints' => []
50 50
 ]);
51 51
 
52 52
 //**********************************************************************
@@ -55,18 +55,18 @@  discard block
 block discarded – undo
55 55
 // Time Window Start:  7:00 am EST
56 56
 // Time Window End:   11:00 am EST
57 57
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
58
-    'max_cargo_volume' => 0.0,
59
-    'members_count' => 4,
60
-    'available_time_windows' => [[(7 + 5) * 3600 , (11 + 5) * 3600]]
58
+	'max_cargo_volume' => 0.0,
59
+	'members_count' => 4,
60
+	'available_time_windows' => [[(7 + 5) * 3600 , (11 + 5) * 3600]]
61 61
 ]);
62 62
 
63 63
 // Schedule full time
64 64
 // Time Window Start:  7:00 am EST
65 65
 // Time Window End:   15:00 am EST
66 66
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
67
-    'max_cargo_volume' => 0.0,
68
-    'members_count' => 2,
69
-    'available_time_windows' => [[(7 + 5) * 3600 , (15 + 5) * 3600]]
67
+	'max_cargo_volume' => 0.0,
68
+	'members_count' => 2,
69
+	'available_time_windows' => [[(7 + 5) * 3600 , (15 + 5) * 3600]]
70 70
 ]);
71 71
 
72 72
 //**********************************************************************
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
 $addresses = [];
76 76
 
77 77
 foreach ($json as $address) {
78
-    $addresses[] = Address::fromArray([
79
-        'address' => $address['address'],
80
-        'lat' => $address['lat'],
81
-        'lng' => $address['lng'],
82
-        'time' => $address['time']
83
-    ]);
78
+	$addresses[] = Address::fromArray([
79
+		'address' => $address['address'],
80
+		'lat' => $address['lat'],
81
+		'lng' => $address['lng'],
82
+		'time' => $address['time']
83
+	]);
84 84
 }
85 85
 
86 86
 $optimizationParams = new OptimizationProblemParams();
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 echo "Routes:" . PHP_EOL;
100 100
 foreach($problem->routes as $route)
101 101
 {
102
-    echo "\tID: " . $route->route_id . PHP_EOL;
103
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
104
-    echo "\tAddresses:" . PHP_EOL;
102
+	echo "\tID: " . $route->route_id . PHP_EOL;
103
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
104
+	echo "\tAddresses:" . PHP_EOL;
105 105
 
106
-    foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
106
+	foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
107 107
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/DriversScheduleswithTerritoriesV1.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -24,42 +24,42 @@  discard block
 block discarded – undo
24 24
 Route4Me::setApiKey(Constants::API_KEY);
25 25
 
26 26
 $depots = [
27
-    Address::fromArray([
28
-        'address' => 'DEPOT',
29
-        'lat' => 25.694341,
30
-        'lng' => -80.166036
31
-    ])
27
+	Address::fromArray([
28
+		'address' => 'DEPOT',
29
+		'lat' => 25.694341,
30
+		'lng' => -80.166036
31
+	])
32 32
 ];
33 33
 
34 34
 //**********************************************************************
35 35
 // General Route Parameters
36 36
 $parameters = RouteParameters::fromArray([
37
-    'rt' => true,
38
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
39
-    'route_name' => '10 Drivers Schedules '.date('Y-m-d H:i:s', time()),
40
-    'distance_unit' => DistanceUnit::MILES,
41
-    'device_type' => DeviceType::WEB,
42
-    'optimize' => OptimizationType::DISTANCE,
43
-    'travel_mode' => TravelMode::DRIVING,
44
-    'parts' => 10,
45
-    'advanced_constraints' => []
37
+	'rt' => true,
38
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
39
+	'route_name' => '10 Drivers Schedules '.date('Y-m-d H:i:s', time()),
40
+	'distance_unit' => DistanceUnit::MILES,
41
+	'device_type' => DeviceType::WEB,
42
+	'optimize' => OptimizationType::DISTANCE,
43
+	'travel_mode' => TravelMode::DRIVING,
44
+	'parts' => 10,
45
+	'advanced_constraints' => []
46 46
 ]);
47 47
 
48 48
 //**********************************************************************
49 49
 // Schedules
50 50
 // Time: 9:00 am EST => (9 + 5) * 3600 => 50400
51 51
 $available_time_windows = [
52
-    [50400, 64800], [54000, 75600], [57600, 72000], [57600, 75600], [54000, 68400], 
53
-    [54000, 75600], [54000, 68400], [57600, 79200], [43200, 57600], [57600, 79200]
52
+	[50400, 64800], [54000, 75600], [57600, 72000], [57600, 75600], [54000, 68400], 
53
+	[54000, 75600], [54000, 68400], [57600, 79200], [43200, 57600], [57600, 79200]
54 54
 ];
55 55
 
56 56
 for($i = 0; $i < 10; ++$i)
57 57
 {
58
-    $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
59
-        'max_cargo_volume' => 0.0,
60
-        'members_count' => 1,
61
-        'available_time_windows' => [$available_time_windows[$i]]
62
-    ]);
58
+	$parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
59
+		'max_cargo_volume' => 0.0,
60
+		'members_count' => 1,
61
+		'available_time_windows' => [$available_time_windows[$i]]
62
+	]);
63 63
 }
64 64
 
65 65
 //**********************************************************************
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
 $addresses = [];
69 69
 
70 70
 foreach ($json as $address) {
71
-    $addresses[] = Address::fromArray([
72
-        'alias' => $address['alias'],
73
-        'address' => $address['address'],
74
-        'lat' => $address['lat'],
75
-        'lng' => $address['lng']
76
-    ]);
71
+	$addresses[] = Address::fromArray([
72
+		'alias' => $address['alias'],
73
+		'address' => $address['address'],
74
+		'lat' => $address['lat'],
75
+		'lng' => $address['lng']
76
+	]);
77 77
 }
78 78
 
79 79
 $optimizationParams = new OptimizationProblemParams();
@@ -89,6 +89,6 @@  discard block
 block discarded – undo
89 89
 echo "Routes:" . PHP_EOL;
90 90
 foreach($problem->routes as $route)
91 91
 {
92
-    echo "\tID: " . $route->route_id . PHP_EOL;
93
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
92
+	echo "\tID: " . $route->route_id . PHP_EOL;
93
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
94 94
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/DriversScheduleswithTerritoriesV3.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -26,15 +26,15 @@  discard block
 block discarded – undo
26 26
 //**********************************************************************
27 27
 // General Route Parameters
28 28
 $parameters = RouteParameters::fromArray([
29
-    'rt' => true,
30
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
31
-    'route_name' => 'Drivers Schedules - 3 Territories '.date('Y-m-d H:i:s', time()),
32
-    'distance_unit' => DistanceUnit::MILES,
33
-    'device_type' => DeviceType::WEB,
34
-    'optimize' => OptimizationType::DISTANCE,
35
-    'travel_mode' => TravelMode::DRIVING,
36
-    'parts' => 9,
37
-    'advanced_constraints' => [] 
29
+	'rt' => true,
30
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
31
+	'route_name' => 'Drivers Schedules - 3 Territories '.date('Y-m-d H:i:s', time()),
32
+	'distance_unit' => DistanceUnit::MILES,
33
+	'device_type' => DeviceType::WEB,
34
+	'optimize' => OptimizationType::DISTANCE,
35
+	'travel_mode' => TravelMode::DRIVING,
36
+	'parts' => 9,
37
+	'advanced_constraints' => [] 
38 38
 ]);
39 39
 
40 40
 //**********************************************************************
@@ -45,18 +45,18 @@  discard block
 block discarded – undo
45 45
 // Schedules
46 46
 // Time: 9:00 am EST => (9 + 5) * 3600 => 50400
47 47
 $available_time_windows = [
48
-    [50400, 64800], [54000, 75600], [57600, 72000], [57600, 75600], [54000, 68400], 
49
-    [54000, 75600], [54000, 68400], [57600, 79200], [43200, 57600]
48
+	[50400, 64800], [54000, 75600], [57600, 72000], [57600, 75600], [54000, 68400], 
49
+	[54000, 75600], [54000, 68400], [57600, 79200], [43200, 57600]
50 50
 ];
51 51
 
52 52
 for($i = 0; $i < 9; ++$i)
53 53
 {
54
-    $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
55
-        'max_cargo_volume' => 0.0,
56
-        'members_count' => 1,
57
-        'available_time_windows' => [$available_time_windows[$i]],
58
-        'tags' => $zones[$i % 3]
59
-    ]);
54
+	$parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
55
+		'max_cargo_volume' => 0.0,
56
+		'members_count' => 1,
57
+		'available_time_windows' => [$available_time_windows[$i]],
58
+		'tags' => $zones[$i % 3]
59
+	]);
60 60
 }
61 61
 
62 62
 //**********************************************************************
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 $addresses = [];
66 66
 
67 67
 foreach ($json as $address) {
68
-    $addresses[] = Address::fromArray($address);
68
+	$addresses[] = Address::fromArray($address);
69 69
 }
70 70
 
71 71
 $optimizationParams = new OptimizationProblemParams();
@@ -80,6 +80,6 @@  discard block
 block discarded – undo
80 80
 echo "Routes:" . PHP_EOL;
81 81
 foreach($problem->routes as $route)
82 82
 {
83
-    echo "\tID: " . $route->route_id . PHP_EOL;
84
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
83
+	echo "\tID: " . $route->route_id . PHP_EOL;
84
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
85 85
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/DriversDifferentWorkingTimeWithTerritories.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
 //**********************************************************************
30 30
 // General Route Parameters
31 31
 $parameters = RouteParameters::fromArray([
32
-    'rt' => true,
33
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
34
-    'route_name' => 'Drivers Different Working Time Example - Territories '.date('Y-m-d H:i:s', time()),
35
-    'distance_unit' => DistanceUnit::MILES,
36
-    'device_type' => DeviceType::WEB,
37
-    'optimize' => OptimizationType::DISTANCE,
38
-    'travel_mode' => TravelMode::DRIVING,
39
-    'parts' => 10,
40
-    'advanced_constraints'=> [] 
32
+	'rt' => true,
33
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
34
+	'route_name' => 'Drivers Different Working Time Example - Territories '.date('Y-m-d H:i:s', time()),
35
+	'distance_unit' => DistanceUnit::MILES,
36
+	'device_type' => DeviceType::WEB,
37
+	'optimize' => OptimizationType::DISTANCE,
38
+	'travel_mode' => TravelMode::DRIVING,
39
+	'parts' => 10,
40
+	'advanced_constraints'=> [] 
41 41
 ]);
42 42
 
43 43
 //**********************************************************************
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
 // Full Time Window End:   15:00 am EST
52 52
 for($i = 0; $i < 6; ++$i)
53 53
 {
54
-    $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
55
-        'max_cargo_volume' => 0.0,
56
-        'members_count' => 100,
57
-        'available_time_windows' => [[(7 + 5) * 3600, ($i % 2 == 0 ? (11 + 5) : (15 + 5)) * 3600]],
58
-        'tags' => $zones[intdiv($i, 2) % 3]
59
-    ]);
54
+	$parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
55
+		'max_cargo_volume' => 0.0,
56
+		'members_count' => 100,
57
+		'available_time_windows' => [[(7 + 5) * 3600, ($i % 2 == 0 ? (11 + 5) : (15 + 5)) * 3600]],
58
+		'tags' => $zones[intdiv($i, 2) % 3]
59
+	]);
60 60
 }
61 61
 
62 62
 //**********************************************************************
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 $addresses = [];
66 66
 
67 67
 foreach ($json as $address) {
68
-    $addresses[] = Address::fromArray($address);
68
+	$addresses[] = Address::fromArray($address);
69 69
 }
70 70
 
71 71
 $optimizationParams = new OptimizationProblemParams();
@@ -83,6 +83,6 @@  discard block
 block discarded – undo
83 83
 echo "Routes:" . PHP_EOL;
84 84
 foreach($problem->routes as $route)
85 85
 {
86
-    echo "\tID: " . $route->route_id . PHP_EOL;
87
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
86
+	echo "\tID: " . $route->route_id . PHP_EOL;
87
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
88 88
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/DriversTimeShift.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -23,19 +23,19 @@  discard block
 block discarded – undo
23 23
 //**********************************************************************
24 24
 // General Route Parameters
25 25
 $parameters = RouteParameters::fromArray([
26
-    'rt' => true,
27
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
28
-    'route_name' => 'Driver Shift Example - SDMD '.date('Y-m-d H:i:s', time()),
29
-    'route_time' => 0,
30
-    'distance_unit' => DistanceUnit::MILES,
31
-    'device_type' => DeviceType::WEB,
32
-    'optimize' => OptimizationType::DISTANCE,
33
-    'travel_mode' => TravelMode::DRIVING,
34
-    'vehicle_capacity' => 100,
35
-    'vehicle_max_distance_mi' => 10000,
36
-    'route_max_duration' => 86400,
37
-    'parts' => 20,
38
-    'advanced_constraints' => [] 
26
+	'rt' => true,
27
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
28
+	'route_name' => 'Driver Shift Example - SDMD '.date('Y-m-d H:i:s', time()),
29
+	'route_time' => 0,
30
+	'distance_unit' => DistanceUnit::MILES,
31
+	'device_type' => DeviceType::WEB,
32
+	'optimize' => OptimizationType::DISTANCE,
33
+	'travel_mode' => TravelMode::DRIVING,
34
+	'vehicle_capacity' => 100,
35
+	'vehicle_max_distance_mi' => 10000,
36
+	'route_max_duration' => 86400,
37
+	'parts' => 20,
38
+	'advanced_constraints' => [] 
39 39
 ]);
40 40
 
41 41
 //**********************************************************************
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 // Time Window Start:  2:00 am EST
45 45
 // Time Window End:   15:50 am EST
46 46
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
47
-    'max_cargo_volume' => 0.0,
48
-    'max_capacity' => 200,
49
-    'members_count' => 10,
50
-    'available_time_windows' => [[25200, 75000]],
51
-    'tags' => ['TAG001', 'TAG002']
47
+	'max_cargo_volume' => 0.0,
48
+	'max_capacity' => 200,
49
+	'members_count' => 10,
50
+	'available_time_windows' => [[25200, 75000]],
51
+	'tags' => ['TAG001', 'TAG002']
52 52
 ]);
53 53
 
54 54
 // Schedule 2
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
 // Time Window Start: 12:13 am EST
58 58
 // Time Window End:   18:36 am EST
59 59
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
60
-    'max_cargo_volume' => 0.0,
61
-    'max_capacity' => 500,
62
-    'members_count' => 6,
63
-    'available_time_windows' => [[45200, 55000], [62000, 85000]],
64
-    'tags' => ['TAG003']
60
+	'max_cargo_volume' => 0.0,
61
+	'max_capacity' => 500,
62
+	'members_count' => 6,
63
+	'available_time_windows' => [[45200, 55000], [62000, 85000]],
64
+	'tags' => ['TAG003']
65 65
 ]);
66 66
 
67 67
 //**********************************************************************
@@ -70,31 +70,31 @@  discard block
 block discarded – undo
70 70
 
71 71
 // Depot
72 72
 $addresses[] = Address::fromArray([
73
-    'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
74
-    'is_depot' => true,
75
-    'lat' => 38.141598,
76
-    'lng' => -85.793846,
77
-    'time' => 300
73
+	'address' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214',
74
+	'is_depot' => true,
75
+	'lat' => 38.141598,
76
+	'lng' => -85.793846,
77
+	'time' => 300
78 78
 ]);
79 79
 
80 80
 // Stops
81 81
 $n = 0;
82 82
 foreach ($json as $address) {
83
-    $addr_obj = Address::fromArray([
84
-        'address' => $address['address'],
85
-        'lat' => $address['lat'],
86
-        'lng' => $address['lng'],
87
-        'time' => $address['time'],
88
-        'tags' => ($n < 4 ? ['TAG001', 'TAG002'] : ['TAG003'])
89
-    ]);
90
-
91
-    if($n >= 4)
92
-    {
93
-        $addr_obj->time_window_start = $address['time_window_start'];
94
-        $addr_obj->time_window_end = $address['time_window_end'];
95
-    }
96
-    $addresses[] = $addr_obj;
97
-    ++$n;
83
+	$addr_obj = Address::fromArray([
84
+		'address' => $address['address'],
85
+		'lat' => $address['lat'],
86
+		'lng' => $address['lng'],
87
+		'time' => $address['time'],
88
+		'tags' => ($n < 4 ? ['TAG001', 'TAG002'] : ['TAG003'])
89
+	]);
90
+
91
+	if($n >= 4)
92
+	{
93
+		$addr_obj->time_window_start = $address['time_window_start'];
94
+		$addr_obj->time_window_end = $address['time_window_end'];
95
+	}
96
+	$addresses[] = $addr_obj;
97
+	++$n;
98 98
 }
99 99
 
100 100
 $optimizationParams = new OptimizationProblemParams();
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
 echo "Routes:" . PHP_EOL;
110 110
 foreach($problem->routes as $route)
111 111
 {
112
-    echo "\tID: " . $route->route_id . PHP_EOL;
113
-    echo "\tDistance: " . $route->trip_distance . PHP_EOL;
114
-    echo "\tAddresses:" . PHP_EOL;
112
+	echo "\tID: " . $route->route_id . PHP_EOL;
113
+	echo "\tDistance: " . $route->trip_distance . PHP_EOL;
114
+	echo "\tAddresses:" . PHP_EOL;
115 115
 
116
-    foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
116
+	foreach($route->addresses as $address) echo "\t\t" . $address->address . PHP_EOL;
117 117
 }
Please login to merge, or discard this patch.
examples/AdvancedConstraints/OptimizationUsingTerritoriesAddresses.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@  discard block
 block discarded – undo
24 24
 //**********************************************************************
25 25
 // General Route Parameters
26 26
 $parameters = RouteParameters::fromArray([
27
-    'rt' => true,
28
-    'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
29
-    'route_name' => 'Single Depot, Multiple Driver - 3 Territories IDs '.date('Y-m-d H:i:s', time()),
30
-    'route_time' => 46800,
31
-    'distance_unit' => DistanceUnit::MILES,
32
-    'device_type' => DeviceType::WEB,
33
-    'optimize' => OptimizationType::DISTANCE,
34
-    'travel_mode' => TravelMode::DRIVING,
35
-    'advanced_constraints' => [] 
27
+	'rt' => true,
28
+	'algorithm_type' => Algorithmtype::ADVANCED_CVRP_TW,
29
+	'route_name' => 'Single Depot, Multiple Driver - 3 Territories IDs '.date('Y-m-d H:i:s', time()),
30
+	'route_time' => 46800,
31
+	'distance_unit' => DistanceUnit::MILES,
32
+	'device_type' => DeviceType::WEB,
33
+	'optimize' => OptimizationType::DISTANCE,
34
+	'travel_mode' => TravelMode::DRIVING,
35
+	'advanced_constraints' => [] 
36 36
 ]);
37 37
 
38 38
 //**********************************************************************
@@ -41,30 +41,30 @@  discard block
 block discarded – undo
41 41
 // Time Window Start:  8:00 am EST
42 42
 // Time Window End:   11:00 am EST
43 43
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
44
-    'max_cargo_volume' =>  0.0,
45
-    'members_count' =>  3,
46
-    'available_time_windows' => [[46800, 57600]],
47
-    'tags' => ['A34BA30C717D1194FC0230252DF0C45C']
44
+	'max_cargo_volume' =>  0.0,
45
+	'members_count' =>  3,
46
+	'available_time_windows' => [[46800, 57600]],
47
+	'tags' => ['A34BA30C717D1194FC0230252DF0C45C']
48 48
 ]);
49 49
 
50 50
 // Schedule 2
51 51
 // Time Window Start:  8:00 am EST
52 52
 // Time Window End:   12:00 am EST
53 53
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
54
-    'max_cargo_volume' =>  0.0,
55
-    'members_count' =>  4,
56
-    'available_time_windows' => [[46800, 61200]],
57
-    'tags' => ['DA6A8F10313CCFEC843978FC065F235B']
54
+	'max_cargo_volume' =>  0.0,
55
+	'members_count' =>  4,
56
+	'available_time_windows' => [[46800, 61200]],
57
+	'tags' => ['DA6A8F10313CCFEC843978FC065F235B']
58 58
 ]);
59 59
 
60 60
 // Schedule 3
61 61
 // Time Window Start:  8:00 am EST
62 62
 // Time Window End:   13:00 am EST
63 63
 $parameters->advanced_constraints[] = RouteAdvancedConstraints::fromArray([
64
-    'max_cargo_volume' =>  0.0,
65
-    'members_count' =>  3,
66
-    'available_time_windows' => [[46800, 64800]],
67
-    'tags' =>  ['8142ABF2D693336987726ECDB5ED2D6D']
64
+	'max_cargo_volume' =>  0.0,
65
+	'members_count' =>  3,
66
+	'available_time_windows' => [[46800, 64800]],
67
+	'tags' =>  ['8142ABF2D693336987726ECDB5ED2D6D']
68 68
 ]);
69 69
 
70 70
 //**********************************************************************
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 $addresses = [];
74 74
 
75 75
 foreach ($json as $address) {
76
-    $addresses[] = Address::fromArray($address);
76
+	$addresses[] = Address::fromArray($address);
77 77
 }
78 78
 
79 79
 $optimizationParams = new OptimizationProblemParams();
Please login to merge, or discard this patch.