@@ -18,38 +18,38 @@ |
||
| 18 | 18 | $vehicle = new Vehicle(); |
| 19 | 19 | |
| 20 | 20 | $vehicleParameters = Vehicle::fromArray([ |
| 21 | - 'vehicle_name' => 'Liebherr T 282B mining truck', |
|
| 22 | - 'vehicle_alias' => 'Liebherr T 282B mining truck', |
|
| 23 | - 'vehicle_vin' => '1NP5DB9X93N507873', |
|
| 24 | - 'vehicle_license_plate' => 'LMT8765', |
|
| 25 | - 'license_start_date' => '2008-04-12', |
|
| 26 | - 'license_end_date' => '2020-08-16', |
|
| 27 | - 'vehicle_model' => 'Liebherr T 282B', |
|
| 28 | - 'vehicle_model_year' => 2004, |
|
| 29 | - 'vehicle_year_acquired' => 2008, |
|
| 30 | - 'vehicle_reg_country_id' => '223', |
|
| 31 | - 'vehicle_type_id' => 'bigrig', |
|
| 32 | - 'has_trailer' => false, |
|
| 33 | - 'vehicle_axle_count' => 2, |
|
| 34 | - 'mpg_city' => 2, |
|
| 35 | - 'mpg_highway' => 4, |
|
| 36 | - 'fuel_type' => 'diesel', |
|
| 37 | - 'height_inches' => 596, |
|
| 38 | - 'height_metric' => 1490, |
|
| 39 | - 'weight_lb' => 1316000, |
|
| 40 | - 'maxWeightPerAxleGroupInPounds' => 658000, |
|
| 41 | - 'max_weight_per_axle_group_metric' => 298450, |
|
| 42 | - 'widthInInches' => 381, |
|
| 43 | - 'width_metric' => 952, |
|
| 44 | - 'lengthInInches' => 613, |
|
| 45 | - 'length_metric' => 1532, |
|
| 46 | - 'Use53FootTrailerRouting' => 'YES', |
|
| 47 | - 'UseTruckRestrictions' => 'YES', |
|
| 48 | - 'DividedHighwayAvoidPreference' => 'STRONG_AVOID', |
|
| 49 | - 'FreewayAvoidPreference' => 'STRONG_AVOID', |
|
| 50 | - 'truck_config' => '53_SEMI_TRAILER', |
|
| 51 | - 'InternationalBordersOpen' => 'YES', |
|
| 52 | - 'purchased_new' => true, |
|
| 21 | + 'vehicle_name' => 'Liebherr T 282B mining truck', |
|
| 22 | + 'vehicle_alias' => 'Liebherr T 282B mining truck', |
|
| 23 | + 'vehicle_vin' => '1NP5DB9X93N507873', |
|
| 24 | + 'vehicle_license_plate' => 'LMT8765', |
|
| 25 | + 'license_start_date' => '2008-04-12', |
|
| 26 | + 'license_end_date' => '2020-08-16', |
|
| 27 | + 'vehicle_model' => 'Liebherr T 282B', |
|
| 28 | + 'vehicle_model_year' => 2004, |
|
| 29 | + 'vehicle_year_acquired' => 2008, |
|
| 30 | + 'vehicle_reg_country_id' => '223', |
|
| 31 | + 'vehicle_type_id' => 'bigrig', |
|
| 32 | + 'has_trailer' => false, |
|
| 33 | + 'vehicle_axle_count' => 2, |
|
| 34 | + 'mpg_city' => 2, |
|
| 35 | + 'mpg_highway' => 4, |
|
| 36 | + 'fuel_type' => 'diesel', |
|
| 37 | + 'height_inches' => 596, |
|
| 38 | + 'height_metric' => 1490, |
|
| 39 | + 'weight_lb' => 1316000, |
|
| 40 | + 'maxWeightPerAxleGroupInPounds' => 658000, |
|
| 41 | + 'max_weight_per_axle_group_metric' => 298450, |
|
| 42 | + 'widthInInches' => 381, |
|
| 43 | + 'width_metric' => 952, |
|
| 44 | + 'lengthInInches' => 613, |
|
| 45 | + 'length_metric' => 1532, |
|
| 46 | + 'Use53FootTrailerRouting' => 'YES', |
|
| 47 | + 'UseTruckRestrictions' => 'YES', |
|
| 48 | + 'DividedHighwayAvoidPreference' => 'STRONG_AVOID', |
|
| 49 | + 'FreewayAvoidPreference' => 'STRONG_AVOID', |
|
| 50 | + 'truck_config' => '53_SEMI_TRAILER', |
|
| 51 | + 'InternationalBordersOpen' => 'YES', |
|
| 52 | + 'purchased_new' => true, |
|
| 53 | 53 | ]); |
| 54 | 54 | |
| 55 | 55 | $result = $vehicle->createVehicle($vehicleParameters); |
@@ -18,39 +18,39 @@ |
||
| 18 | 18 | $vehicle = new Vehicle(); |
| 19 | 19 | |
| 20 | 20 | $vehicleParameters = Vehicle::fromArray([ |
| 21 | - 'vehicle_name' => 'Peterbilt 579', |
|
| 22 | - 'vehicle_alias' => 'Peterbilt 579', |
|
| 23 | - 'vehicle_vin' => '1NP5DB9X93N507873', |
|
| 24 | - 'vehicle_license_plate' => 'PPV7516', |
|
| 25 | - 'license_start_date' => '2017-06-05', |
|
| 26 | - 'license_end_date' => '2021-08-14', |
|
| 27 | - 'vehicle_model' => '579', |
|
| 28 | - 'vehicle_model_year' => 2015, |
|
| 29 | - 'vehicle_year_acquired' => 2018, |
|
| 30 | - 'vehicle_reg_country_id' => '223', |
|
| 31 | - 'vehicle_make' => 'Peterbilt', |
|
| 32 | - 'vehicle_type_id' => 'tractor_trailer', |
|
| 33 | - 'has_trailer' => true, |
|
| 34 | - 'vehicle_axle_count' => 4, |
|
| 35 | - 'mpg_city' => 6, |
|
| 36 | - 'mpg_highway' => 12, |
|
| 37 | - 'fuel_type' => 'diesel', |
|
| 38 | - 'height_inches' => 114, |
|
| 39 | - 'height_metric' => 290, |
|
| 40 | - 'weight_lb' => 50350, |
|
| 41 | - 'maxWeightPerAxleGroupInPounds' => 40000, |
|
| 42 | - 'max_weight_per_axle_group_metric' => 18000, |
|
| 43 | - 'widthInInches' => 102, |
|
| 44 | - 'width_metric' => 258, |
|
| 45 | - 'lengthInInches' => 640, |
|
| 46 | - 'length_metric' => 1625, |
|
| 47 | - 'Use53FootTrailerRouting' => 'YES', |
|
| 48 | - 'UseTruckRestrictions' => 'YES', |
|
| 49 | - 'DividedHighwayAvoidPreference' => 'STRONG_AVOID', |
|
| 50 | - 'FreewayAvoidPreference' => 'STRONG_AVOID', |
|
| 51 | - 'truck_config' => '53_SEMI_TRAILER', |
|
| 52 | - 'InternationalBordersOpen' => 'YES', |
|
| 53 | - 'purchased_new' => true, |
|
| 21 | + 'vehicle_name' => 'Peterbilt 579', |
|
| 22 | + 'vehicle_alias' => 'Peterbilt 579', |
|
| 23 | + 'vehicle_vin' => '1NP5DB9X93N507873', |
|
| 24 | + 'vehicle_license_plate' => 'PPV7516', |
|
| 25 | + 'license_start_date' => '2017-06-05', |
|
| 26 | + 'license_end_date' => '2021-08-14', |
|
| 27 | + 'vehicle_model' => '579', |
|
| 28 | + 'vehicle_model_year' => 2015, |
|
| 29 | + 'vehicle_year_acquired' => 2018, |
|
| 30 | + 'vehicle_reg_country_id' => '223', |
|
| 31 | + 'vehicle_make' => 'Peterbilt', |
|
| 32 | + 'vehicle_type_id' => 'tractor_trailer', |
|
| 33 | + 'has_trailer' => true, |
|
| 34 | + 'vehicle_axle_count' => 4, |
|
| 35 | + 'mpg_city' => 6, |
|
| 36 | + 'mpg_highway' => 12, |
|
| 37 | + 'fuel_type' => 'diesel', |
|
| 38 | + 'height_inches' => 114, |
|
| 39 | + 'height_metric' => 290, |
|
| 40 | + 'weight_lb' => 50350, |
|
| 41 | + 'maxWeightPerAxleGroupInPounds' => 40000, |
|
| 42 | + 'max_weight_per_axle_group_metric' => 18000, |
|
| 43 | + 'widthInInches' => 102, |
|
| 44 | + 'width_metric' => 258, |
|
| 45 | + 'lengthInInches' => 640, |
|
| 46 | + 'length_metric' => 1625, |
|
| 47 | + 'Use53FootTrailerRouting' => 'YES', |
|
| 48 | + 'UseTruckRestrictions' => 'YES', |
|
| 49 | + 'DividedHighwayAvoidPreference' => 'STRONG_AVOID', |
|
| 50 | + 'FreewayAvoidPreference' => 'STRONG_AVOID', |
|
| 51 | + 'truck_config' => '53_SEMI_TRAILER', |
|
| 52 | + 'InternationalBordersOpen' => 'YES', |
|
| 53 | + 'purchased_new' => true, |
|
| 54 | 54 | ]); |
| 55 | 55 | |
| 56 | 56 | $result = $vehicle->createVehicle($vehicleParameters); |
@@ -18,9 +18,9 @@ |
||
| 18 | 18 | $userLocations = $track->getUserLocations(); |
| 19 | 19 | |
| 20 | 20 | foreach ($userLocations As $memberId => $userLocation) { |
| 21 | - echo $userLocation['member_data']['member_first_name'].' '.$userLocation['member_data']['member_last_name']." --> "; |
|
| 22 | - if (isset($userLocation['tracking']['position_lng'])) { |
|
| 23 | - echo "Longitude: ".$userLocation['tracking']['position_lng'].", Latitude: ".$userLocation['tracking']['position_lat']; |
|
| 24 | - } |
|
| 25 | - echo "<br>"; |
|
| 21 | + echo $userLocation['member_data']['member_first_name'].' '.$userLocation['member_data']['member_last_name']." --> "; |
|
| 22 | + if (isset($userLocation['tracking']['position_lng'])) { |
|
| 23 | + echo "Longitude: ".$userLocation['tracking']['position_lng'].", Latitude: ".$userLocation['tracking']['position_lat']; |
|
| 24 | + } |
|
| 25 | + echo "<br>"; |
|
| 26 | 26 | } |
@@ -24,16 +24,16 @@ discard block |
||
| 24 | 24 | assert(!is_null($addresses), "Cannot retrieve a random route ID"); |
| 25 | 25 | |
| 26 | 26 | foreach ($addresses as $addr1) { |
| 27 | - if (!is_null($addr1->tracking_number)) { |
|
| 28 | - $trackingNumber = $addr1->tracking_number; |
|
| 29 | - break; |
|
| 30 | - } |
|
| 27 | + if (!is_null($addr1->tracking_number)) { |
|
| 28 | + $trackingNumber = $addr1->tracking_number; |
|
| 29 | + break; |
|
| 30 | + } |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | assert(!is_null($trackingNumber), "Cannot select a tracking number"); |
| 34 | 34 | |
| 35 | 35 | $params = [ |
| 36 | - 'tracking' => $trackingNumber, |
|
| 36 | + 'tracking' => $trackingNumber, |
|
| 37 | 37 | ]; |
| 38 | 38 | |
| 39 | 39 | $route = new Route(); |
@@ -41,9 +41,9 @@ discard block |
||
| 41 | 41 | $result = $route->GetAssetTracking($params); |
| 42 | 42 | |
| 43 | 43 | foreach ($result as $key => $value) { |
| 44 | - if (is_array($value)) { |
|
| 45 | - Route4Me::simplePrint($value, true); |
|
| 46 | - } else { |
|
| 47 | - echo "$key => $value <br>"; |
|
| 48 | - } |
|
| 44 | + if (is_array($value)) { |
|
| 45 | + Route4Me::simplePrint($value, true); |
|
| 46 | + } else { |
|
| 47 | + echo "$key => $value <br>"; |
|
| 48 | + } |
|
| 49 | 49 | } |
@@ -27,16 +27,16 @@ |
||
| 27 | 27 | // Set GPS postion to the selected route |
| 28 | 28 | // Set right member_id corresponding to the API key |
| 29 | 29 | $params = TrackSetParams::fromArray([ |
| 30 | - 'format' => Format::CSV, |
|
| 31 | - 'route_id' => $routeId, |
|
| 32 | - 'member_id' => 1, |
|
| 33 | - 'course' => 1, |
|
| 34 | - 'speed' => 120, |
|
| 35 | - 'lat' => 41.8927521, |
|
| 36 | - 'lng' => -109.0803888, |
|
| 37 | - 'device_type' => 'android_phone', |
|
| 38 | - 'device_guid' => 'qweqweqwe', |
|
| 39 | - 'device_timestamp' => date('Y-m-d H:i:s', strtotime('-1 day')), |
|
| 30 | + 'format' => Format::CSV, |
|
| 31 | + 'route_id' => $routeId, |
|
| 32 | + 'member_id' => 1, |
|
| 33 | + 'course' => 1, |
|
| 34 | + 'speed' => 120, |
|
| 35 | + 'lat' => 41.8927521, |
|
| 36 | + 'lng' => -109.0803888, |
|
| 37 | + 'device_type' => 'android_phone', |
|
| 38 | + 'device_guid' => 'qweqweqwe', |
|
| 39 | + 'device_timestamp' => date('Y-m-d H:i:s', strtotime('-1 day')), |
|
| 40 | 40 | ]); |
| 41 | 41 | |
| 42 | 42 | $status = Track::set($params); |
@@ -27,16 +27,16 @@ discard block |
||
| 27 | 27 | // Set GPS postion to the selected route |
| 28 | 28 | // Set right member_id corresponding to the API key |
| 29 | 29 | $params = TrackSetParams::fromArray([ |
| 30 | - 'format' => Format::SERIALIZED, |
|
| 31 | - 'route_id' => $routeId, |
|
| 32 | - 'member_id' => 1, |
|
| 33 | - 'course' => 1, |
|
| 34 | - 'speed' => 120, |
|
| 35 | - 'lat' => 41.8927521, |
|
| 36 | - 'lng' => -109.0803888, |
|
| 37 | - 'device_type' => 'android_phone', |
|
| 38 | - 'device_guid' => 'qweqweqwe', |
|
| 39 | - 'device_timestamp' => date('Y-m-d H:i:s', strtotime('-2 day')), |
|
| 30 | + 'format' => Format::SERIALIZED, |
|
| 31 | + 'route_id' => $routeId, |
|
| 32 | + 'member_id' => 1, |
|
| 33 | + 'course' => 1, |
|
| 34 | + 'speed' => 120, |
|
| 35 | + 'lat' => 41.8927521, |
|
| 36 | + 'lng' => -109.0803888, |
|
| 37 | + 'device_type' => 'android_phone', |
|
| 38 | + 'device_guid' => 'qweqweqwe', |
|
| 39 | + 'device_timestamp' => date('Y-m-d H:i:s', strtotime('-2 day')), |
|
| 40 | 40 | ]); |
| 41 | 41 | |
| 42 | 42 | $status = Track::set($params); |
@@ -50,19 +50,19 @@ discard block |
||
| 50 | 50 | $endDate = time() + 1 * 24 * 3600; |
| 51 | 51 | |
| 52 | 52 | $params = [ |
| 53 | - 'route_id' => $routeId, |
|
| 54 | - 'format' => Format::JSON, |
|
| 55 | - 'time_period' => 'custom', |
|
| 56 | - 'start_date' => $startDate, |
|
| 57 | - 'end_date' => $endDate, |
|
| 53 | + 'route_id' => $routeId, |
|
| 54 | + 'format' => Format::JSON, |
|
| 55 | + 'time_period' => 'custom', |
|
| 56 | + 'start_date' => $startDate, |
|
| 57 | + 'end_date' => $endDate, |
|
| 58 | 58 | ]; |
| 59 | 59 | |
| 60 | 60 | $result = $route->GetTrackingHistoryFromTimeRange($params); |
| 61 | 61 | |
| 62 | 62 | foreach ($result as $key => $value) { |
| 63 | - if (is_array($value)) { |
|
| 64 | - Route4Me::simplePrint($value); |
|
| 65 | - } else { |
|
| 66 | - echo "$key => $value <br>"; |
|
| 67 | - } |
|
| 63 | + if (is_array($value)) { |
|
| 64 | + Route4Me::simplePrint($value); |
|
| 65 | + } else { |
|
| 66 | + echo "$key => $value <br>"; |
|
| 67 | + } |
|
| 68 | 68 | } |
@@ -27,16 +27,16 @@ discard block |
||
| 27 | 27 | // Set GPS postion to the selected route |
| 28 | 28 | // Set right member_id corresponding to the API key |
| 29 | 29 | $params = TrackSetParams::fromArray([ |
| 30 | - 'format' => Format::SERIALIZED, |
|
| 31 | - 'route_id' => $routeId, |
|
| 32 | - 'member_id' => 105323, |
|
| 33 | - 'course' => 3, |
|
| 34 | - 'speed' => 100, |
|
| 35 | - 'lat' => 41.8927521, |
|
| 36 | - 'lng' => -109.0803888, |
|
| 37 | - 'device_type' => DeviceType::IPHONE, |
|
| 38 | - 'device_guid' => 'qweqweqwe', |
|
| 39 | - 'device_timestamp' => date('Y-m-d H:i:s'), |
|
| 30 | + 'format' => Format::SERIALIZED, |
|
| 31 | + 'route_id' => $routeId, |
|
| 32 | + 'member_id' => 105323, |
|
| 33 | + 'course' => 3, |
|
| 34 | + 'speed' => 100, |
|
| 35 | + 'lat' => 41.8927521, |
|
| 36 | + 'lng' => -109.0803888, |
|
| 37 | + 'device_type' => DeviceType::IPHONE, |
|
| 38 | + 'device_guid' => 'qweqweqwe', |
|
| 39 | + 'device_timestamp' => date('Y-m-d H:i:s'), |
|
| 40 | 40 | ]); |
| 41 | 41 | |
| 42 | 42 | $status = Track::set($params); |
@@ -46,25 +46,25 @@ discard block |
||
| 46 | 46 | assert($status['status'], "Cannot send GPS position to the selected route"); |
| 47 | 47 | |
| 48 | 48 | if (!$status) { |
| 49 | - echo 'Setting of GPS position failed'; |
|
| 49 | + echo 'Setting of GPS position failed'; |
|
| 50 | 50 | |
| 51 | - return; |
|
| 51 | + return; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | $params = [ |
| 55 | - 'route_id' => $routeId, |
|
| 56 | - 'device_tracking_history' => '1', |
|
| 55 | + 'route_id' => $routeId, |
|
| 56 | + 'device_tracking_history' => '1', |
|
| 57 | 57 | ]; |
| 58 | 58 | |
| 59 | 59 | $result = $route->GetLastLocation($params); |
| 60 | 60 | |
| 61 | 61 | if (isset($result->tracking_history)) { |
| 62 | - foreach ($result->tracking_history as $history) { |
|
| 63 | - echo 'Speed --> '.$history['s'].'<br>'; |
|
| 64 | - echo 'course --> '.$history['d'].'<br>'; |
|
| 65 | - echo 'Timestamp --> '.$history['ts_friendly'].'<br>'; |
|
| 66 | - echo 'Latitude --> '.$history['lt'].'<br>'; |
|
| 67 | - echo 'Longitude --> '.$history['lg'].'<br>'; |
|
| 68 | - echo '========================================<br><br>'; |
|
| 69 | - } |
|
| 62 | + foreach ($result->tracking_history as $history) { |
|
| 63 | + echo 'Speed --> '.$history['s'].'<br>'; |
|
| 64 | + echo 'course --> '.$history['d'].'<br>'; |
|
| 65 | + echo 'Timestamp --> '.$history['ts_friendly'].'<br>'; |
|
| 66 | + echo 'Latitude --> '.$history['lt'].'<br>'; |
|
| 67 | + echo 'Longitude --> '.$history['lg'].'<br>'; |
|
| 68 | + echo '========================================<br><br>'; |
|
| 69 | + } |
|
| 70 | 70 | } |
@@ -22,9 +22,9 @@ |
||
| 22 | 22 | $queriedUserLocations = $track->getUserLocations($email); |
| 23 | 23 | |
| 24 | 24 | foreach ($queriedUserLocations As $memberId => $userLocation) { |
| 25 | - echo $userLocation['member_data']['member_first_name'].' '.$userLocation['member_data']['member_last_name']." --> "; |
|
| 26 | - if (isset($userLocation['tracking']['position_lng'])) { |
|
| 27 | - echo "Longitude: ".$userLocation['tracking']['position_lng'].", Latitude: ".$userLocation['tracking']['position_lat']; |
|
| 28 | - } |
|
| 29 | - echo "<br>"; |
|
| 25 | + echo $userLocation['member_data']['member_first_name'].' '.$userLocation['member_data']['member_last_name']." --> "; |
|
| 26 | + if (isset($userLocation['tracking']['position_lng'])) { |
|
| 27 | + echo "Longitude: ".$userLocation['tracking']['position_lng'].", Latitude: ".$userLocation['tracking']['position_lat']; |
|
| 28 | + } |
|
| 29 | + echo "<br>"; |
|
| 30 | 30 | } |
@@ -25,25 +25,25 @@ discard block |
||
| 25 | 25 | $addresses = []; |
| 26 | 26 | |
| 27 | 27 | foreach ($json as $address) { |
| 28 | - $addresses[] = Address::fromArray($address); |
|
| 28 | + $addresses[] = Address::fromArray($address); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | //region Optimization With Duration Priority FineTuning |
| 32 | 32 | $parameters = RouteParameters::fromArray([ |
| 33 | - 'route_name' => 'Optimization With Duration Priority FineTuning. '.date('Y-m-d H:i'), |
|
| 34 | - 'algorithm_type' => AlgorithmType::CVRP_TW_SD, |
|
| 35 | - 'route_time' => 23200, |
|
| 36 | - 'optimize' => OptimizationType::TIME, |
|
| 37 | - 'device_type' => DeviceType::WEB, |
|
| 38 | - 'udu_distance_unit' => 'km', |
|
| 39 | - 'route_max_duration' => 86400, |
|
| 40 | - 'travel_mode' => TravelMode::DRIVING, |
|
| 41 | - 'vehicle_capacity' => 30, |
|
| 42 | - 'vehicle_max_distance_mi' => 10000, |
|
| 43 | - 'rt' => true, |
|
| 44 | - 'target_duration' => 100, |
|
| 45 | - 'target_distance' => 0, |
|
| 46 | - 'target_wait_by_tail_size' => 0 |
|
| 33 | + 'route_name' => 'Optimization With Duration Priority FineTuning. '.date('Y-m-d H:i'), |
|
| 34 | + 'algorithm_type' => AlgorithmType::CVRP_TW_SD, |
|
| 35 | + 'route_time' => 23200, |
|
| 36 | + 'optimize' => OptimizationType::TIME, |
|
| 37 | + 'device_type' => DeviceType::WEB, |
|
| 38 | + 'udu_distance_unit' => 'km', |
|
| 39 | + 'route_max_duration' => 86400, |
|
| 40 | + 'travel_mode' => TravelMode::DRIVING, |
|
| 41 | + 'vehicle_capacity' => 30, |
|
| 42 | + 'vehicle_max_distance_mi' => 10000, |
|
| 43 | + 'rt' => true, |
|
| 44 | + 'target_duration' => 100, |
|
| 45 | + 'target_distance' => 0, |
|
| 46 | + 'target_wait_by_tail_size' => 0 |
|
| 47 | 47 | |
| 48 | 48 | ]); |
| 49 | 49 | |
@@ -71,20 +71,20 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | //region Optimization With Distance Priority FineTuning |
| 73 | 73 | $parameters = RouteParameters::fromArray([ |
| 74 | - 'route_name' => 'Optimization With Distance Priority FineTuning. '.date('Y-m-d H:i'), |
|
| 75 | - 'algorithm_type' => AlgorithmType::CVRP_TW_SD, |
|
| 76 | - 'route_time' => 23200, |
|
| 77 | - 'optimize' => OptimizationType::TIME, |
|
| 78 | - 'device_type' => DeviceType::WEB, |
|
| 79 | - 'udu_distance_unit' => 'km', |
|
| 80 | - 'route_max_duration' => 86400, |
|
| 81 | - 'travel_mode' => TravelMode::DRIVING, |
|
| 82 | - 'vehicle_capacity' => 30, |
|
| 83 | - 'vehicle_max_distance_mi' => 10000, |
|
| 84 | - 'rt' => true, |
|
| 85 | - 'target_duration' => 0, |
|
| 86 | - 'target_distance' => 100, |
|
| 87 | - 'target_wait_by_tail_size' => 0 |
|
| 74 | + 'route_name' => 'Optimization With Distance Priority FineTuning. '.date('Y-m-d H:i'), |
|
| 75 | + 'algorithm_type' => AlgorithmType::CVRP_TW_SD, |
|
| 76 | + 'route_time' => 23200, |
|
| 77 | + 'optimize' => OptimizationType::TIME, |
|
| 78 | + 'device_type' => DeviceType::WEB, |
|
| 79 | + 'udu_distance_unit' => 'km', |
|
| 80 | + 'route_max_duration' => 86400, |
|
| 81 | + 'travel_mode' => TravelMode::DRIVING, |
|
| 82 | + 'vehicle_capacity' => 30, |
|
| 83 | + 'vehicle_max_distance_mi' => 10000, |
|
| 84 | + 'rt' => true, |
|
| 85 | + 'target_duration' => 0, |
|
| 86 | + 'target_distance' => 100, |
|
| 87 | + 'target_wait_by_tail_size' => 0 |
|
| 88 | 88 | |
| 89 | 89 | ]); |
| 90 | 90 | |
@@ -112,20 +112,20 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | //region Optimization With TimeWaiting Priority FineTuning |
| 114 | 114 | $parameters = RouteParameters::fromArray([ |
| 115 | - 'route_name' => 'Optimization With WaitingTime Priority FineTuning. '.date('Y-m-d H:i'), |
|
| 116 | - 'algorithm_type' => AlgorithmType::CVRP_TW_SD, |
|
| 117 | - 'route_time' => 23200, |
|
| 118 | - 'optimize' => OptimizationType::TIME, |
|
| 119 | - 'device_type' => DeviceType::WEB, |
|
| 120 | - 'udu_distance_unit' => 'km', |
|
| 121 | - 'route_max_duration' => 86400, |
|
| 122 | - 'travel_mode' => TravelMode::DRIVING, |
|
| 123 | - 'vehicle_capacity' => 30, |
|
| 124 | - 'vehicle_max_distance_mi' => 10000, |
|
| 125 | - 'rt' => true, |
|
| 126 | - 'target_duration' => 0, |
|
| 127 | - 'target_distance' => 0, |
|
| 128 | - 'target_wait_by_tail_size' => 100 |
|
| 115 | + 'route_name' => 'Optimization With WaitingTime Priority FineTuning. '.date('Y-m-d H:i'), |
|
| 116 | + 'algorithm_type' => AlgorithmType::CVRP_TW_SD, |
|
| 117 | + 'route_time' => 23200, |
|
| 118 | + 'optimize' => OptimizationType::TIME, |
|
| 119 | + 'device_type' => DeviceType::WEB, |
|
| 120 | + 'udu_distance_unit' => 'km', |
|
| 121 | + 'route_max_duration' => 86400, |
|
| 122 | + 'travel_mode' => TravelMode::DRIVING, |
|
| 123 | + 'vehicle_capacity' => 30, |
|
| 124 | + 'vehicle_max_distance_mi' => 10000, |
|
| 125 | + 'rt' => true, |
|
| 126 | + 'target_duration' => 0, |
|
| 127 | + 'target_distance' => 0, |
|
| 128 | + 'target_wait_by_tail_size' => 100 |
|
| 129 | 129 | |
| 130 | 130 | ]); |
| 131 | 131 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $problems = OptimizationProblem::optimize($optimizationParams); |
| 55 | 55 | assert(!is_null($problems), "Cannot generate an optimization with duration priority fine-tuning"); |
| 56 | 56 | |
| 57 | -$routes=$problems->getRoutes(); |
|
| 57 | +$routes = $problems->getRoutes(); |
|
| 58 | 58 | assert(sizeof($routes)==2, "The generated optimization hasn't two routes"); |
| 59 | 59 | |
| 60 | 60 | $totalTripDistanceByDuration = $routes[0]->trip_distance + $routes[1]->trip_distance; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $problems = OptimizationProblem::optimize($optimizationParams); |
| 96 | 96 | assert(!is_null($problems), "Cannot generate an optimization with the distance priority fine-tuning"); |
| 97 | 97 | |
| 98 | -$routes=$problems->getRoutes(); |
|
| 98 | +$routes = $problems->getRoutes(); |
|
| 99 | 99 | assert(sizeof($routes)==2, "The generated optimization hasn't two routes"); |
| 100 | 100 | |
| 101 | 101 | $totalTripDistanceByDistance = $routes[0]->trip_distance + $routes[1]->trip_distance; |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | $problems = OptimizationProblem::optimize($optimizationParams); |
| 137 | 137 | assert(!is_null($problems), "Cannot generate an optimization with the waiting time priority fine-tuning"); |
| 138 | 138 | |
| 139 | -$routes=$problems->getRoutes(); |
|
| 139 | +$routes = $problems->getRoutes(); |
|
| 140 | 140 | assert(sizeof($routes)==2, "The generated optimization hasn't two routes"); |
| 141 | 141 | |
| 142 | 142 | $totalTripDistanceByTimeWaiting = $routes[0]->trip_distance + $routes[1]->trip_distance; |