@@ -21,6 +21,6 @@ |
||
| 21 | 21 | $vendorsResults = $vendors->GetTelematicsVendors($vendorsParameters); |
| 22 | 22 | |
| 23 | 23 | foreach ($vendorsResults['vendors'] as $result) { |
| 24 | - Route4Me::simplePrint($result); |
|
| 25 | - echo "<br>"; |
|
| 24 | + Route4Me::simplePrint($result); |
|
| 25 | + echo "<br>"; |
|
| 26 | 26 | } |
@@ -14,13 +14,13 @@ |
||
| 14 | 14 | Route4Me::setApiKey('11111111111111111111111111111111'); |
| 15 | 15 | |
| 16 | 16 | $vendorsParameters = TelematicsVendor::fromArray(array( |
| 17 | - "vendors" => "55,56,57" |
|
| 17 | + "vendors" => "55,56,57" |
|
| 18 | 18 | )); |
| 19 | 19 | |
| 20 | 20 | $vendors = new TelematicsVendor(); |
| 21 | 21 | $comparisonResults = $vendors->GetTelematicsVendors($vendorsParameters); |
| 22 | 22 | |
| 23 | 23 | foreach ($comparisonResults['vendors'] as $result) { |
| 24 | - Route4Me::simplePrint($result, true); |
|
| 25 | - echo "<br>"; |
|
| 24 | + Route4Me::simplePrint($result, true); |
|
| 25 | + echo "<br>"; |
|
| 26 | 26 | } |
@@ -25,27 +25,27 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | $addresses = array(); |
| 27 | 27 | foreach ($json as $address) { |
| 28 | - $addresses[] = Address::fromArray($address); |
|
| 28 | + $addresses[] = Address::fromArray($address); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | $parameters = RouteParameters::fromArray(array( |
| 32 | - "algorithm_type" => Algorithmtype::TSP, |
|
| 33 | - "store_route" => FALSE, |
|
| 34 | - "route_name" => "Single Driver Multiple TimeWindows 12 Stops", |
|
| 35 | - "shared_publicly" => TRUE, |
|
| 36 | - "route_date" => time() + 24 * 60 * 60, |
|
| 37 | - "route_time" => 5 * 3600 + 30 * 60, |
|
| 38 | - "distance_unit" => DistanceUnit::MILES, |
|
| 39 | - "device_type" => DeviceType::WEB, |
|
| 40 | - "optimize" => OptimizationType::DISTANCE |
|
| 32 | + "algorithm_type" => Algorithmtype::TSP, |
|
| 33 | + "store_route" => FALSE, |
|
| 34 | + "route_name" => "Single Driver Multiple TimeWindows 12 Stops", |
|
| 35 | + "shared_publicly" => TRUE, |
|
| 36 | + "route_date" => time() + 24 * 60 * 60, |
|
| 37 | + "route_time" => 5 * 3600 + 30 * 60, |
|
| 38 | + "distance_unit" => DistanceUnit::MILES, |
|
| 39 | + "device_type" => DeviceType::WEB, |
|
| 40 | + "optimize" => OptimizationType::DISTANCE |
|
| 41 | 41 | )); |
| 42 | 42 | |
| 43 | 43 | $optimizationParams = OptimizationProblemParams::fromArray(array( |
| 44 | - "addresses" => $addresses, |
|
| 45 | - "parameters" => $parameters, |
|
| 46 | - "optimized_callback_url" => @"https://requestb.in/1o6cgge1", |
|
| 47 | - "show_directions" => TRUE, |
|
| 48 | - "redirect" => FALSE |
|
| 44 | + "addresses" => $addresses, |
|
| 45 | + "parameters" => $parameters, |
|
| 46 | + "optimized_callback_url" => @"https://requestb.in/1o6cgge1", |
|
| 47 | + "show_directions" => TRUE, |
|
| 48 | + "redirect" => FALSE |
|
| 49 | 49 | )); |
| 50 | 50 | |
| 51 | 51 | $optimizationParams = new OptimizationProblemParams; |
@@ -55,11 +55,11 @@ discard block |
||
| 55 | 55 | $problem = OptimizationProblem::optimize($optimizationParams); |
| 56 | 56 | |
| 57 | 57 | foreach ((array)$problem as $key => $value) { |
| 58 | - if (is_string($value)) { |
|
| 59 | - echo $key." --> ".$value."<br>"; |
|
| 60 | - } else { |
|
| 61 | - echo "************ $key ************* <br>"; |
|
| 62 | - Route4Me::simplePrint((array)$value, true); |
|
| 63 | - echo "******************************* <br>"; |
|
| 64 | - } |
|
| 58 | + if (is_string($value)) { |
|
| 59 | + echo $key." --> ".$value."<br>"; |
|
| 60 | + } else { |
|
| 61 | + echo "************ $key ************* <br>"; |
|
| 62 | + Route4Me::simplePrint((array)$value, true); |
|
| 63 | + echo "******************************* <br>"; |
|
| 64 | + } |
|
| 65 | 65 | } |