@@ -25,18 +25,18 @@ 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 | - "route_name" => "Single Driver Multiple TimeWindows 12 Stops", |
|
34 | - "route_date" => time() + 24 * 60 * 60, |
|
35 | - "route_time" => 5 * 3600 + 30 * 60, |
|
36 | - "distance_unit" => DistanceUnit::MILES, |
|
37 | - "device_type" => DeviceType::WEB, |
|
38 | - "optimize" => OptimizationType::DISTANCE, |
|
39 | - "metric" => Metric::GEODESIC |
|
32 | + "algorithm_type" => Algorithmtype::TSP, |
|
33 | + "route_name" => "Single Driver Multiple TimeWindows 12 Stops", |
|
34 | + "route_date" => time() + 24 * 60 * 60, |
|
35 | + "route_time" => 5 * 3600 + 30 * 60, |
|
36 | + "distance_unit" => DistanceUnit::MILES, |
|
37 | + "device_type" => DeviceType::WEB, |
|
38 | + "optimize" => OptimizationType::DISTANCE, |
|
39 | + "metric" => Metric::GEODESIC |
|
40 | 40 | )); |
41 | 41 | |
42 | 42 | $optimizationParams = new OptimizationProblemParams; |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | $problem = OptimizationProblem::optimize($optimizationParams); |
47 | 47 | |
48 | 48 | foreach ((array)$problem as $key => $value) { |
49 | - if (is_string($value)) { |
|
50 | - echo $key." --> ".$value."<br>"; |
|
51 | - } else { |
|
52 | - echo "************ $key ************* <br>"; |
|
53 | - Route4Me::simplePrint((array)$value, true); |
|
54 | - echo "******************************* <br>"; |
|
55 | - } |
|
49 | + if (is_string($value)) { |
|
50 | + echo $key." --> ".$value."<br>"; |
|
51 | + } else { |
|
52 | + echo "************ $key ************* <br>"; |
|
53 | + Route4Me::simplePrint((array)$value, true); |
|
54 | + echo "******************************* <br>"; |
|
55 | + } |
|
56 | 56 | } |