-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.php
98 lines (88 loc) · 1.72 KB
/
variables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
ini_set('xdebug.max_nesting_level', 10000);
ini_set('max_execution_time', 300);
include "vendor/autoload.php";
include __DIR__ . "/part-a/get_distances.php";
$locations = [
"Serres" => [
"lat" => 41.092083,
"lon" => 23.541016
],
"Provatas" => [
"lat" => 41.068238,
"lon" => 23.390686
],
"Ano_Kamila" => [
"lat" => 41.058320,
"lon" => 23.424134
],
"Kato_Kamila" => [
"lat" => 41.020431,
"lon" => 23.483293
],
"Kato_Mitrousi" => [
"lat" => 41.058680,
"lon" => 23.457547
],
"Koumaria" => [
"lat" => 41.016434,
"lon" => 23.434656
],
"Skoutari" => [
"lat" => 41.020032,
"lon" => 23.520701
],
"Adelfiko" => [
"lat" => 41.014645,
"lon" => 23.457354
],
"Agia_Eleni" => [
"lat" => 41.003545,
"lon" => 23.559196
],
"Peponia" => [
"lat" => 40.988154,
"lon" => 23.516756
],
];
$nodes = array_keys($locations);
// Get an array only of routes
$routes = array_keys($distances);
// Each bin weight
$node_weights_fixed = [
"Adelfiko" => 0,
"Agia_Eleni" => 100,
"Ano_Kamila" => 100,
"Kato_Kamila" => 100,
"Kato_Mitrousi" => 100,
"Koumaria" => 100,
"Peponia" => 100,
"Provatas" => 100,
"Serres" => 0,
"Skoutari" => 100,
];
// Each bin fixed weight
$node_weights = [
"Adelfiko" => 0,
"Agia_Eleni" => 100,
"Ano_Kamila" => 40,
"Kato_Kamila" => 40,
"Kato_Mitrousi" => 160,
"Koumaria" => 50,
"Peponia" => 150,
"Provatas" => 60,
"Serres" => 0,
"Skoutari" => 200,
];
$lorry1_kg = 300;
$lorry2_kg = 500;
global $locations,
$nodes,
$distances,
$routes,
$node_weights,
$node_weights_fixed,
$lorry1_kg,
$lorry2_kg;