├── examples ├── E-n22-k4.png ├── E-n51-k5.png └── convergence-E-n22-k4.png ├── requirements.txt ├── src └── utils.py ├── setup.py ├── LICENSE ├── benchmarks ├── evrp-2022 │ ├── E-n29-k4-s7.evrp │ ├── E-n30-k3-s7.evrp │ ├── E-n35-k3-s5.evrp │ ├── E-n37-k4-s4.evrp │ ├── F-n49-k4-s4.evrp │ ├── E-n60-k5-s9.evrp │ ├── README.txt │ ├── F-n80-k4-s8.evrp │ ├── E-n89-k7-s13.evrp │ ├── M-n110-k10-s9.evrp │ ├── E-n112-k8-s11.evrp │ ├── M-n126-k7-s5.evrp │ ├── M-n163-k12-s12.evrp │ ├── X-n147-k7-s4.evrp │ ├── F-n140-k5-s5.evrp │ ├── M-n212-k16-s12.evrp │ ├── X-n221-k11-s7.evrp │ ├── X-n360-k40-s9.evrp │ ├── X-n469-k26-s10.evrp │ └── X-n577-k30-s4.evrp └── evrp-2019 │ ├── E-n22-k4.evrp │ ├── E-n23-k3.evrp │ ├── E-n30-k3.evrp │ ├── E-n33-k4.evrp │ ├── E-n51-k5.evrp │ ├── E-n76-k7.evrp │ ├── E-n101-k8.evrp │ ├── X-n143-k7.evrp │ ├── X-n214-k11.evrp │ ├── X-n351-k40.evrp │ ├── X-n459-k26.evrp │ └── X-n573-k30.evrp ├── objects ├── node.py ├── solution.py └── problem.py ├── evrp.py ├── .gitignore ├── README.md └── algorithms └── GSGA.py /examples/E-n22-k4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeiH4207/EVRP-Python/HEAD/examples/E-n22-k4.png -------------------------------------------------------------------------------- /examples/E-n51-k5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeiH4207/EVRP-Python/HEAD/examples/E-n51-k5.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | matplotlib==3.7.1 2 | numpy==1.24.3 3 | rich==13.3.5 4 | pandas==2.2.2 5 | loguru==0.7.2 -------------------------------------------------------------------------------- /examples/convergence-E-n22-k4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NeiH4207/EVRP-Python/HEAD/examples/convergence-E-n22-k4.png -------------------------------------------------------------------------------- /src/utils.py: -------------------------------------------------------------------------------- 1 | from loguru import logger 2 | import os 3 | if os.path.exists(".log"): 4 | os.remove(".log") 5 | logger.add(".log") 6 | 7 | def get_problem_name(problem_path): 8 | return problem_path.split("/")[-1].split(".")[0] 9 | 10 | def get_problem_list(dataset_path): 11 | problem_list = [] 12 | for file in os.listdir(dataset_path): 13 | if file.endswith(".evrp"): 14 | problem_list.append(get_problem_name(file)) 15 | return sorted(problem_list, key=lambda x: int(x.split("-")[1][1:])) -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from importlib.metadata import entry_points 2 | from setuptools import setup 3 | from setuptools import setup, find_packages 4 | import pathlib 5 | 6 | here = pathlib.Path(__file__).parent.resolve() 7 | long_description = (here / "README.md").read_text(encoding="utf-8") 8 | 9 | def get_requirements(path: str): 10 | return [l.strip() for l in open(path)] 11 | 12 | setup ( 13 | name = 'EVRP Project', 14 | version = '0.1', 15 | description = 'Electric Vehicle Routing Problem', 16 | long_description = long_description, 17 | long_description_content_type="text/markdown", 18 | author = 'Vu Quoc Hien', 19 | author_email = 'hienvq23@gmail.com', 20 | url = 'https://github.com/NeiH4207/EVRP-Python', 21 | packages=find_packages(), 22 | keywords='', 23 | install_requires=get_requirements("requirements.txt"), 24 | python_requires='>=3.10', 25 | entry_points={ 26 | 'console_scripts': [ 27 | ] 28 | }, 29 | 30 | ) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Hien Vu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /benchmarks/evrp-2022/E-n29-k4-s7.evrp: -------------------------------------------------------------------------------- 1 | NAME: E-n29-k4-s7.evrp 2 | COMMENT: Modificatification of E-n22-k4 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 383 5 | VEHICLES: 4 6 | DIMENSION: 29 7 | STATIONS: 7 8 | CAPACITY: 6000 9 | ENERGY_CAPACITY: 99 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 145 215 14 | 2 151 264 15 | 3 159 261 16 | 4 130 254 17 | 5 128 252 18 | 6 163 247 19 | 7 146 246 20 | 8 161 242 21 | 9 142 239 22 | 10 163 236 23 | 11 148 232 24 | 12 128 231 25 | 13 156 217 26 | 14 129 214 27 | 15 146 208 28 | 16 164 208 29 | 17 141 206 30 | 18 147 193 31 | 19 164 193 32 | 20 129 189 33 | 21 155 185 34 | 22 139 182 35 | 23 130 225 36 | 24 136 189 37 | 25 136 248 38 | 26 152 208 39 | 27 153 242 40 | 28 154 189 41 | 29 154 254 42 | DEMAND_SECTION 43 | 1 0 44 | 2 1100 45 | 3 700 46 | 4 800 47 | 5 1400 48 | 6 2100 49 | 7 400 50 | 8 800 51 | 9 100 52 | 10 500 53 | 11 600 54 | 12 1200 55 | 13 1300 56 | 14 1300 57 | 15 300 58 | 16 900 59 | 17 2100 60 | 18 1000 61 | 19 900 62 | 20 2500 63 | 21 1800 64 | 22 700 65 | STATIONS_COORD_SECTION 66 | 23 67 | 24 68 | 25 69 | 26 70 | 27 71 | 28 72 | 29 73 | DEPOT_SECTION 74 | 1 75 | -1 76 | EOF 77 | -------------------------------------------------------------------------------- /benchmarks/evrp-2022/E-n30-k3-s7.evrp: -------------------------------------------------------------------------------- 1 | NAME: E-n30-k3-s7.evrp 2 | COMMENT: Modificatification of E-n23-k3 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 577 5 | VEHICLES: 3 6 | DIMENSION: 30 7 | STATIONS: 7 8 | CAPACITY: 4500 9 | ENERGY_CAPACITY: 162 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 266 235 14 | 2 295 272 15 | 3 301 258 16 | 4 309 260 17 | 5 217 274 18 | 6 218 278 19 | 7 282 267 20 | 8 242 249 21 | 9 230 262 22 | 10 249 268 23 | 11 256 267 24 | 12 265 257 25 | 13 267 242 26 | 14 259 265 27 | 15 315 233 28 | 16 329 252 29 | 17 318 252 30 | 18 329 224 31 | 19 267 213 32 | 20 275 192 33 | 21 303 201 34 | 22 208 217 35 | 23 326 181 36 | 24 228 217 37 | 25 233 265 38 | 26 270 253 39 | 27 284 203 40 | 28 313 264 41 | 29 314 191 42 | 30 316 237 43 | DEMAND_SECTION 44 | 1 0 45 | 2 125 46 | 3 84 47 | 4 60 48 | 5 500 49 | 6 300 50 | 7 175 51 | 8 350 52 | 9 150 53 | 10 1100 54 | 11 4100 55 | 12 225 56 | 13 300 57 | 14 250 58 | 15 500 59 | 16 150 60 | 17 100 61 | 18 250 62 | 19 120 63 | 20 600 64 | 21 500 65 | 22 175 66 | 23 75 67 | STATIONS_COORD_SECTION 68 | 24 69 | 25 70 | 26 71 | 27 72 | 28 73 | 29 74 | 30 75 | DEPOT_SECTION 76 | 1 77 | -1 78 | EOF 79 | -------------------------------------------------------------------------------- /benchmarks/evrp-2019/E-n22-k4.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of E-n22-k4 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 384.678035 5 | VEHICLES: 4 6 | DIMENSION: 30 7 | STATIONS: 8 8 | CAPACITY: 6000 9 | ENERGY_CAPACITY: 94 10 | ENERGY_CONSUMPTION: 1.20 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 145 215 14 | 2 151 264 15 | 3 159 261 16 | 4 130 254 17 | 5 128 252 18 | 6 163 247 19 | 7 146 246 20 | 8 161 242 21 | 9 142 239 22 | 10 163 236 23 | 11 148 232 24 | 12 128 231 25 | 13 156 217 26 | 14 129 214 27 | 15 146 208 28 | 16 164 208 29 | 17 141 206 30 | 18 147 193 31 | 19 164 193 32 | 20 129 189 33 | 21 155 185 34 | 22 139 182 35 | 23 137 193 36 | 24 137 213 37 | 25 137 234 38 | 26 137 254 39 | 27 155 193 40 | 28 155 213 41 | 29 155 234 42 | 30 155 254 43 | DEMAND_SECTION 44 | 1 0 45 | 2 1100 46 | 3 700 47 | 4 800 48 | 5 1400 49 | 6 2100 50 | 7 400 51 | 8 800 52 | 9 100 53 | 10 500 54 | 11 600 55 | 12 1200 56 | 13 1300 57 | 14 1300 58 | 15 300 59 | 16 900 60 | 17 2100 61 | 18 1000 62 | 19 900 63 | 20 2500 64 | 21 1800 65 | 22 700 66 | STATIONS_COORD_SECTION 67 | 23 68 | 24 69 | 25 70 | 26 71 | 27 72 | 28 73 | 29 74 | 30 75 | DEPOT_SECTION 76 | 1 77 | -1 78 | EOF -------------------------------------------------------------------------------- /objects/node.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | class Node(): 4 | def __init__(self, id, x, y): 5 | self.id = id 6 | self.x = x 7 | self.y = y 8 | self.type = None 9 | self.demand = 0 10 | 11 | def __str__(self): 12 | return str(self.id) 13 | 14 | def get_x(self): 15 | return self.x 16 | 17 | def get_y(self): 18 | return self.y 19 | 20 | def get_xy(self): 21 | return (self.x, self.y) 22 | 23 | def get_type(self): 24 | return self.type 25 | 26 | def get_id(self): 27 | return self.id 28 | 29 | def set_type(self, type): 30 | if type not in ['C', 'S', 'D']: 31 | raise ValueError(f"Invalid type: {type}, must be 'C', 'S', or 'D'.") 32 | self.type = type 33 | 34 | def get_demand(self): 35 | return self.demand 36 | 37 | def set_demand(self, demand): 38 | self.demand = demand 39 | 40 | def distance(self, P): 41 | return np.sqrt((self.x - P.x)**2 + (self.y - P.y)**2) 42 | 43 | def is_customer(self): 44 | return self.type == 'C' 45 | 46 | def is_charging_station(self): 47 | return self.type == 'S' or self.type == 'D' 48 | 49 | def is_depot(self): 50 | return self.type == 'D' -------------------------------------------------------------------------------- /benchmarks/evrp-2019/E-n23-k3.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of E-n23-k3 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 573.130948 5 | VEHICLES: 3 6 | DIMENSION: 32 7 | STATIONS: 9 8 | CAPACITY: 4500 9 | ENERGY_CAPACITY: 190 10 | ENERGY_CONSUMPTION: 1.20 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 266 235 14 | 2 295 272 15 | 3 301 258 16 | 4 309 260 17 | 5 217 274 18 | 6 218 278 19 | 7 282 267 20 | 8 242 249 21 | 9 230 262 22 | 10 249 268 23 | 11 256 267 24 | 12 265 257 25 | 13 267 242 26 | 14 259 265 27 | 15 315 233 28 | 16 329 252 29 | 17 318 252 30 | 18 329 224 31 | 19 267 213 32 | 20 275 192 33 | 21 303 201 34 | 22 208 217 35 | 23 326 181 36 | 24 229 198 37 | 25 229 230 38 | 26 229 262 39 | 27 269 198 40 | 28 269 230 41 | 29 269 262 42 | 30 309 198 43 | 31 309 230 44 | 32 309 262 45 | DEMAND_SECTION 46 | 1 0 47 | 2 125 48 | 3 84 49 | 4 60 50 | 5 500 51 | 6 300 52 | 7 175 53 | 8 350 54 | 9 150 55 | 10 1100 56 | 11 4100 57 | 12 225 58 | 13 300 59 | 14 250 60 | 15 500 61 | 16 150 62 | 17 100 63 | 18 250 64 | 19 120 65 | 20 600 66 | 21 500 67 | 22 175 68 | 23 75 69 | STATIONS_COORD_SECTION 70 | 24 71 | 25 72 | 26 73 | 27 74 | 28 75 | 29 76 | 30 77 | 31 78 | 32 79 | DEPOT_SECTION 80 | 1 81 | -1 82 | EOF -------------------------------------------------------------------------------- /benchmarks/evrp-2022/E-n35-k3-s5.evrp: -------------------------------------------------------------------------------- 1 | NAME: E-n35-k3-s5.evrp 2 | COMMENT: Modificatification of E-n30-k3 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 527 5 | VEHICLES: 3 6 | DIMENSION: 35 7 | STATIONS: 5 8 | CAPACITY: 4500 9 | ENERGY_CAPACITY: 138 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 162 354 14 | 2 218 382 15 | 3 218 358 16 | 4 201 370 17 | 5 214 371 18 | 6 224 370 19 | 7 210 382 20 | 8 104 354 21 | 9 126 338 22 | 10 119 340 23 | 11 129 349 24 | 12 126 347 25 | 13 125 346 26 | 14 116 355 27 | 15 126 335 28 | 16 125 355 29 | 17 119 357 30 | 18 115 341 31 | 19 153 351 32 | 20 175 363 33 | 21 180 360 34 | 22 159 331 35 | 23 188 357 36 | 24 152 349 37 | 25 215 389 38 | 26 212 394 39 | 27 188 393 40 | 28 207 406 41 | 29 184 410 42 | 30 207 392 43 | 31 117 345 44 | 32 156 342 45 | 33 173 354 46 | 34 196 398 47 | 35 216 374 48 | DEMAND_SECTION 49 | 1 0 50 | 2 300 51 | 3 3100 52 | 4 125 53 | 5 100 54 | 6 200 55 | 7 150 56 | 8 150 57 | 9 450 58 | 10 300 59 | 11 100 60 | 12 950 61 | 13 125 62 | 14 150 63 | 15 150 64 | 16 550 65 | 17 150 66 | 18 100 67 | 19 150 68 | 20 400 69 | 21 300 70 | 22 1500 71 | 23 100 72 | 24 300 73 | 25 500 74 | 26 800 75 | 27 300 76 | 28 100 77 | 29 150 78 | 30 1000 79 | STATIONS_COORD_SECTION 80 | 31 81 | 32 82 | 33 83 | 34 84 | 35 85 | DEPOT_SECTION 86 | 1 87 | -1 88 | EOF 89 | -------------------------------------------------------------------------------- /benchmarks/evrp-2019/E-n30-k3.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of E-n30-k3 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 511.253921 5 | VEHICLES: 4 6 | DIMENSION: 36 7 | STATIONS: 6 8 | CAPACITY: 4500 9 | ENERGY_CAPACITY: 178 10 | ENERGY_CONSUMPTION: 1.20 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 162 354 14 | 2 218 382 15 | 3 218 358 16 | 4 201 370 17 | 5 214 371 18 | 6 224 370 19 | 7 210 382 20 | 8 104 354 21 | 9 126 338 22 | 10 119 340 23 | 11 129 349 24 | 12 126 347 25 | 13 125 346 26 | 14 116 355 27 | 15 126 335 28 | 16 125 355 29 | 17 119 357 30 | 18 115 341 31 | 19 153 351 32 | 20 175 363 33 | 21 180 360 34 | 22 159 331 35 | 23 188 357 36 | 24 152 349 37 | 25 215 389 38 | 26 212 394 39 | 27 188 393 40 | 28 207 406 41 | 29 184 410 42 | 30 207 392 43 | 31 124 351 44 | 32 124 391 45 | 33 164 351 46 | 34 164 391 47 | 35 204 351 48 | 36 204 391 49 | DEMAND_SECTION 50 | 1 0 51 | 2 300 52 | 3 3100 53 | 4 125 54 | 5 100 55 | 6 200 56 | 7 150 57 | 8 150 58 | 9 450 59 | 10 300 60 | 11 100 61 | 12 950 62 | 13 125 63 | 14 150 64 | 15 150 65 | 16 550 66 | 17 150 67 | 18 100 68 | 19 150 69 | 20 400 70 | 21 300 71 | 22 1500 72 | 23 100 73 | 24 300 74 | 25 500 75 | 26 800 76 | 27 300 77 | 28 100 78 | 29 150 79 | 30 1000 80 | STATIONS_COORD_SECTION 81 | 31 82 | 32 83 | 33 84 | 34 85 | 35 86 | 36 87 | DEPOT_SECTION 88 | 1 89 | -1 90 | EOF -------------------------------------------------------------------------------- /benchmarks/evrp-2022/E-n37-k4-s4.evrp: -------------------------------------------------------------------------------- 1 | NAME: E-n37-k4-s4.evrp 2 | COMMENT: Modificatification of E-n33-k4 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 857 (best known) 5 | VEHICLES: 4 6 | DIMENSION: 37 7 | STATIONS: 4 8 | CAPACITY: 8000 9 | ENERGY_CAPACITY: 238 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 292 495 14 | 2 298 427 15 | 3 309 445 16 | 4 307 464 17 | 5 336 475 18 | 6 320 439 19 | 7 321 437 20 | 8 322 437 21 | 9 323 433 22 | 10 324 433 23 | 11 323 429 24 | 12 314 435 25 | 13 311 442 26 | 14 304 427 27 | 15 293 421 28 | 16 296 418 29 | 17 261 384 30 | 18 297 410 31 | 19 315 407 32 | 20 314 406 33 | 21 321 391 34 | 22 321 398 35 | 23 314 394 36 | 24 313 378 37 | 25 304 382 38 | 26 295 402 39 | 27 283 406 40 | 28 279 399 41 | 29 271 401 42 | 30 264 414 43 | 31 277 439 44 | 32 290 434 45 | 33 319 433 46 | 34 271 411 47 | 35 288 391 48 | 36 309 416 49 | 37 310 473 50 | DEMAND_SECTION 51 | 1 0 52 | 2 700 53 | 3 400 54 | 4 400 55 | 5 1200 56 | 6 40 57 | 7 80 58 | 8 2000 59 | 9 900 60 | 10 600 61 | 11 750 62 | 12 1500 63 | 13 150 64 | 14 250 65 | 15 1600 66 | 16 450 67 | 17 700 68 | 18 550 69 | 19 650 70 | 20 200 71 | 21 400 72 | 22 300 73 | 23 1300 74 | 24 700 75 | 25 750 76 | 26 1400 77 | 27 4000 78 | 28 600 79 | 29 1000 80 | 30 500 81 | 31 2500 82 | 32 1700 83 | 33 1100 84 | STATIONS_COORD_SECTION 85 | 34 86 | 35 87 | 36 88 | 37 89 | DEPOT_SECTION 90 | 1 91 | -1 92 | EOF 93 | -------------------------------------------------------------------------------- /benchmarks/evrp-2019/E-n33-k4.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of E-n33-k4 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 869.892175 5 | VEHICLES: 4 6 | DIMENSION: 39 7 | STATIONS: 6 8 | CAPACITY: 8000 9 | ENERGY_CAPACITY: 209 10 | ENERGY_CONSUMPTION: 1.20 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 292 495 14 | 2 298 427 15 | 3 309 445 16 | 4 307 464 17 | 5 336 475 18 | 6 320 439 19 | 7 321 437 20 | 8 322 437 21 | 9 323 433 22 | 10 324 433 23 | 11 323 429 24 | 12 314 435 25 | 13 311 442 26 | 14 304 427 27 | 15 293 421 28 | 16 296 418 29 | 17 261 384 30 | 18 297 410 31 | 19 315 407 32 | 20 314 406 33 | 21 321 391 34 | 22 321 398 35 | 23 314 394 36 | 24 313 378 37 | 25 304 382 38 | 26 295 402 39 | 27 283 406 40 | 28 279 399 41 | 29 271 401 42 | 30 264 414 43 | 31 277 439 44 | 32 290 434 45 | 33 319 433 46 | 34 280 398 47 | 35 280 437 48 | 36 280 476 49 | 37 318 398 50 | 38 318 437 51 | 39 318 476 52 | DEMAND_SECTION 53 | 1 0 54 | 2 700 55 | 3 400 56 | 4 400 57 | 5 1200 58 | 6 40 59 | 7 80 60 | 8 2000 61 | 9 900 62 | 10 600 63 | 11 750 64 | 12 1500 65 | 13 150 66 | 14 250 67 | 15 1600 68 | 16 450 69 | 17 700 70 | 18 550 71 | 19 650 72 | 20 200 73 | 21 400 74 | 22 300 75 | 23 1300 76 | 24 700 77 | 25 750 78 | 26 1400 79 | 27 4000 80 | 28 600 81 | 29 1000 82 | 30 500 83 | 31 2500 84 | 32 1700 85 | 33 1100 86 | STATIONS_COORD_SECTION 87 | 34 88 | 35 89 | 36 90 | 37 91 | 38 92 | 39 93 | DEPOT_SECTION 94 | 1 95 | -1 96 | EOF -------------------------------------------------------------------------------- /benchmarks/evrp-2022/F-n49-k4-s4.evrp: -------------------------------------------------------------------------------- 1 | NAME: F-n49-k4-s4.evrp 2 | COMMENT: Modificatification of F-n45-k4 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 740 (upper bound) 5 | VEHICLES: 4 6 | DIMENSION: 49 7 | STATIONS: 4 8 | CAPACITY: 2010 9 | ENERGY_CAPACITY: 260 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 0 0 14 | 2 3 5 15 | 3 2.5 9 16 | 4 48 16 17 | 5 48 17 18 | 6 69 16 19 | 7 70 16 20 | 8 64 13 21 | 9 3 -22 22 | 10 2.5 1 23 | 11 -13 11.5 24 | 12 -20 45 25 | 13 -9 52 26 | 14 -8.5 53 27 | 15 -8 52 28 | 16 2 2 29 | 17 -2 9 30 | 18 -10 20 31 | 19 -20 19 32 | 20 -15 -21 33 | 21 -5 -9 34 | 22 -4.5 -9 35 | 23 -52 -36 36 | 24 -53 -36 37 | 25 0 0.01 38 | 26 -30 -18 39 | 27 -51 -35 40 | 28 81 9 41 | 29 84 -99 42 | 30 82 -6 43 | 31 40 -12 44 | 32 50 -7 45 | 33 51 -8 46 | 34 63 -17 47 | 35 45 -1 48 | 36 54 8.5 49 | 37 29 4 50 | 38 21 3 51 | 39 22 2 52 | 40 39 -3 53 | 41 39.5 -3 54 | 42 40 -11 55 | 43 28 -2 56 | 44 24 -18 57 | 45 24 -19 58 | 46 -24 -28 59 | 47 -2 22 60 | 48 52 -4 61 | 49 83 -95 62 | DEMAND_SECTION 63 | 1 0 64 | 2 33 65 | 3 15 66 | 4 10 67 | 5 40 68 | 6 15 69 | 7 5 70 | 8 77 71 | 9 435 72 | 10 165 73 | 11 120 74 | 12 65 75 | 13 23 76 | 14 18 77 | 15 550 78 | 16 78 79 | 17 627 80 | 18 9 81 | 19 96 82 | 20 116 83 | 21 116 84 | 22 83 85 | 23 41 86 | 24 645 87 | 25 694 88 | 26 573 89 | 27 1 90 | 28 181 91 | 29 106 92 | 30 52 93 | 31 117 94 | 32 52 95 | 33 1300 96 | 34 57 97 | 35 28 98 | 36 84 99 | 37 1 100 | 38 54 101 | 39 19 102 | 40 88 103 | 41 41 104 | 42 238 105 | 43 66 106 | 44 44 107 | 45 42 108 | STATIONS_COORD_SECTION 109 | 46 110 | 47 111 | 48 112 | 49 113 | DEPOT_SECTION 114 | 1 115 | -1 116 | EOF 117 | -------------------------------------------------------------------------------- /benchmarks/evrp-2022/E-n60-k5-s9.evrp: -------------------------------------------------------------------------------- 1 | NAME: E-n60-k5-s9.evrp 2 | COMMENT: Modificatification of E-n51-k5 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 5 6 | DIMENSION: 60 7 | STATIONS: 9 8 | CAPACITY: 160 9 | ENERGY_CAPACITY: 88 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 30 40 14 | 2 37 52 15 | 3 49 49 16 | 4 52 64 17 | 5 20 26 18 | 6 40 30 19 | 7 21 47 20 | 8 17 63 21 | 9 31 62 22 | 10 52 33 23 | 11 51 21 24 | 12 42 41 25 | 13 31 32 26 | 14 5 25 27 | 15 12 42 28 | 16 36 16 29 | 17 52 41 30 | 18 27 23 31 | 19 17 33 32 | 20 13 13 33 | 21 57 58 34 | 22 62 42 35 | 23 42 57 36 | 24 16 57 37 | 25 8 52 38 | 26 7 38 39 | 27 27 68 40 | 28 30 48 41 | 29 43 67 42 | 30 58 48 43 | 31 58 27 44 | 32 37 69 45 | 33 38 46 46 | 34 46 10 47 | 35 61 33 48 | 36 62 63 49 | 37 63 69 50 | 38 32 22 51 | 39 45 35 52 | 40 59 15 53 | 41 5 6 54 | 42 10 17 55 | 43 21 10 56 | 44 5 64 57 | 45 30 15 58 | 46 39 10 59 | 47 32 39 60 | 48 25 32 61 | 49 25 55 62 | 50 48 28 63 | 51 56 37 64 | 52 8 59 65 | 53 11 32 66 | 54 15 8 67 | 55 30 41 68 | 56 34 61 69 | 57 37 20 70 | 58 51 19 71 | 59 52 39 72 | 60 54 67 73 | DEMAND_SECTION 74 | 1 0 75 | 2 7 76 | 3 30 77 | 4 16 78 | 5 9 79 | 6 21 80 | 7 15 81 | 8 19 82 | 9 23 83 | 10 11 84 | 11 5 85 | 12 19 86 | 13 29 87 | 14 23 88 | 15 21 89 | 16 10 90 | 17 15 91 | 18 3 92 | 19 41 93 | 20 9 94 | 21 28 95 | 22 8 96 | 23 8 97 | 24 16 98 | 25 10 99 | 26 28 100 | 27 7 101 | 28 15 102 | 29 14 103 | 30 6 104 | 31 19 105 | 32 11 106 | 33 12 107 | 34 23 108 | 35 26 109 | 36 17 110 | 37 6 111 | 38 9 112 | 39 15 113 | 40 14 114 | 41 7 115 | 42 27 116 | 43 13 117 | 44 11 118 | 45 16 119 | 46 10 120 | 47 5 121 | 48 25 122 | 49 17 123 | 50 18 124 | 51 10 125 | STATIONS_COORD_SECTION 126 | 52 127 | 53 128 | 54 129 | 55 130 | 56 131 | 57 132 | 58 133 | 59 134 | 60 135 | DEPOT_SECTION 136 | 1 137 | -1 138 | EOF 139 | -------------------------------------------------------------------------------- /benchmarks/evrp-2019/E-n51-k5.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of E-n51-k5 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 570.170703 5 | VEHICLES: 5 6 | DIMENSION: 60 7 | STATIONS: 9 8 | CAPACITY: 160 9 | ENERGY_CAPACITY: 105 10 | ENERGY_CONSUMPTION: 1.20 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 30 40 14 | 2 37 52 15 | 3 49 49 16 | 4 52 64 17 | 5 20 26 18 | 6 40 30 19 | 7 21 47 20 | 8 17 63 21 | 9 31 62 22 | 10 52 33 23 | 11 51 21 24 | 12 42 41 25 | 13 31 32 26 | 14 5 25 27 | 15 12 42 28 | 16 36 16 29 | 17 52 41 30 | 18 27 23 31 | 19 17 33 32 | 20 13 13 33 | 21 57 58 34 | 22 62 42 35 | 23 42 57 36 | 24 16 57 37 | 25 8 52 38 | 26 7 38 39 | 27 27 68 40 | 28 30 48 41 | 29 43 67 42 | 30 58 48 43 | 31 58 27 44 | 32 37 69 45 | 33 38 46 46 | 34 46 10 47 | 35 61 33 48 | 36 62 63 49 | 37 63 69 50 | 38 32 22 51 | 39 45 35 52 | 40 59 15 53 | 41 5 6 54 | 42 10 17 55 | 43 21 10 56 | 44 5 64 57 | 45 30 15 58 | 46 39 10 59 | 47 32 39 60 | 48 25 32 61 | 49 25 55 62 | 50 48 28 63 | 51 56 37 64 | 52 15 17 65 | 53 15 38 66 | 54 15 59 67 | 55 34 17 68 | 56 34 38 69 | 57 34 59 70 | 58 54 17 71 | 59 54 38 72 | 60 54 59 73 | DEMAND_SECTION 74 | 1 0 75 | 2 7 76 | 3 30 77 | 4 16 78 | 5 9 79 | 6 21 80 | 7 15 81 | 8 19 82 | 9 23 83 | 10 11 84 | 11 5 85 | 12 19 86 | 13 29 87 | 14 23 88 | 15 21 89 | 16 10 90 | 17 15 91 | 18 3 92 | 19 41 93 | 20 9 94 | 21 28 95 | 22 8 96 | 23 8 97 | 24 16 98 | 25 10 99 | 26 28 100 | 27 7 101 | 28 15 102 | 29 14 103 | 30 6 104 | 31 19 105 | 32 11 106 | 33 12 107 | 34 23 108 | 35 26 109 | 36 17 110 | 37 6 111 | 38 9 112 | 39 15 113 | 40 14 114 | 41 7 115 | 42 27 116 | 43 13 117 | 44 11 118 | 45 16 119 | 46 10 120 | 47 5 121 | 48 25 122 | 49 17 123 | 50 18 124 | 51 10 125 | STATIONS_COORD_SECTION 126 | 52 127 | 53 128 | 54 129 | 55 130 | 56 131 | 57 132 | 58 133 | 59 134 | 60 135 | DEPOT_SECTION 136 | 1 137 | -1 138 | EOF -------------------------------------------------------------------------------- /benchmarks/evrp-2022/README.txt: -------------------------------------------------------------------------------- 1 | This EVRP benchmark set is published in: 2 | 3 | M. Mavrovouniotis, C. Menelaou, S. Timotheou, G. Ellinas, C. Panayiotou and M. Polycarpou, "A Benchmark Test Suite for the Electric Capacitated Vehicle Routing Problem," 2020 IEEE Congress on Evolutionary Computation (CEC), 2020, pp. 1-8, doi: 10.1109/CEC48606.2020.9185753. 4 | 5 | If you use the benchmark set in your research, we would appreciate a citation in your publications. 6 | 7 | 8 | DETAILS of the instance files 9 | 10 | Specification part 11 | ------------------ 12 | All entries in this section are of the form : . Below we give a list of all avaiable keywords. 13 | 14 | NAME: 15 | Identifies the data file 16 | 17 | TYPE: 18 | Specifies the type of the data, i.e., EVRP 19 | 20 | COMMENT: 21 | Additional comments 22 | 23 | OPTIMAL_VALUE: 24 | Identifies either the optimal value, upper bound or best known value 25 | 26 | VEHICLES: 27 | It is the minimum number of EVs that can be used 28 | 29 | DIMENSION: 30 | It is the total number of nodes, including customers, depots, and charging stations 31 | 32 | ENERGY_CAPACITY: 33 | Specifies the EV battery capacity 34 | 35 | ENERGY_CONSUMPTION: 36 | Specifies the energy consumption of the EV when traversing arcs 37 | 38 | STATIONS: 39 | It is the number of charging stations 40 | 41 | CAPACITY: 42 | Specifies the EV cargo capacity 43 | 44 | EDGE_WEIGHT_TYPE: 45 | EUC_2D Weights are Euclidean distances in 2-D 46 | 47 | EOF: 48 | Terminates the input data 49 | 50 | 51 | Data part 52 | ---------------- 53 | The instance data are given in the corresponding data sections following the specification part. Each data 54 | begins with the corresponding keyword. The length of the sections depends on the type of the data. 55 | 56 | NODE_COORD_SECTION: 57 | Node coordinates are given in this section. Each line is of the form 58 | 59 | The integers give the number of the respective node and the real numbers give the associate coordinates 60 | 61 | DEMAND_SECTION: 62 | Customer delivey demands are given in this section. Each line is of the form 63 | 64 | The first integer give the number of the respective customer node and the real give its delivery demand. The demand 65 | of the depot node is always 0. 66 | 67 | STATION_COORD_SECTION: 68 | Contains a list of all the recharging station nodes 69 | 70 | DEPOT_SECTION: 71 | Contains a list of the depot nodes. This list is terminated by a -1. 72 | -------------------------------------------------------------------------------- /benchmarks/evrp-2022/F-n80-k4-s8.evrp: -------------------------------------------------------------------------------- 1 | NAME: F-n80-k4-s8.evrp 2 | COMMENT: Modificatification of F-n72-k4 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 4 6 | DIMENSION: 80 7 | STATIONS: 8 8 | CAPACITY: 30000 9 | ENERGY_CAPACITY: 53 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 0 0 14 | 2 -12 -6 15 | 3 -15 -5 16 | 4 -1 -18 17 | 5 2 -21 18 | 6 -1 -17 19 | 7 -9 -12 20 | 8 2 -22 21 | 9 1 -21 22 | 10 7 -25 23 | 11 -7 -17 24 | 12 -11 -5 25 | 13 -14 -9 26 | 14 -14 -8 27 | 15 -11 -2 28 | 16 -14 -5 29 | 17 -15 -9 30 | 18 -15 -8 31 | 19 -9 -6 32 | 20 -14 -4 33 | 21 3 6 34 | 22 5 9 35 | 23 5 10 36 | 24 2 8 37 | 25 1 9 38 | 26 1 10 39 | 27 2 9 40 | 28 6 14 41 | 29 5 12 42 | 30 3 7 43 | 31 4 8 44 | 32 -6 1 45 | 33 -6 2 46 | 34 -8 -2 47 | 35 -7 2 48 | 36 -7 -3 49 | 37 -7 -2 50 | 38 -20 12 51 | 39 -20 13 52 | 40 -12 10 53 | 41 -20 15 54 | 42 -6 8 55 | 43 2 21 56 | 44 2 22 57 | 45 1 21 58 | 46 -1 24 59 | 47 1 22 60 | 48 -2 20 61 | 49 -2 21 62 | 50 -4 18 63 | 51 -4 19 64 | 52 -5 18 65 | 53 -5 26 66 | 54 1 23 67 | 55 -6 5 68 | 56 -6 6 69 | 57 -9 6 70 | 58 -9 7 71 | 59 -12 5 72 | 60 -12 6 73 | 61 -11 3 74 | 62 -11 4 75 | 63 -14 4 76 | 64 -14 5 77 | 65 -15 4 78 | 66 -15 5 79 | 67 -16 7 80 | 68 -16 8 81 | 69 -15 10 82 | 70 -20 10 83 | 71 -5 19 84 | 72 -9 -11 85 | 73 -17 10 86 | 74 -10 -7 87 | 75 -10 5 88 | 76 -9 -12 89 | 77 -5 3 90 | 78 -3 23 91 | 79 2 10 92 | 80 4 -20 93 | DEMAND_SECTION 94 | 1 0 95 | 2 7063 96 | 3 51 97 | 4 23 98 | 5 3074 99 | 6 349 100 | 7 1047 101 | 8 698 102 | 9 3001 103 | 10 31 104 | 11 1135 105 | 12 21611 106 | 13 57 107 | 14 51 108 | 15 551 109 | 16 179 110 | 17 6 111 | 18 528 112 | 19 2832 113 | 20 1514 114 | 21 889 115 | 22 2554 116 | 23 1215 117 | 24 1810 118 | 25 3050 119 | 26 4 120 | 27 1563 121 | 28 741 122 | 29 1532 123 | 30 709 124 | 31 1022 125 | 32 883 126 | 33 1689 127 | 34 10235 128 | 35 29 129 | 36 2894 130 | 37 450 131 | 38 411 132 | 39 207 133 | 40 496 134 | 41 1021 135 | 42 117 136 | 43 46 137 | 44 8 138 | 45 18 139 | 46 561 140 | 47 1877 141 | 48 3542 142 | 49 801 143 | 50 967 144 | 51 62 145 | 52 1366 146 | 53 230 147 | 54 4 148 | 55 12 149 | 56 145 150 | 57 7149 151 | 58 2250 152 | 59 383 153 | 60 134 154 | 61 1947 155 | 62 182 156 | 63 3934 157 | 64 468 158 | 65 18 159 | 66 133 160 | 67 2340 161 | 68 754 162 | 69 1264 163 | 70 806 164 | 71 3665 165 | 72 2452 166 | STATIONS_COORD_SECTION 167 | 73 168 | 74 169 | 75 170 | 76 171 | 77 172 | 78 173 | 79 174 | 80 175 | DEPOT_SECTION 176 | 1 177 | -1 178 | EOF 179 | -------------------------------------------------------------------------------- /benchmarks/evrp-2019/E-n76-k7.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of E-n76-k7 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 723.367517 5 | VEHICLES: 7 6 | DIMENSION: 85 7 | STATIONS: 9 8 | CAPACITY: 220 9 | ENERGY_CAPACITY: 98 10 | ENERGY_CONSUMPTION: 1.20 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 40 40 14 | 2 22 22 15 | 3 36 26 16 | 4 21 45 17 | 5 45 35 18 | 6 55 20 19 | 7 33 34 20 | 8 50 50 21 | 9 55 45 22 | 10 26 59 23 | 11 40 66 24 | 12 55 65 25 | 13 35 51 26 | 14 62 35 27 | 15 62 57 28 | 16 62 24 29 | 17 21 36 30 | 18 33 44 31 | 19 9 56 32 | 20 62 48 33 | 21 66 14 34 | 22 44 13 35 | 23 26 13 36 | 24 11 28 37 | 25 7 43 38 | 26 17 64 39 | 27 41 46 40 | 28 55 34 41 | 29 35 16 42 | 30 52 26 43 | 31 43 26 44 | 32 31 76 45 | 33 22 53 46 | 34 26 29 47 | 35 50 40 48 | 36 55 50 49 | 37 54 10 50 | 38 60 15 51 | 39 47 66 52 | 40 30 60 53 | 41 30 50 54 | 42 12 17 55 | 43 15 14 56 | 44 16 19 57 | 45 21 48 58 | 46 50 30 59 | 47 51 42 60 | 48 50 15 61 | 49 48 21 62 | 50 12 38 63 | 51 15 56 64 | 52 29 39 65 | 53 54 38 66 | 54 55 57 67 | 55 67 41 68 | 56 10 70 69 | 57 6 25 70 | 58 65 27 71 | 59 40 60 72 | 60 70 64 73 | 61 64 4 74 | 62 36 6 75 | 63 30 20 76 | 64 20 30 77 | 65 15 5 78 | 66 50 70 79 | 67 57 72 80 | 68 45 42 81 | 69 38 33 82 | 70 50 4 83 | 71 66 8 84 | 72 59 5 85 | 73 35 60 86 | 74 27 24 87 | 75 40 20 88 | 76 40 37 89 | 77 17 16 90 | 78 17 40 91 | 79 17 64 92 | 80 38 16 93 | 81 38 40 94 | 82 38 64 95 | 83 60 16 96 | 84 60 40 97 | 85 60 64 98 | DEMAND_SECTION 99 | 1 0 100 | 2 18 101 | 3 26 102 | 4 11 103 | 5 30 104 | 6 21 105 | 7 19 106 | 8 15 107 | 9 16 108 | 10 29 109 | 11 26 110 | 12 37 111 | 13 16 112 | 14 12 113 | 15 31 114 | 16 8 115 | 17 19 116 | 18 20 117 | 19 13 118 | 20 15 119 | 21 22 120 | 22 28 121 | 23 12 122 | 24 6 123 | 25 27 124 | 26 14 125 | 27 18 126 | 28 17 127 | 29 29 128 | 30 13 129 | 31 22 130 | 32 25 131 | 33 28 132 | 34 27 133 | 35 19 134 | 36 10 135 | 37 12 136 | 38 14 137 | 39 24 138 | 40 16 139 | 41 33 140 | 42 15 141 | 43 11 142 | 44 18 143 | 45 17 144 | 46 21 145 | 47 27 146 | 48 19 147 | 49 20 148 | 50 5 149 | 51 22 150 | 52 12 151 | 53 19 152 | 54 22 153 | 55 16 154 | 56 7 155 | 57 26 156 | 58 14 157 | 59 21 158 | 60 24 159 | 61 13 160 | 62 15 161 | 63 18 162 | 64 11 163 | 65 28 164 | 66 9 165 | 67 37 166 | 68 30 167 | 69 10 168 | 70 8 169 | 71 11 170 | 72 3 171 | 73 1 172 | 74 6 173 | 75 10 174 | 76 20 175 | STATIONS_COORD_SECTION 176 | 77 177 | 78 178 | 79 179 | 80 180 | 81 181 | 82 182 | 83 183 | 84 184 | 85 185 | DEPOT_SECTION 186 | 1 187 | -1 188 | EOF -------------------------------------------------------------------------------- /benchmarks/evrp-2022/E-n89-k7-s13.evrp: -------------------------------------------------------------------------------- 1 | NAME: E-n89-k7-s13.evrp 2 | COMMENT: Modificatification of E-n76-k7 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 7 6 | DIMENSION: 89 7 | STATIONS: 13 8 | CAPACITY: 220 9 | ENERGY_CAPACITY: 87 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 40 40 14 | 2 22 22 15 | 3 36 26 16 | 4 21 45 17 | 5 45 35 18 | 6 55 20 19 | 7 33 34 20 | 8 50 50 21 | 9 55 45 22 | 10 26 59 23 | 11 40 66 24 | 12 55 65 25 | 13 35 51 26 | 14 62 35 27 | 15 62 57 28 | 16 62 24 29 | 17 21 36 30 | 18 33 44 31 | 19 9 56 32 | 20 62 48 33 | 21 66 14 34 | 22 44 13 35 | 23 26 13 36 | 24 11 28 37 | 25 7 43 38 | 26 17 64 39 | 27 41 46 40 | 28 55 34 41 | 29 35 16 42 | 30 52 26 43 | 31 43 26 44 | 32 31 76 45 | 33 22 53 46 | 34 26 29 47 | 35 50 40 48 | 36 55 50 49 | 37 54 10 50 | 38 60 15 51 | 39 47 66 52 | 40 30 60 53 | 41 30 50 54 | 42 12 17 55 | 43 15 14 56 | 44 16 19 57 | 45 21 48 58 | 46 50 30 59 | 47 51 42 60 | 48 50 15 61 | 49 48 21 62 | 50 12 38 63 | 51 15 56 64 | 52 29 39 65 | 53 54 38 66 | 54 55 57 67 | 55 67 41 68 | 56 10 70 69 | 57 6 25 70 | 58 65 27 71 | 59 40 60 72 | 60 70 64 73 | 61 64 4 74 | 62 36 6 75 | 63 30 20 76 | 64 20 30 77 | 65 15 5 78 | 66 50 70 79 | 67 57 72 80 | 68 45 42 81 | 69 38 33 82 | 70 50 4 83 | 71 66 8 84 | 72 59 5 85 | 73 35 60 86 | 74 27 24 87 | 75 40 20 88 | 76 40 37 89 | 77 7 33 90 | 78 10 63 91 | 79 18 14 92 | 80 28 51 93 | 81 29 31 94 | 82 36 16 95 | 83 36 68 96 | 84 47 30 97 | 85 48 43 98 | 86 48 70 99 | 87 57 11 100 | 88 61 33 101 | 89 62 58 102 | DEMAND_SECTION 103 | 1 0 104 | 2 18 105 | 3 26 106 | 4 11 107 | 5 30 108 | 6 21 109 | 7 19 110 | 8 15 111 | 9 16 112 | 10 29 113 | 11 26 114 | 12 37 115 | 13 16 116 | 14 12 117 | 15 31 118 | 16 8 119 | 17 19 120 | 18 20 121 | 19 13 122 | 20 15 123 | 21 22 124 | 22 28 125 | 23 12 126 | 24 6 127 | 25 27 128 | 26 14 129 | 27 18 130 | 28 17 131 | 29 29 132 | 30 13 133 | 31 22 134 | 32 25 135 | 33 28 136 | 34 27 137 | 35 19 138 | 36 10 139 | 37 12 140 | 38 14 141 | 39 24 142 | 40 16 143 | 41 33 144 | 42 15 145 | 43 11 146 | 44 18 147 | 45 17 148 | 46 21 149 | 47 27 150 | 48 19 151 | 49 20 152 | 50 5 153 | 51 22 154 | 52 12 155 | 53 19 156 | 54 22 157 | 55 16 158 | 56 7 159 | 57 26 160 | 58 14 161 | 59 21 162 | 60 24 163 | 61 13 164 | 62 15 165 | 63 18 166 | 64 11 167 | 65 28 168 | 66 9 169 | 67 37 170 | 68 30 171 | 69 10 172 | 70 8 173 | 71 11 174 | 72 3 175 | 73 1 176 | 74 6 177 | 75 10 178 | 76 20 179 | STATIONS_COORD_SECTION 180 | 77 181 | 78 182 | 79 183 | 80 184 | 81 185 | 82 186 | 83 187 | 84 188 | 85 189 | 86 190 | 87 191 | 88 192 | 89 193 | DEPOT_SECTION 194 | 1 195 | -1 196 | EOF 197 | -------------------------------------------------------------------------------- /evrp.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import os 3 | 4 | import numpy as np 5 | from algorithms.GSGA import GSGA 6 | from objects.problem import Problem 7 | from algorithms.GreedySearch import GreedySearch 8 | from src.utils import get_problem_name, logger 9 | import random 10 | 11 | def argparser(): 12 | parser = argparse.ArgumentParser() 13 | parser.add_argument('-p', '--problem-path', type=str, default='./benchmarks/evrp-2019/E-n22-k4.evrp') 14 | parser.add_argument('-a', '--algorithm', type=str, default='GSGA') 15 | parser.add_argument('-o', '--result-path', type=str, default='./results/GSGA/') 16 | parser.add_argument('-n', '--nruns', type=int, default=10) 17 | parser.add_argument('--seed', type=int, default=42) 18 | args = parser.parse_args() 19 | return args 20 | 21 | def set_random_seed(seed): 22 | np.random.seed(seed) 23 | random.seed(seed) 24 | 25 | 26 | if __name__ == "__main__": 27 | args = argparser() 28 | set_random_seed(args.seed) 29 | problem_name = get_problem_name(args.problem_path) 30 | problem = Problem(args.problem_path) 31 | 32 | if args.algorithm == 'GreedySearch': 33 | algorithm = GreedySearch() 34 | 35 | kwargs = { 36 | 'problem': problem, 37 | 'verbose': True 38 | } 39 | 40 | elif args.algorithm == 'GSGA': 41 | algorithm = GSGA(population_size=100, generations=200, 42 | crossover_prob=0.85, mutation_prob=0.75, elite_rate=0.2) 43 | 44 | kwargs = { 45 | 'problem': problem, 46 | 'verbose': True, 47 | 'plot_path': os.path.join(args.result_path, problem_name, 'fitness_history.png') 48 | } 49 | else: 50 | raise ValueError(f'Invalid algorithm {args.algorithm}') 51 | 52 | results = [] 53 | 54 | for i in range(args.nruns): 55 | result_path = os.path.join(args.result_path, problem_name) 56 | result_file = os.path.join(result_path, f"run_{i}.txt") 57 | figure_file = os.path.join(result_path, f"run_{i}.png") 58 | 59 | if not os.path.exists(result_path): 60 | os.makedirs(result_path) 61 | 62 | solution = algorithm.solve(**kwargs) 63 | 64 | if problem.check_valid_solution(solution, verbose=True): 65 | tour_length = solution.get_tour_length() 66 | with open(result_file, 'w') as f: 67 | f.write(f"{tour_length}\n") 68 | 69 | results.append(tour_length) 70 | algorithm.free() 71 | problem.plot(solution, figure_file) 72 | print(solution) 73 | else: 74 | logger.error('Invalid solution') 75 | results.append(np.inf) 76 | 77 | with open(result_file, 'w') as f: 78 | f.write(f"{np.inf}\n") 79 | 80 | -------------------------------------------------------------------------------- /benchmarks/evrp-2019/E-n101-k8.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of E-n101-k8 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 899.885589 5 | VEHICLES: 8 6 | DIMENSION: 110 7 | STATIONS: 9 8 | CAPACITY: 200 9 | ENERGY_CAPACITY: 103 10 | ENERGY_CONSUMPTION: 1.20 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 35 35 14 | 2 41 49 15 | 3 35 17 16 | 4 55 45 17 | 5 55 20 18 | 6 15 30 19 | 7 25 30 20 | 8 20 50 21 | 9 10 43 22 | 10 55 60 23 | 11 30 60 24 | 12 20 65 25 | 13 50 35 26 | 14 30 25 27 | 15 15 10 28 | 16 30 5 29 | 17 10 20 30 | 18 5 30 31 | 19 20 40 32 | 20 15 60 33 | 21 45 65 34 | 22 45 20 35 | 23 45 10 36 | 24 55 5 37 | 25 65 35 38 | 26 65 20 39 | 27 45 30 40 | 28 35 40 41 | 29 41 37 42 | 30 64 42 43 | 31 40 60 44 | 32 31 52 45 | 33 35 69 46 | 34 53 52 47 | 35 65 55 48 | 36 63 65 49 | 37 2 60 50 | 38 20 20 51 | 39 5 5 52 | 40 60 12 53 | 41 40 25 54 | 42 42 7 55 | 43 24 12 56 | 44 23 3 57 | 45 11 14 58 | 46 6 38 59 | 47 2 48 60 | 48 8 56 61 | 49 13 52 62 | 50 6 68 63 | 51 47 47 64 | 52 49 58 65 | 53 27 43 66 | 54 37 31 67 | 55 57 29 68 | 56 63 23 69 | 57 53 12 70 | 58 32 12 71 | 59 36 26 72 | 60 21 24 73 | 61 17 34 74 | 62 12 24 75 | 63 24 58 76 | 64 27 69 77 | 65 15 77 78 | 66 62 77 79 | 67 49 73 80 | 68 67 5 81 | 69 56 39 82 | 70 37 47 83 | 71 37 56 84 | 72 57 68 85 | 73 47 16 86 | 74 44 17 87 | 75 46 13 88 | 76 49 11 89 | 77 49 42 90 | 78 53 43 91 | 79 61 52 92 | 80 57 48 93 | 81 56 37 94 | 82 55 54 95 | 83 15 47 96 | 84 14 37 97 | 85 11 31 98 | 86 16 22 99 | 87 4 18 100 | 88 28 18 101 | 89 26 52 102 | 90 26 35 103 | 91 31 67 104 | 92 15 19 105 | 93 22 22 106 | 94 18 24 107 | 95 26 27 108 | 96 25 24 109 | 97 22 27 110 | 98 25 21 111 | 99 19 21 112 | 100 20 26 113 | 101 18 18 114 | 102 13 16 115 | 103 13 40 116 | 104 13 65 117 | 105 35 16 118 | 106 35 40 119 | 107 35 65 120 | 108 57 16 121 | 109 57 40 122 | 110 57 65 123 | DEMAND_SECTION 124 | 1 0 125 | 2 10 126 | 3 7 127 | 4 13 128 | 5 19 129 | 6 26 130 | 7 3 131 | 8 5 132 | 9 9 133 | 10 16 134 | 11 16 135 | 12 12 136 | 13 19 137 | 14 23 138 | 15 20 139 | 16 8 140 | 17 19 141 | 18 2 142 | 19 12 143 | 20 17 144 | 21 9 145 | 22 11 146 | 23 18 147 | 24 29 148 | 25 3 149 | 26 6 150 | 27 17 151 | 28 16 152 | 29 16 153 | 30 9 154 | 31 21 155 | 32 27 156 | 33 23 157 | 34 11 158 | 35 14 159 | 36 8 160 | 37 5 161 | 38 8 162 | 39 16 163 | 40 31 164 | 41 9 165 | 42 5 166 | 43 5 167 | 44 7 168 | 45 18 169 | 46 16 170 | 47 1 171 | 48 27 172 | 49 36 173 | 50 30 174 | 51 13 175 | 52 10 176 | 53 9 177 | 54 14 178 | 55 18 179 | 56 2 180 | 57 6 181 | 58 7 182 | 59 18 183 | 60 28 184 | 61 3 185 | 62 13 186 | 63 19 187 | 64 10 188 | 65 9 189 | 66 20 190 | 67 25 191 | 68 25 192 | 69 36 193 | 70 6 194 | 71 5 195 | 72 15 196 | 73 25 197 | 74 9 198 | 75 8 199 | 76 18 200 | 77 13 201 | 78 14 202 | 79 3 203 | 80 23 204 | 81 6 205 | 82 26 206 | 83 16 207 | 84 11 208 | 85 7 209 | 86 41 210 | 87 35 211 | 88 26 212 | 89 9 213 | 90 15 214 | 91 3 215 | 92 1 216 | 93 2 217 | 94 22 218 | 95 27 219 | 96 20 220 | 97 11 221 | 98 12 222 | 99 10 223 | 100 9 224 | 101 17 225 | STATIONS_COORD_SECTION 226 | 102 227 | 103 228 | 104 229 | 105 230 | 106 231 | 107 232 | 108 233 | 109 234 | 110 235 | DEPOT_SECTION 236 | 1 237 | -1 238 | EOF -------------------------------------------------------------------------------- /benchmarks/evrp-2022/M-n110-k10-s9.evrp: -------------------------------------------------------------------------------- 1 | NAME: M-n110-k10-s9.evrp 2 | COMMENT: Modificatification of M-n101-k10 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 10 6 | DIMENSION: 110 7 | STATIONS: 9 8 | CAPACITY: 200 9 | ENERGY_CAPACITY: 118 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 40 50 14 | 2 45 68 15 | 3 45 70 16 | 4 42 66 17 | 5 42 68 18 | 6 42 65 19 | 7 40 69 20 | 8 40 66 21 | 9 38 68 22 | 10 38 70 23 | 11 35 66 24 | 12 35 69 25 | 13 25 85 26 | 14 22 75 27 | 15 22 85 28 | 16 20 80 29 | 17 20 85 30 | 18 18 75 31 | 19 15 75 32 | 20 15 80 33 | 21 30 50 34 | 22 30 52 35 | 23 28 52 36 | 24 28 55 37 | 25 25 50 38 | 26 25 52 39 | 27 25 55 40 | 28 23 52 41 | 29 23 55 42 | 30 20 50 43 | 31 20 55 44 | 32 10 35 45 | 33 10 40 46 | 34 8 40 47 | 35 8 45 48 | 36 5 35 49 | 37 5 45 50 | 38 2 40 51 | 39 0 40 52 | 40 0 45 53 | 41 35 30 54 | 42 35 32 55 | 43 33 32 56 | 44 33 35 57 | 45 32 30 58 | 46 30 30 59 | 47 30 32 60 | 48 30 35 61 | 49 28 30 62 | 50 28 35 63 | 51 26 32 64 | 52 25 30 65 | 53 25 35 66 | 54 44 5 67 | 55 42 10 68 | 56 42 15 69 | 57 40 5 70 | 58 40 15 71 | 59 38 5 72 | 60 38 15 73 | 61 35 5 74 | 62 50 30 75 | 63 50 35 76 | 64 50 40 77 | 65 48 30 78 | 66 48 40 79 | 67 47 35 80 | 68 47 40 81 | 69 45 30 82 | 70 45 35 83 | 71 95 30 84 | 72 95 35 85 | 73 53 30 86 | 74 92 30 87 | 75 53 35 88 | 76 45 65 89 | 77 90 35 90 | 78 88 30 91 | 79 88 35 92 | 80 87 30 93 | 81 85 25 94 | 82 85 35 95 | 83 75 55 96 | 84 72 55 97 | 85 70 58 98 | 86 68 60 99 | 87 66 55 100 | 88 65 55 101 | 89 65 60 102 | 90 63 58 103 | 91 60 55 104 | 92 60 60 105 | 93 67 85 106 | 94 65 85 107 | 95 65 82 108 | 96 62 80 109 | 97 60 80 110 | 98 60 85 111 | 99 58 75 112 | 100 55 80 113 | 101 55 85 114 | 102 12 47 115 | 103 27 43 116 | 104 28 75 117 | 105 34 60 118 | 106 39 18 119 | 107 43 28 120 | 108 58 75 121 | 109 66 65 122 | 110 91 23 123 | DEMAND_SECTION 124 | 1 0 125 | 2 10 126 | 3 30 127 | 4 10 128 | 5 10 129 | 6 10 130 | 7 20 131 | 8 20 132 | 9 20 133 | 10 10 134 | 11 10 135 | 12 10 136 | 13 20 137 | 14 30 138 | 15 10 139 | 16 40 140 | 17 40 141 | 18 20 142 | 19 20 143 | 20 10 144 | 21 10 145 | 22 20 146 | 23 20 147 | 24 10 148 | 25 10 149 | 26 40 150 | 27 10 151 | 28 10 152 | 29 20 153 | 30 10 154 | 31 10 155 | 32 20 156 | 33 30 157 | 34 40 158 | 35 20 159 | 36 10 160 | 37 10 161 | 38 20 162 | 39 30 163 | 40 20 164 | 41 10 165 | 42 10 166 | 43 20 167 | 44 10 168 | 45 10 169 | 46 10 170 | 47 30 171 | 48 10 172 | 49 10 173 | 50 10 174 | 51 10 175 | 52 10 176 | 53 10 177 | 54 20 178 | 55 40 179 | 56 10 180 | 57 30 181 | 58 40 182 | 59 30 183 | 60 10 184 | 61 20 185 | 62 10 186 | 63 20 187 | 64 50 188 | 65 10 189 | 66 10 190 | 67 10 191 | 68 10 192 | 69 10 193 | 70 10 194 | 71 30 195 | 72 20 196 | 73 10 197 | 74 10 198 | 75 50 199 | 76 20 200 | 77 10 201 | 78 10 202 | 79 20 203 | 80 10 204 | 81 10 205 | 82 30 206 | 83 20 207 | 84 10 208 | 85 20 209 | 86 30 210 | 87 10 211 | 88 20 212 | 89 30 213 | 90 10 214 | 91 10 215 | 92 10 216 | 93 20 217 | 94 40 218 | 95 10 219 | 96 30 220 | 97 10 221 | 98 30 222 | 99 20 223 | 100 10 224 | 101 20 225 | STATIONS_COORD_SECTION 226 | 102 227 | 103 228 | 104 229 | 105 230 | 106 231 | 107 232 | 108 233 | 109 234 | 110 235 | DEPOT_SECTION 236 | 1 237 | -1 238 | EOF 239 | -------------------------------------------------------------------------------- /benchmarks/evrp-2022/E-n112-k8-s11.evrp: -------------------------------------------------------------------------------- 1 | NAME: E-n112-k8-s11.evrp 2 | COMMENT: Modificatification of E-n101-k8 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 8 6 | DIMENSION: 112 7 | STATIONS: 11 8 | CAPACITY: 200 9 | ENERGY_CAPACITY: 100 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 35 35 14 | 2 41 49 15 | 3 35 17 16 | 4 55 45 17 | 5 55 20 18 | 6 15 30 19 | 7 25 30 20 | 8 20 50 21 | 9 10 43 22 | 10 55 60 23 | 11 30 60 24 | 12 20 65 25 | 13 50 35 26 | 14 30 25 27 | 15 15 10 28 | 16 30 5 29 | 17 10 20 30 | 18 5 30 31 | 19 20 40 32 | 20 15 60 33 | 21 45 65 34 | 22 45 20 35 | 23 45 10 36 | 24 55 5 37 | 25 65 35 38 | 26 65 20 39 | 27 45 30 40 | 28 35 40 41 | 29 41 37 42 | 30 64 42 43 | 31 40 60 44 | 32 31 52 45 | 33 35 69 46 | 34 53 52 47 | 35 65 55 48 | 36 63 65 49 | 37 2 60 50 | 38 20 20 51 | 39 5 5 52 | 40 60 12 53 | 41 40 25 54 | 42 42 7 55 | 43 24 12 56 | 44 23 3 57 | 45 11 14 58 | 46 6 38 59 | 47 2 48 60 | 48 8 56 61 | 49 13 52 62 | 50 6 68 63 | 51 47 47 64 | 52 49 58 65 | 53 27 43 66 | 54 37 31 67 | 55 57 29 68 | 56 63 23 69 | 57 53 12 70 | 58 32 12 71 | 59 36 26 72 | 60 21 24 73 | 61 17 34 74 | 62 12 24 75 | 63 24 58 76 | 64 27 69 77 | 65 15 77 78 | 66 62 77 79 | 67 49 73 80 | 68 67 5 81 | 69 56 39 82 | 70 37 47 83 | 71 37 56 84 | 72 57 68 85 | 73 47 16 86 | 74 44 17 87 | 75 46 13 88 | 76 49 11 89 | 77 49 42 90 | 78 53 43 91 | 79 61 52 92 | 80 57 48 93 | 81 56 37 94 | 82 55 54 95 | 83 15 47 96 | 84 14 37 97 | 85 11 31 98 | 86 16 22 99 | 87 4 18 100 | 88 28 18 101 | 89 26 52 102 | 90 26 35 103 | 91 31 67 104 | 92 15 19 105 | 93 22 22 106 | 94 18 24 107 | 95 26 27 108 | 96 25 24 109 | 97 22 27 110 | 98 25 21 111 | 99 19 21 112 | 100 20 26 113 | 101 18 18 114 | 102 9 51 115 | 103 10 27 116 | 104 15 11 117 | 105 18 68 118 | 106 28 32 119 | 107 36 15 120 | 108 36 58 121 | 109 47 35 122 | 110 55 68 123 | 111 60 13 124 | 112 60 45 125 | DEMAND_SECTION 126 | 1 0 127 | 2 10 128 | 3 7 129 | 4 13 130 | 5 19 131 | 6 26 132 | 7 3 133 | 8 5 134 | 9 9 135 | 10 16 136 | 11 16 137 | 12 12 138 | 13 19 139 | 14 23 140 | 15 20 141 | 16 8 142 | 17 19 143 | 18 2 144 | 19 12 145 | 20 17 146 | 21 9 147 | 22 11 148 | 23 18 149 | 24 29 150 | 25 3 151 | 26 6 152 | 27 17 153 | 28 16 154 | 29 16 155 | 30 9 156 | 31 21 157 | 32 27 158 | 33 23 159 | 34 11 160 | 35 14 161 | 36 8 162 | 37 5 163 | 38 8 164 | 39 16 165 | 40 31 166 | 41 9 167 | 42 5 168 | 43 5 169 | 44 7 170 | 45 18 171 | 46 16 172 | 47 1 173 | 48 27 174 | 49 36 175 | 50 30 176 | 51 13 177 | 52 10 178 | 53 9 179 | 54 14 180 | 55 18 181 | 56 2 182 | 57 6 183 | 58 7 184 | 59 18 185 | 60 28 186 | 61 3 187 | 62 13 188 | 63 19 189 | 64 10 190 | 65 9 191 | 66 20 192 | 67 25 193 | 68 25 194 | 69 36 195 | 70 6 196 | 71 5 197 | 72 15 198 | 73 25 199 | 74 9 200 | 75 8 201 | 76 18 202 | 77 13 203 | 78 14 204 | 79 3 205 | 80 23 206 | 81 6 207 | 82 26 208 | 83 16 209 | 84 11 210 | 85 7 211 | 86 41 212 | 87 35 213 | 88 26 214 | 89 9 215 | 90 15 216 | 91 3 217 | 92 1 218 | 93 2 219 | 94 22 220 | 95 27 221 | 96 20 222 | 97 11 223 | 98 12 224 | 99 10 225 | 100 9 226 | 101 17 227 | STATIONS_COORD_SECTION 228 | 102 229 | 103 230 | 104 231 | 105 232 | 106 233 | 107 234 | 108 235 | 109 236 | 110 237 | 111 238 | 112 239 | DEPOT_SECTION 240 | 1 241 | -1 242 | EOF 243 | -------------------------------------------------------------------------------- /benchmarks/evrp-2022/M-n126-k7-s5.evrp: -------------------------------------------------------------------------------- 1 | NAME: M-n126-k7-s5.evrp 2 | COMMENT: Modificatification of M-n121-k7 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 7 6 | DIMENSION: 126 7 | STATIONS: 5 8 | CAPACITY: 200 9 | ENERGY_CAPACITY: 199 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 10 45 14 | 2 25 1 15 | 3 25 3 16 | 4 31 5 17 | 5 32 5 18 | 6 31 7 19 | 7 32 9 20 | 8 34 9 21 | 9 46 9 22 | 10 35 7 23 | 11 34 6 24 | 12 35 5 25 | 13 47 6 26 | 14 40 5 27 | 15 39 3 28 | 16 36 3 29 | 17 73 6 30 | 18 73 8 31 | 19 24 36 32 | 20 76 6 33 | 21 76 10 34 | 22 76 13 35 | 23 78 3 36 | 24 78 9 37 | 25 79 3 38 | 26 79 5 39 | 27 79 11 40 | 28 82 3 41 | 29 82 7 42 | 30 90 15 43 | 31 84 3 44 | 32 84 5 45 | 33 84 9 46 | 34 85 1 47 | 35 87 5 48 | 36 85 8 49 | 37 87 7 50 | 38 86 41 51 | 39 86 44 52 | 40 86 46 53 | 41 85 55 54 | 42 89 43 55 | 43 89 46 56 | 44 89 52 57 | 45 92 42 58 | 46 92 52 59 | 47 94 42 60 | 48 94 44 61 | 49 94 48 62 | 50 96 42 63 | 51 99 46 64 | 52 99 50 65 | 53 83 80 66 | 54 83 83 67 | 55 85 81 68 | 56 85 85 69 | 57 85 89 70 | 58 87 80 71 | 59 87 86 72 | 60 90 77 73 | 61 90 88 74 | 62 93 82 75 | 63 93 84 76 | 64 93 89 77 | 65 94 86 78 | 66 95 80 79 | 67 99 89 80 | 68 37 83 81 | 69 50 80 82 | 70 35 85 83 | 71 35 87 84 | 72 44 86 85 | 73 46 89 86 | 74 46 83 87 | 75 46 87 88 | 76 46 89 89 | 77 48 83 90 | 78 50 85 91 | 79 50 88 92 | 80 54 86 93 | 81 54 90 94 | 82 10 35 95 | 83 10 40 96 | 84 18 30 97 | 85 17 35 98 | 86 16 38 99 | 87 14 40 100 | 88 15 42 101 | 89 11 42 102 | 90 18 40 103 | 91 21 39 104 | 92 20 40 105 | 93 18 41 106 | 94 20 44 107 | 95 22 44 108 | 96 16 45 109 | 97 20 45 110 | 98 25 45 111 | 99 30 55 112 | 100 20 50 113 | 101 22 51 114 | 102 18 49 115 | 103 16 48 116 | 104 20 55 117 | 105 18 53 118 | 106 14 50 119 | 107 15 51 120 | 108 16 54 121 | 109 28 33 122 | 110 33 38 123 | 111 30 50 124 | 112 13 40 125 | 113 15 36 126 | 114 18 31 127 | 115 25 37 128 | 116 30 46 129 | 117 25 52 130 | 118 16 33 131 | 119 25 35 132 | 120 5 40 133 | 121 5 50 134 | 122 14 42 135 | 123 31 23 136 | 124 43 69 137 | 125 86 23 138 | 126 90 67 139 | DEMAND_SECTION 140 | 1 0 141 | 2 25 142 | 3 7 143 | 4 13 144 | 5 6 145 | 6 14 146 | 7 5 147 | 8 11 148 | 9 19 149 | 10 5 150 | 11 15 151 | 12 15 152 | 13 17 153 | 14 13 154 | 15 12 155 | 16 18 156 | 17 13 157 | 18 18 158 | 19 12 159 | 20 17 160 | 21 4 161 | 22 7 162 | 23 12 163 | 24 13 164 | 25 8 165 | 26 16 166 | 27 15 167 | 28 6 168 | 29 5 169 | 30 9 170 | 31 11 171 | 32 10 172 | 33 3 173 | 34 7 174 | 35 2 175 | 36 4 176 | 37 4 177 | 38 18 178 | 39 14 179 | 40 12 180 | 41 17 181 | 42 20 182 | 43 14 183 | 44 16 184 | 45 10 185 | 46 9 186 | 47 11 187 | 48 7 188 | 49 13 189 | 50 5 190 | 51 4 191 | 52 21 192 | 53 13 193 | 54 11 194 | 55 12 195 | 56 14 196 | 57 10 197 | 58 8 198 | 59 16 199 | 60 19 200 | 61 5 201 | 62 17 202 | 63 7 203 | 64 16 204 | 65 14 205 | 66 17 206 | 67 13 207 | 68 17 208 | 69 13 209 | 70 14 210 | 71 16 211 | 72 7 212 | 73 13 213 | 74 9 214 | 75 11 215 | 76 35 216 | 77 5 217 | 78 28 218 | 79 7 219 | 80 3 220 | 81 10 221 | 82 7 222 | 83 12 223 | 84 11 224 | 85 10 225 | 86 8 226 | 87 11 227 | 88 21 228 | 89 4 229 | 90 15 230 | 91 16 231 | 92 4 232 | 93 16 233 | 94 7 234 | 95 10 235 | 96 9 236 | 97 11 237 | 98 17 238 | 99 12 239 | 100 11 240 | 101 7 241 | 102 9 242 | 103 11 243 | 104 12 244 | 105 7 245 | 106 8 246 | 107 6 247 | 108 5 248 | 109 12 249 | 110 13 250 | 111 7 251 | 112 7 252 | 113 8 253 | 114 11 254 | 115 13 255 | 116 11 256 | 117 10 257 | 118 7 258 | 119 4 259 | 120 20 260 | 121 13 261 | STATIONS_COORD_SECTION 262 | 122 263 | 123 264 | 124 265 | 125 266 | 126 267 | DEPOT_SECTION 268 | 1 269 | -1 270 | EOF 271 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Metadata files 10 | .vscode/ 11 | results/ 12 | # Distribution / packaging 13 | .Python 14 | build/ 15 | develop-eggs/ 16 | dist/ 17 | downloads/ 18 | eggs/ 19 | .eggs/ 20 | lib/ 21 | lib64/ 22 | parts/ 23 | sdist/ 24 | var/ 25 | wheels/ 26 | share/python-wheels/ 27 | *.egg-info/ 28 | .installed.cfg 29 | *.egg 30 | MANIFEST 31 | 32 | # PyInstaller 33 | # Usually these files are written by a python script from a template 34 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 35 | *.manifest 36 | *.spec 37 | 38 | # Installer logs 39 | pip-log.txt 40 | pip-delete-this-directory.txt 41 | 42 | # Unit test / coverage reports 43 | htmlcov/ 44 | .tox/ 45 | .nox/ 46 | .coverage 47 | .coverage.* 48 | .cache 49 | nosetests.xml 50 | coverage.xml 51 | *.cover 52 | *.py,cover 53 | .hypothesis/ 54 | .pytest_cache/ 55 | cover/ 56 | 57 | # Translations 58 | *.mo 59 | *.pot 60 | 61 | # Django stuff: 62 | *.log 63 | local_settings.py 64 | db.sqlite3 65 | db.sqlite3-journal 66 | 67 | # Flask stuff: 68 | instance/ 69 | .webassets-cache 70 | 71 | # Scrapy stuff: 72 | .scrapy 73 | 74 | # Sphinx documentation 75 | docs/_build/ 76 | 77 | # PyBuilder 78 | .pybuilder/ 79 | target/ 80 | 81 | # Jupyter Notebook 82 | .ipynb_checkpoints 83 | 84 | # IPython 85 | profile_default/ 86 | ipython_config.py 87 | 88 | # pyenv 89 | # For a library or package, you might want to ignore these files since the code is 90 | # intended to run in multiple environments; otherwise, check them in: 91 | # .python-version 92 | 93 | # pipenv 94 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 95 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 96 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 97 | # install all needed dependencies. 98 | #Pipfile.lock 99 | 100 | # poetry 101 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 102 | # This is especially recommended for binary packages to ensure reproducibility, and is more 103 | # commonly ignored for libraries. 104 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 105 | #poetry.lock 106 | 107 | # pdm 108 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 109 | #pdm.lock 110 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 111 | # in version control. 112 | # https://pdm.fming.dev/#use-with-ide 113 | .pdm.toml 114 | 115 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 116 | __pypackages__/ 117 | 118 | # Celery stuff 119 | celerybeat-schedule 120 | celerybeat.pid 121 | 122 | # SageMath parsed files 123 | *.sage.py 124 | 125 | # Environments 126 | .env 127 | .venv 128 | env/ 129 | venv/ 130 | ENV/ 131 | env.bak/ 132 | venv.bak/ 133 | 134 | # Spyder project settings 135 | .spyderproject 136 | .spyproject 137 | 138 | # Rope project settings 139 | .ropeproject 140 | 141 | # mkdocs documentation 142 | /site 143 | 144 | # mypy 145 | .mypy_cache/ 146 | .dmypy.json 147 | dmypy.json 148 | 149 | # Pyre type checker 150 | .pyre/ 151 | 152 | # pytype static type analyzer 153 | .pytype/ 154 | 155 | # Cython debug symbols 156 | cython_debug/ 157 | 158 | # PyCharm 159 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 160 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 161 | # and can be added to the global gitignore or merged into this file. For a more nuclear 162 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 163 | #.idea/ 164 | -------------------------------------------------------------------------------- /objects/solution.py: -------------------------------------------------------------------------------- 1 | from copy import deepcopy 2 | from hashlib import md5 3 | import numpy as np 4 | from src.utils import logger 5 | 6 | class Solution(): 7 | def __init__(self, tours=None): 8 | """ 9 | The solution contains a list of tours. Each vehicle start and end at the depot 10 | See full description in the documentation https://mavrovouniotis.github.io/EVRPcompetition2020/TR-EVRP-Competition.pdf 11 | Example a solution with two vehicles: 0 -> 1 -> 2 -> 3 -> 0 -> 4 -> 0 -> 5 -> 6 -> 0 12 | tours includes [1, 2, 3, 4] and [5, 6] 13 | In this problem, the depot can be visited multiple times for each vehicle. (First vehicle tour: 0 -> 1 -> 2 -> 3 -> 4) 14 | The depot considered as the charging station. 15 | """ 16 | self.tour_index = {} 17 | self.tour_length = np.inf 18 | if tours: 19 | self.tours = tours 20 | self.set_tour_index() 21 | else: 22 | self.tours = [] 23 | 24 | def add_tour(self, tour): 25 | self.tours.append(tour) 26 | 27 | def get_num_tours(self): 28 | return len(self.tours) 29 | 30 | def set_tour_index(self): 31 | self.tour_index = {} 32 | for idx, tour in enumerate(self.tours): 33 | for node in tour: 34 | if node.is_customer(): 35 | if node.id not in self.tour_index: 36 | self.tour_index[node.id] = idx 37 | else: 38 | logger.warning('Node {} already in tour {}'.format(node.id, idx)) 39 | return 0 40 | return 1 41 | 42 | def get_tour_index_by_node(self, node_id): 43 | return self.tour_index[node_id] 44 | 45 | def get_presentation(self): 46 | list_node = [[x.get_id() for x in tour] for tour in self.tours] 47 | return md5(str(list_node).encode()).hexdigest() 48 | 49 | def __ge__(self, other): 50 | return self.tour_length >= other.tour_length 51 | 52 | def __gt__(self, other): 53 | return self.tour_length > other.tour_length 54 | 55 | def __le__(self, other): 56 | return self.tour_length <= other.tour_length 57 | 58 | def __lt__(self, other): 59 | return self.tour_length < other.tour_length 60 | 61 | def __repr__(self) -> str: 62 | if self.tour_length: 63 | presentation = "Tour length: {}\n".format(self.tour_length) 64 | else: 65 | presentation = "" 66 | for i, tour in enumerate(self.tours): 67 | presentation += 'Tour {}: '.format(i) + ' -> '.join([str(node.id) for node in tour]) + '\n' 68 | 69 | return presentation 70 | 71 | def get_tours(self): 72 | return deepcopy(self.tours) 73 | 74 | def get_basic_tours(self): 75 | tours = [] 76 | for tour in self.tours: 77 | _tour = [node for node in tour if node.is_customer()] 78 | tours.append(_tour) 79 | return tours 80 | 81 | def get_tour_length(self): 82 | return self.tour_length 83 | 84 | def set_tour_length(self, tour_length): 85 | self.tour_length = tour_length 86 | 87 | def to_array(self): 88 | return np.array([node.id for node in self.tours]) 89 | 90 | def get_vehicle_tours(self, skip_depot=False, full=True): 91 | 92 | if full: 93 | tours = self.complete_tours 94 | else: 95 | tours = self.tours 96 | """ Vehicle did not start or end depot """ 97 | if len(tours) == 0: 98 | tours = deepcopy(self.tours) 99 | if not tours[0].is_depot() or not tours[-1].is_depot(): 100 | return None 101 | 102 | vehicle_tours = [] 103 | 104 | if not skip_depot: 105 | tour = [tours[0]] 106 | else: 107 | tour = [] 108 | 109 | for idx, node in enumerate(tours): 110 | if idx == 0 and not skip_depot: 111 | continue 112 | if node.is_depot(): 113 | if skip_depot: 114 | vehicle_tours.append(tour) 115 | continue 116 | else: 117 | tour.append(tours[0]) 118 | vehicle_tours.append(tour) 119 | tour = [tours[0]] 120 | else: 121 | tour.append(node) 122 | return vehicle_tours 123 | 124 | def set_vehicle_tours(self, tours): 125 | self.tours = tours 126 | self.set_tour_index() 127 | -------------------------------------------------------------------------------- /benchmarks/evrp-2022/M-n163-k12-s12.evrp: -------------------------------------------------------------------------------- 1 | NAME: M-n163-k12-s12.evrp 2 | COMMENT: Modificatification of M-n151-k12 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 12 6 | DIMENSION: 163 7 | STATIONS: 12 8 | CAPACITY: 200 9 | ENERGY_CAPACITY: 100 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 35 35 14 | 2 41 49 15 | 3 35 17 16 | 4 55 45 17 | 5 55 20 18 | 6 15 30 19 | 7 25 30 20 | 8 20 50 21 | 9 10 43 22 | 10 55 60 23 | 11 30 60 24 | 12 20 65 25 | 13 50 35 26 | 14 30 25 27 | 15 15 10 28 | 16 30 5 29 | 17 10 20 30 | 18 5 30 31 | 19 20 40 32 | 20 15 60 33 | 21 45 65 34 | 22 45 20 35 | 23 45 10 36 | 24 55 5 37 | 25 65 35 38 | 26 65 20 39 | 27 45 30 40 | 28 35 40 41 | 29 41 37 42 | 30 64 42 43 | 31 40 60 44 | 32 31 52 45 | 33 35 69 46 | 34 53 52 47 | 35 65 55 48 | 36 63 65 49 | 37 2 60 50 | 38 20 20 51 | 39 5 5 52 | 40 60 12 53 | 41 40 25 54 | 42 42 7 55 | 43 24 12 56 | 44 23 3 57 | 45 11 14 58 | 46 6 38 59 | 47 2 48 60 | 48 8 56 61 | 49 13 52 62 | 50 6 68 63 | 51 47 47 64 | 52 49 58 65 | 53 27 43 66 | 54 37 31 67 | 55 57 29 68 | 56 63 23 69 | 57 53 12 70 | 58 32 12 71 | 59 36 26 72 | 60 21 24 73 | 61 17 34 74 | 62 12 24 75 | 63 24 58 76 | 64 27 69 77 | 65 15 77 78 | 66 62 77 79 | 67 49 73 80 | 68 67 5 81 | 69 56 39 82 | 70 37 47 83 | 71 37 56 84 | 72 57 68 85 | 73 47 16 86 | 74 44 17 87 | 75 46 13 88 | 76 49 11 89 | 77 49 42 90 | 78 53 43 91 | 79 61 52 92 | 80 57 48 93 | 81 56 37 94 | 82 55 54 95 | 83 15 47 96 | 84 14 37 97 | 85 11 31 98 | 86 16 22 99 | 87 4 18 100 | 88 28 18 101 | 89 26 52 102 | 90 26 35 103 | 91 31 67 104 | 92 15 19 105 | 93 22 22 106 | 94 18 24 107 | 95 26 27 108 | 96 25 24 109 | 97 22 27 110 | 98 25 21 111 | 99 19 21 112 | 100 20 26 113 | 101 18 18 114 | 102 37 52 115 | 103 49 49 116 | 104 52 64 117 | 105 20 26 118 | 106 40 30 119 | 107 21 47 120 | 108 17 63 121 | 109 31 62 122 | 110 52 33 123 | 111 51 21 124 | 112 42 41 125 | 113 31 32 126 | 114 5 25 127 | 115 12 42 128 | 116 36 16 129 | 117 52 41 130 | 118 27 23 131 | 119 17 33 132 | 120 13 13 133 | 121 57 58 134 | 122 62 42 135 | 123 42 57 136 | 124 16 57 137 | 125 8 52 138 | 126 7 38 139 | 127 27 68 140 | 128 30 48 141 | 129 43 67 142 | 130 58 48 143 | 131 58 27 144 | 132 37 69 145 | 133 38 46 146 | 134 46 10 147 | 135 61 33 148 | 136 62 63 149 | 137 63 69 150 | 138 32 22 151 | 139 45 35 152 | 140 59 15 153 | 141 5 6 154 | 142 10 17 155 | 143 21 10 156 | 144 5 64 157 | 145 30 15 158 | 146 39 10 159 | 147 32 39 160 | 148 25 32 161 | 149 25 55 162 | 150 48 28 163 | 151 56 37 164 | 152 9 57 165 | 153 11 15 166 | 154 16 33 167 | 155 26 14 168 | 156 26 73 169 | 157 31 53 170 | 158 36 15 171 | 159 41 37 172 | 160 54 38 173 | 161 54 69 174 | 162 56 49 175 | 163 60 14 176 | DEMAND_SECTION 177 | 1 0 178 | 2 10 179 | 3 7 180 | 4 13 181 | 5 19 182 | 6 26 183 | 7 3 184 | 8 5 185 | 9 9 186 | 10 16 187 | 11 16 188 | 12 12 189 | 13 19 190 | 14 23 191 | 15 20 192 | 16 8 193 | 17 19 194 | 18 2 195 | 19 12 196 | 20 17 197 | 21 9 198 | 22 11 199 | 23 18 200 | 24 29 201 | 25 3 202 | 26 6 203 | 27 17 204 | 28 16 205 | 29 16 206 | 30 9 207 | 31 21 208 | 32 27 209 | 33 23 210 | 34 11 211 | 35 14 212 | 36 8 213 | 37 5 214 | 38 8 215 | 39 16 216 | 40 31 217 | 41 9 218 | 42 5 219 | 43 5 220 | 44 7 221 | 45 18 222 | 46 16 223 | 47 1 224 | 48 27 225 | 49 36 226 | 50 30 227 | 51 13 228 | 52 10 229 | 53 9 230 | 54 14 231 | 55 18 232 | 56 2 233 | 57 6 234 | 58 7 235 | 59 18 236 | 60 28 237 | 61 3 238 | 62 13 239 | 63 19 240 | 64 10 241 | 65 9 242 | 66 20 243 | 67 25 244 | 68 25 245 | 69 36 246 | 70 6 247 | 71 5 248 | 72 15 249 | 73 25 250 | 74 9 251 | 75 8 252 | 76 18 253 | 77 13 254 | 78 14 255 | 79 3 256 | 80 23 257 | 81 6 258 | 82 26 259 | 83 16 260 | 84 11 261 | 85 7 262 | 86 41 263 | 87 35 264 | 88 26 265 | 89 9 266 | 90 15 267 | 91 3 268 | 92 1 269 | 93 2 270 | 94 22 271 | 95 27 272 | 96 20 273 | 97 11 274 | 98 12 275 | 99 10 276 | 100 9 277 | 101 17 278 | 102 7 279 | 103 30 280 | 104 16 281 | 105 9 282 | 106 21 283 | 107 15 284 | 108 19 285 | 109 23 286 | 110 11 287 | 111 5 288 | 112 19 289 | 113 29 290 | 114 23 291 | 115 21 292 | 116 10 293 | 117 15 294 | 118 3 295 | 119 41 296 | 120 9 297 | 121 28 298 | 122 8 299 | 123 8 300 | 124 16 301 | 125 10 302 | 126 28 303 | 127 7 304 | 128 15 305 | 129 14 306 | 130 6 307 | 131 19 308 | 132 11 309 | 133 12 310 | 134 23 311 | 135 26 312 | 136 17 313 | 137 6 314 | 138 9 315 | 139 15 316 | 140 14 317 | 141 7 318 | 142 27 319 | 143 13 320 | 144 11 321 | 145 16 322 | 146 10 323 | 147 5 324 | 148 25 325 | 149 17 326 | 150 18 327 | 151 10 328 | STATIONS_COORD_SECTION 329 | 152 330 | 153 331 | 154 332 | 155 333 | 156 334 | 157 335 | 158 336 | 159 337 | 160 338 | 161 339 | 162 340 | 163 341 | DEPOT_SECTION 342 | 1 343 | -1 344 | EOF 345 | -------------------------------------------------------------------------------- /benchmarks/evrp-2022/X-n147-k7-s4.evrp: -------------------------------------------------------------------------------- 1 | NAME: X-n147-k7-s4.evrp 2 | COMMENT: Modificatification of X-n143-k7 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 7 6 | DIMENSION: 147 7 | STATIONS: 4 8 | CAPACITY: 1190 9 | ENERGY_CAPACITY: 2762 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 0 0 14 | 2 175 821 15 | 3 62 495 16 | 4 662 959 17 | 5 109 216 18 | 6 156 748 19 | 7 178 957 20 | 8 347 184 21 | 9 89 814 22 | 10 257 265 23 | 11 662 892 24 | 12 881 69 25 | 13 478 9 26 | 14 76 79 27 | 15 898 650 28 | 16 711 766 29 | 17 325 163 30 | 18 42 411 31 | 19 722 221 32 | 20 366 190 33 | 21 378 521 34 | 22 907 497 35 | 23 924 738 36 | 24 954 524 37 | 25 594 724 38 | 26 253 89 39 | 27 746 971 40 | 28 655 716 41 | 29 627 301 42 | 30 994 958 43 | 31 384 833 44 | 32 234 979 45 | 33 337 173 46 | 34 865 383 47 | 35 488 878 48 | 36 531 291 49 | 37 289 151 50 | 38 935 667 51 | 39 659 800 52 | 40 965 898 53 | 41 248 436 54 | 42 97 623 55 | 43 953 932 56 | 44 30 810 57 | 45 683 120 58 | 46 577 83 59 | 47 376 751 60 | 48 804 302 61 | 49 265 688 62 | 50 425 392 63 | 51 392 371 64 | 52 438 417 65 | 53 373 511 66 | 54 19 913 67 | 55 415 49 68 | 56 663 461 69 | 57 583 355 70 | 58 569 522 71 | 59 312 683 72 | 60 288 508 73 | 61 177 874 74 | 62 609 113 75 | 63 905 309 76 | 64 701 895 77 | 65 640 112 78 | 66 504 95 79 | 67 466 606 80 | 68 367 726 81 | 69 161 8 82 | 70 944 892 83 | 71 223 393 84 | 72 329 371 85 | 73 130 888 86 | 74 450 443 87 | 75 857 128 88 | 76 709 966 89 | 77 642 967 90 | 78 872 705 91 | 79 0 414 92 | 80 207 911 93 | 81 993 855 94 | 82 883 147 95 | 83 740 490 96 | 84 600 372 97 | 85 184 48 98 | 86 489 259 99 | 87 114 737 100 | 88 244 783 101 | 89 420 439 102 | 90 522 41 103 | 91 617 177 104 | 92 575 340 105 | 93 607 806 106 | 94 144 513 107 | 95 695 974 108 | 96 603 507 109 | 97 855 318 110 | 98 343 206 111 | 99 244 929 112 | 100 418 513 113 | 101 976 38 114 | 102 435 672 115 | 103 120 988 116 | 104 691 853 117 | 105 986 418 118 | 106 566 975 119 | 107 625 733 120 | 108 166 787 121 | 109 605 798 122 | 110 209 194 123 | 111 19 892 124 | 112 169 840 125 | 113 756 913 126 | 114 666 928 127 | 115 13 829 128 | 116 103 304 129 | 117 63 384 130 | 118 564 787 131 | 119 271 50 132 | 120 949 738 133 | 121 357 228 134 | 122 363 898 135 | 123 912 704 136 | 124 765 462 137 | 125 167 348 138 | 126 848 405 139 | 127 5 76 140 | 128 188 65 141 | 129 229 41 142 | 130 632 968 143 | 131 75 96 144 | 132 936 903 145 | 133 982 492 146 | 134 658 258 147 | 135 600 833 148 | 136 299 593 149 | 137 65 277 150 | 138 695 468 151 | 139 508 995 152 | 140 651 522 153 | 141 824 865 154 | 142 842 802 155 | 143 684 432 156 | 144 182 289 157 | 145 349 846 158 | 146 695 233 159 | 147 825 659 160 | DEMAND_SECTION 161 | 1 0 162 | 2 95 163 | 3 35 164 | 4 81 165 | 5 12 166 | 6 3 167 | 7 99 168 | 8 47 169 | 9 64 170 | 10 20 171 | 11 47 172 | 12 27 173 | 13 77 174 | 14 50 175 | 15 75 176 | 16 14 177 | 17 24 178 | 18 3 179 | 19 58 180 | 20 65 181 | 21 98 182 | 22 35 183 | 23 35 184 | 24 45 185 | 25 52 186 | 26 11 187 | 27 13 188 | 28 11 189 | 29 76 190 | 30 98 191 | 31 5 192 | 32 9 193 | 33 87 194 | 34 71 195 | 35 83 196 | 36 2 197 | 37 54 198 | 38 63 199 | 39 63 200 | 40 21 201 | 41 36 202 | 42 17 203 | 43 15 204 | 44 44 205 | 45 62 206 | 46 87 207 | 47 90 208 | 48 92 209 | 49 18 210 | 50 41 211 | 51 85 212 | 52 62 213 | 53 72 214 | 54 9 215 | 55 18 216 | 56 76 217 | 57 17 218 | 58 42 219 | 59 43 220 | 60 55 221 | 61 42 222 | 62 2 223 | 63 78 224 | 64 25 225 | 65 29 226 | 66 78 227 | 67 67 228 | 68 40 229 | 69 71 230 | 70 21 231 | 71 57 232 | 72 35 233 | 73 17 234 | 74 14 235 | 75 11 236 | 76 3 237 | 77 45 238 | 78 54 239 | 79 39 240 | 80 96 241 | 81 56 242 | 82 73 243 | 83 55 244 | 84 53 245 | 85 92 246 | 86 71 247 | 87 63 248 | 88 47 249 | 89 86 250 | 90 86 251 | 91 58 252 | 92 68 253 | 93 27 254 | 94 77 255 | 95 67 256 | 96 19 257 | 97 60 258 | 98 42 259 | 99 3 260 | 100 47 261 | 101 4 262 | 102 57 263 | 103 44 264 | 104 90 265 | 105 97 266 | 106 37 267 | 107 49 268 | 108 58 269 | 109 67 270 | 110 30 271 | 111 85 272 | 112 31 273 | 113 28 274 | 114 26 275 | 115 86 276 | 116 90 277 | 117 99 278 | 118 99 279 | 119 35 280 | 120 62 281 | 121 49 282 | 122 71 283 | 123 74 284 | 124 3 285 | 125 71 286 | 126 99 287 | 127 38 288 | 128 96 289 | 129 71 290 | 130 92 291 | 131 6 292 | 132 77 293 | 133 94 294 | 134 47 295 | 135 92 296 | 136 90 297 | 137 67 298 | 138 16 299 | 139 47 300 | 140 61 301 | 141 68 302 | 142 93 303 | 143 96 304 | STATIONS_COORD_SECTION 305 | 144 306 | 145 307 | 146 308 | 147 309 | DEPOT_SECTION 310 | 1 311 | -1 312 | EOF 313 | -------------------------------------------------------------------------------- /benchmarks/evrp-2019/X-n143-k7.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of X-n143-k7 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 0 5 | VEHICLES: 7 6 | DIMENSION: 147 7 | STATIONS: 4 8 | CAPACITY: 1190 9 | ENERGY_CAPACITY: 2243 10 | ENERGY_CONSUMPTION: 1.0 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 0 0 14 | 2 175 821 15 | 3 62 495 16 | 4 662 959 17 | 5 109 216 18 | 6 156 748 19 | 7 178 957 20 | 8 347 184 21 | 9 89 814 22 | 10 257 265 23 | 11 662 892 24 | 12 881 69 25 | 13 478 9 26 | 14 76 79 27 | 15 898 650 28 | 16 711 766 29 | 17 325 163 30 | 18 42 411 31 | 19 722 221 32 | 20 366 190 33 | 21 378 521 34 | 22 907 497 35 | 23 924 738 36 | 24 954 524 37 | 25 594 724 38 | 26 253 89 39 | 27 746 971 40 | 28 655 716 41 | 29 627 301 42 | 30 994 958 43 | 31 384 833 44 | 32 234 979 45 | 33 337 173 46 | 34 865 383 47 | 35 488 878 48 | 36 531 291 49 | 37 289 151 50 | 38 935 667 51 | 39 659 800 52 | 40 965 898 53 | 41 248 436 54 | 42 97 623 55 | 43 953 932 56 | 44 30 810 57 | 45 683 120 58 | 46 577 83 59 | 47 376 751 60 | 48 804 302 61 | 49 265 688 62 | 50 425 392 63 | 51 392 371 64 | 52 438 417 65 | 53 373 511 66 | 54 19 913 67 | 55 415 49 68 | 56 663 461 69 | 57 583 355 70 | 58 569 522 71 | 59 312 683 72 | 60 288 508 73 | 61 177 874 74 | 62 609 113 75 | 63 905 309 76 | 64 701 895 77 | 65 640 112 78 | 66 504 95 79 | 67 466 606 80 | 68 367 726 81 | 69 161 8 82 | 70 944 892 83 | 71 223 393 84 | 72 329 371 85 | 73 130 888 86 | 74 450 443 87 | 75 857 128 88 | 76 709 966 89 | 77 642 967 90 | 78 872 705 91 | 79 0 414 92 | 80 207 911 93 | 81 993 855 94 | 82 883 147 95 | 83 740 490 96 | 84 600 372 97 | 85 184 48 98 | 86 489 259 99 | 87 114 737 100 | 88 244 783 101 | 89 420 439 102 | 90 522 41 103 | 91 617 177 104 | 92 575 340 105 | 93 607 806 106 | 94 144 513 107 | 95 695 974 108 | 96 603 507 109 | 97 855 318 110 | 98 343 206 111 | 99 244 929 112 | 100 418 513 113 | 101 976 38 114 | 102 435 672 115 | 103 120 988 116 | 104 691 853 117 | 105 986 418 118 | 106 566 975 119 | 107 625 733 120 | 108 166 787 121 | 109 605 798 122 | 110 209 194 123 | 111 19 892 124 | 112 169 840 125 | 113 756 913 126 | 114 666 928 127 | 115 13 829 128 | 116 103 304 129 | 117 63 384 130 | 118 564 787 131 | 119 271 50 132 | 120 949 738 133 | 121 357 228 134 | 122 363 898 135 | 123 912 704 136 | 124 765 462 137 | 125 167 348 138 | 126 848 405 139 | 127 5 76 140 | 128 188 65 141 | 129 229 41 142 | 130 632 968 143 | 131 75 96 144 | 132 936 903 145 | 133 982 492 146 | 134 658 258 147 | 135 600 833 148 | 136 299 593 149 | 137 65 277 150 | 138 695 468 151 | 139 508 995 152 | 140 651 522 153 | 141 824 865 154 | 142 842 802 155 | 143 684 432 156 | 144 249 249 157 | 145 249 747 158 | 146 746 249 159 | 147 746 747 160 | DEMAND_SECTION 161 | 1 0 162 | 2 95 163 | 3 35 164 | 4 81 165 | 5 12 166 | 6 3 167 | 7 99 168 | 8 47 169 | 9 64 170 | 10 20 171 | 11 47 172 | 12 27 173 | 13 77 174 | 14 50 175 | 15 75 176 | 16 14 177 | 17 24 178 | 18 3 179 | 19 58 180 | 20 65 181 | 21 98 182 | 22 35 183 | 23 35 184 | 24 45 185 | 25 52 186 | 26 11 187 | 27 13 188 | 28 11 189 | 29 76 190 | 30 98 191 | 31 5 192 | 32 9 193 | 33 87 194 | 34 71 195 | 35 83 196 | 36 2 197 | 37 54 198 | 38 63 199 | 39 63 200 | 40 21 201 | 41 36 202 | 42 17 203 | 43 15 204 | 44 44 205 | 45 62 206 | 46 87 207 | 47 90 208 | 48 92 209 | 49 18 210 | 50 41 211 | 51 85 212 | 52 62 213 | 53 72 214 | 54 9 215 | 55 18 216 | 56 76 217 | 57 17 218 | 58 42 219 | 59 43 220 | 60 55 221 | 61 42 222 | 62 2 223 | 63 78 224 | 64 25 225 | 65 29 226 | 66 78 227 | 67 67 228 | 68 40 229 | 69 71 230 | 70 21 231 | 71 57 232 | 72 35 233 | 73 17 234 | 74 14 235 | 75 11 236 | 76 3 237 | 77 45 238 | 78 54 239 | 79 39 240 | 80 96 241 | 81 56 242 | 82 73 243 | 83 55 244 | 84 53 245 | 85 92 246 | 86 71 247 | 87 63 248 | 88 47 249 | 89 86 250 | 90 86 251 | 91 58 252 | 92 68 253 | 93 27 254 | 94 77 255 | 95 67 256 | 96 19 257 | 97 60 258 | 98 42 259 | 99 3 260 | 100 47 261 | 101 4 262 | 102 57 263 | 103 44 264 | 104 90 265 | 105 97 266 | 106 37 267 | 107 49 268 | 108 58 269 | 109 67 270 | 110 30 271 | 111 85 272 | 112 31 273 | 113 28 274 | 114 26 275 | 115 86 276 | 116 90 277 | 117 99 278 | 118 99 279 | 119 35 280 | 120 62 281 | 121 49 282 | 122 71 283 | 123 74 284 | 124 3 285 | 125 71 286 | 126 99 287 | 127 38 288 | 128 96 289 | 129 71 290 | 130 92 291 | 131 6 292 | 132 77 293 | 133 94 294 | 134 47 295 | 135 92 296 | 136 90 297 | 137 67 298 | 138 16 299 | 139 47 300 | 140 61 301 | 141 68 302 | 142 93 303 | 143 96 304 | STATIONS_COORD_SECTION 305 | 144 306 | 145 307 | 146 308 | 147 309 | DEPOT_SECTION 310 | 1 311 | -1 312 | EOF -------------------------------------------------------------------------------- /benchmarks/evrp-2022/F-n140-k5-s5.evrp: -------------------------------------------------------------------------------- 1 | NAME: F-n140-k7-s5.evrp 2 | COMMENT: Modificatification of F-n135-k7 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 5 6 | DIMENSION: 140 7 | STATIONS: 5 8 | CAPACITY: 2210 9 | ENERGY_CAPACITY: 307 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 -6.0 15.0 14 | 2 3.2 5.1 15 | 3 24.6 8.3 16 | 4 23.3 1.3 17 | 5 27.8 8.3 18 | 6 29.0 8.0 19 | 7 31.0 8.0 20 | 8 33.5 10.5 21 | 9 30.0 10.5 22 | 10 29.0 10.0 23 | 11 26.5 11.7 24 | 12 28.3 14.3 25 | 13 27.0 14.3 26 | 14 23.5 19.0 27 | 15 26.0 20.0 28 | 16 25.0 20.0 29 | 17 20.5 19.0 30 | 18 -20.0 13.0 31 | 19 -21.0 14.0 32 | 20 -30.0 30.0 33 | 21 -5.0 30.0 34 | 22 1.3 17.8 35 | 23 1.8 13.8 36 | 24 1.8 13.1 37 | 25 2.0 13.6 38 | 26 4.8 17.0 39 | 27 7.0 15.0 40 | 28 9.8 16.6 41 | 29 11.4 14.5 42 | 30 14.4 11.3 43 | 31 11.0 12.0 44 | 32 9.3 10.7 45 | 33 0.6 2.8 46 | 34 -30.0 -10.0 47 | 35 2.0 0.0 48 | 36 14.5 1.0 49 | 37 15.0 1.8 50 | 38 17.2 2.4 51 | 39 17.2 4.2 52 | 40 18.2 4.4 53 | 41 20.3 2.1 54 | 42 22.8 3.1 55 | 43 23.0 4.0 56 | 44 20.8 4.0 57 | 45 20.8 4.0 58 | 46 18.5 6.4 59 | 47 -14.0 16.0 60 | 48 -0.5 6.9 61 | 49 3.2 2.8 62 | 50 5.6 1.8 63 | 51 8.7 2.8 64 | 52 9.0 3.3 65 | 53 9.0 3.5 66 | 54 11.2 3.3 67 | 55 10.8 4.7 68 | 56 11.5 4.6 69 | 57 12.3 4.7 70 | 58 12.3 5.5 71 | 59 11.2 6.9 72 | 60 6.5 9.7 73 | 61 5.8 8.5 74 | 62 7.2 6.0 75 | 63 7.2 4.0 76 | 64 -4.0 -4.0 77 | 65 -3.0 1.2 78 | 66 -40.0 49.0 79 | 67 -15.0 10.0 80 | 68 -11.0 -10.0 81 | 69 -25.0 -20.0 82 | 70 -25.0 -35.0 83 | 71 -24.0 -35.0 84 | 72 -18.0 10.0 85 | 73 -2.0 10.0 86 | 74 -4.0 8.0 87 | 75 -3.0 5.0 88 | 76 2.1 6.2 89 | 77 -1.7 3.0 90 | 78 -3.0 2.0 91 | 79 -7.0 0.0 92 | 80 -3.0 -6.0 93 | 81 -30.0 -11.0 94 | 82 -62.0 -10.0 95 | 83 -8.0 30.0 96 | 84 1.0 60.0 97 | 85 10.0 52.0 98 | 86 10.0 52.0 99 | 87 10.0 51.0 100 | 88 16.0 29.0 101 | 89 26.0 21.0 102 | 90 16.0 21.0 103 | 91 15.5 19.2 104 | 92 0.0 16.5 105 | 93 17.2 14.3 106 | 94 16.5 7.8 107 | 95 16.9 7.7 108 | 96 18.0 2.0 109 | 97 16.2 4.0 110 | 98 15.0 4.0 111 | 99 15.0 3.0 112 | 100 14.8 2.4 113 | 101 14.5 3.0 114 | 102 13.0 2.6 115 | 103 11.8 3.0 116 | 104 12.0 4.0 117 | 105 12.8 3.6 118 | 106 13.4 5.5 119 | 107 -150.0 8.0 120 | 108 -152.0 1.0 121 | 109 -152.0 0.0 122 | 110 -142.0 -31.0 123 | 111 -78.0 -19.0 124 | 112 -78.0 -18.0 125 | 113 -78.0 -17.0 126 | 114 -80.0 -14.0 127 | 115 -118.0 22.0 128 | 116 -107.0 30.0 129 | 117 -85.0 14.0 130 | 118 -78.0 15.0 131 | 119 -15.0 16.0 132 | 120 -62.0 32.0 133 | 121 -120.0 -20.0 134 | 122 -90.0 -22.0 135 | 123 -79.0 -19.0 136 | 124 -79.0 -18.5 137 | 125 -79.0 -18.0 138 | 126 -78.0 -17.5 139 | 127 -79.0 -17.0 140 | 128 -80.0 -17.0 141 | 129 -80.0 -16.0 142 | 130 -80.0 -15.0 143 | 131 -48.0 37.0 144 | 132 -85.0 15.0 145 | 133 -62.0 -9.0 146 | 134 -15.0 -4.0 147 | 135 -1.0 3.2 148 | 136 -115 -6 149 | 137 -51 6 150 | 138 21 5 151 | 139 52 -39 152 | 140 66 -3 153 | DEMAND_SECTION 154 | 1 0 155 | 2 30 156 | 3 226 157 | 4 37 158 | 5 24 159 | 6 36 160 | 7 1 161 | 8 31 162 | 9 24 163 | 10 30 164 | 11 24 165 | 12 24 166 | 13 32 167 | 14 24 168 | 15 24 169 | 16 19 170 | 17 24 171 | 18 18 172 | 19 36 173 | 20 115 174 | 21 24 175 | 22 24 176 | 23 61 177 | 24 71 178 | 25 36 179 | 26 18 180 | 27 30 181 | 28 31 182 | 29 36 183 | 30 18 184 | 31 1004 185 | 32 18 186 | 33 34 187 | 34 504 188 | 35 18 189 | 36 39 190 | 37 24 191 | 38 37 192 | 39 24 193 | 40 99 194 | 41 24 195 | 42 24 196 | 43 36 197 | 44 30 198 | 45 25 199 | 46 24 200 | 47 122 201 | 48 196 202 | 49 229 203 | 50 83 204 | 51 18 205 | 52 24 206 | 53 306 207 | 54 18 208 | 55 20 209 | 56 18 210 | 57 24 211 | 58 22 212 | 59 24 213 | 60 18 214 | 61 18 215 | 62 24 216 | 63 24 217 | 64 30 218 | 65 24 219 | 66 40 220 | 67 166 221 | 68 254 222 | 69 187 223 | 70 94 224 | 71 17 225 | 72 285 226 | 73 24 227 | 74 24 228 | 75 205 229 | 76 23 230 | 77 28 231 | 78 51 232 | 79 49 233 | 80 19 234 | 81 262 235 | 82 120 236 | 83 266 237 | 84 704 238 | 85 38 239 | 86 18 240 | 87 30 241 | 88 25 242 | 89 12 243 | 90 18 244 | 91 25 245 | 92 35 246 | 93 18 247 | 94 12 248 | 95 20 249 | 96 1126 250 | 97 9 251 | 98 36 252 | 99 12 253 | 100 31 254 | 101 96 255 | 102 27 256 | 103 54 257 | 104 137 258 | 105 12 259 | 106 58 260 | 107 206 261 | 108 178 262 | 109 486 263 | 110 36 264 | 111 261 265 | 112 135 266 | 113 135 267 | 114 373 268 | 115 535 269 | 116 42 270 | 117 9 271 | 118 110 272 | 119 36 273 | 120 18 274 | 121 726 275 | 122 187 276 | 123 23 277 | 124 134 278 | 125 47 279 | 126 51 280 | 127 43 281 | 128 79 282 | 129 112 283 | 130 91 284 | 131 232 285 | 132 483 286 | 133 828 287 | 134 11 288 | 135 12 289 | STATIONS_COORD_SECTION 290 | 136 291 | 137 292 | 138 293 | 139 294 | 140 295 | DEPOT_SECTION 296 | 1 297 | -1 298 | EOF 299 | -------------------------------------------------------------------------------- /benchmarks/evrp-2022/M-n212-k16-s12.evrp: -------------------------------------------------------------------------------- 1 | NAME: M-n212-k16-s12.evrp 2 | COMMENT: Modificatification of M-n200-k16 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 16 6 | DIMENSION: 212 7 | STATIONS: 12 8 | CAPACITY: 200 9 | ENERGY_CAPACITY: 100 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 35 35 14 | 2 41 49 15 | 3 35 17 16 | 4 55 45 17 | 5 55 20 18 | 6 15 30 19 | 7 25 30 20 | 8 20 50 21 | 9 10 43 22 | 10 55 60 23 | 11 30 60 24 | 12 20 65 25 | 13 50 35 26 | 14 30 25 27 | 15 15 10 28 | 16 30 5 29 | 17 10 20 30 | 18 5 30 31 | 19 20 40 32 | 20 15 60 33 | 21 45 65 34 | 22 45 20 35 | 23 45 10 36 | 24 55 5 37 | 25 65 35 38 | 26 65 20 39 | 27 45 30 40 | 28 35 40 41 | 29 41 37 42 | 30 64 42 43 | 31 40 60 44 | 32 31 52 45 | 33 35 69 46 | 34 53 52 47 | 35 65 55 48 | 36 63 65 49 | 37 2 60 50 | 38 20 20 51 | 39 5 5 52 | 40 60 12 53 | 41 40 25 54 | 42 42 7 55 | 43 24 12 56 | 44 23 3 57 | 45 11 14 58 | 46 6 38 59 | 47 2 48 60 | 48 8 56 61 | 49 13 52 62 | 50 6 68 63 | 51 47 47 64 | 52 49 58 65 | 53 27 43 66 | 54 37 31 67 | 55 57 29 68 | 56 63 23 69 | 57 53 12 70 | 58 32 12 71 | 59 36 26 72 | 60 21 24 73 | 61 17 34 74 | 62 12 24 75 | 63 24 58 76 | 64 27 69 77 | 65 15 77 78 | 66 62 77 79 | 67 49 73 80 | 68 67 5 81 | 69 56 39 82 | 70 37 47 83 | 71 37 56 84 | 72 57 68 85 | 73 47 16 86 | 74 44 17 87 | 75 46 13 88 | 76 49 11 89 | 77 49 42 90 | 78 53 43 91 | 79 61 52 92 | 80 57 48 93 | 81 56 37 94 | 82 55 54 95 | 83 15 47 96 | 84 14 37 97 | 85 11 31 98 | 86 16 22 99 | 87 4 18 100 | 88 28 18 101 | 89 26 52 102 | 90 26 35 103 | 91 31 67 104 | 92 15 19 105 | 93 22 22 106 | 94 18 24 107 | 95 26 27 108 | 96 25 24 109 | 97 22 27 110 | 98 25 21 111 | 99 19 21 112 | 100 20 26 113 | 101 18 18 114 | 102 37 52 115 | 103 49 49 116 | 104 52 64 117 | 105 20 26 118 | 106 40 30 119 | 107 21 47 120 | 108 17 63 121 | 109 31 62 122 | 110 52 33 123 | 111 51 21 124 | 112 42 41 125 | 113 31 32 126 | 114 5 25 127 | 115 12 42 128 | 116 36 16 129 | 117 52 41 130 | 118 27 23 131 | 119 17 33 132 | 120 13 13 133 | 121 57 58 134 | 122 62 42 135 | 123 42 57 136 | 124 16 57 137 | 125 8 52 138 | 126 7 38 139 | 127 27 68 140 | 128 30 48 141 | 129 43 67 142 | 130 58 48 143 | 131 58 27 144 | 132 37 69 145 | 133 38 46 146 | 134 46 10 147 | 135 61 33 148 | 136 62 63 149 | 137 63 69 150 | 138 32 22 151 | 139 45 35 152 | 140 59 15 153 | 141 5 6 154 | 142 10 17 155 | 143 21 10 156 | 144 5 64 157 | 145 30 15 158 | 146 39 10 159 | 147 32 39 160 | 148 25 32 161 | 149 25 55 162 | 150 48 28 163 | 151 56 37 164 | 152 22 22 165 | 153 36 26 166 | 154 21 45 167 | 155 45 35 168 | 156 55 20 169 | 157 33 34 170 | 158 50 50 171 | 159 55 45 172 | 160 26 59 173 | 161 40 66 174 | 162 55 65 175 | 163 35 51 176 | 164 62 35 177 | 165 62 57 178 | 166 62 24 179 | 167 21 36 180 | 168 33 44 181 | 169 9 56 182 | 170 62 48 183 | 171 66 14 184 | 172 44 13 185 | 173 26 13 186 | 174 11 28 187 | 175 7 43 188 | 176 17 64 189 | 177 41 46 190 | 178 55 34 191 | 179 35 16 192 | 180 52 26 193 | 181 43 26 194 | 182 31 76 195 | 183 22 53 196 | 184 26 29 197 | 185 50 40 198 | 186 55 50 199 | 187 54 10 200 | 188 60 15 201 | 189 47 66 202 | 190 30 60 203 | 191 30 50 204 | 192 12 17 205 | 193 15 14 206 | 194 16 19 207 | 195 21 48 208 | 196 50 30 209 | 197 51 42 210 | 198 50 15 211 | 199 48 21 212 | 200 12 38 213 | 201 12 42 214 | 202 12 66 215 | 203 14 24 216 | 204 15 11 217 | 205 32 51 218 | 206 35 15 219 | 207 35 33 220 | 208 38 71 221 | 209 56 49 222 | 210 56 67 223 | 211 57 10 224 | 212 57 28 225 | DEMAND_SECTION 226 | 1 0 227 | 2 10 228 | 3 7 229 | 4 13 230 | 5 19 231 | 6 26 232 | 7 3 233 | 8 5 234 | 9 9 235 | 10 16 236 | 11 16 237 | 12 12 238 | 13 19 239 | 14 23 240 | 15 20 241 | 16 8 242 | 17 19 243 | 18 2 244 | 19 12 245 | 20 17 246 | 21 9 247 | 22 11 248 | 23 18 249 | 24 29 250 | 25 3 251 | 26 6 252 | 27 17 253 | 28 16 254 | 29 16 255 | 30 9 256 | 31 21 257 | 32 27 258 | 33 23 259 | 34 11 260 | 35 14 261 | 36 8 262 | 37 5 263 | 38 8 264 | 39 16 265 | 40 31 266 | 41 9 267 | 42 5 268 | 43 5 269 | 44 7 270 | 45 18 271 | 46 16 272 | 47 1 273 | 48 27 274 | 49 36 275 | 50 30 276 | 51 13 277 | 52 10 278 | 53 9 279 | 54 14 280 | 55 18 281 | 56 2 282 | 57 6 283 | 58 7 284 | 59 18 285 | 60 28 286 | 61 3 287 | 62 13 288 | 63 19 289 | 64 10 290 | 65 9 291 | 66 20 292 | 67 25 293 | 68 25 294 | 69 36 295 | 70 6 296 | 71 5 297 | 72 15 298 | 73 25 299 | 74 9 300 | 75 8 301 | 76 18 302 | 77 13 303 | 78 14 304 | 79 3 305 | 80 23 306 | 81 6 307 | 82 26 308 | 83 16 309 | 84 11 310 | 85 7 311 | 86 41 312 | 87 35 313 | 88 26 314 | 89 9 315 | 90 15 316 | 91 3 317 | 92 1 318 | 93 2 319 | 94 22 320 | 95 27 321 | 96 20 322 | 97 11 323 | 98 12 324 | 99 10 325 | 100 9 326 | 101 17 327 | 102 7 328 | 103 30 329 | 104 16 330 | 105 9 331 | 106 21 332 | 107 15 333 | 108 19 334 | 109 23 335 | 110 11 336 | 111 5 337 | 112 19 338 | 113 29 339 | 114 23 340 | 115 21 341 | 116 10 342 | 117 15 343 | 118 3 344 | 119 41 345 | 120 9 346 | 121 28 347 | 122 8 348 | 123 8 349 | 124 16 350 | 125 10 351 | 126 28 352 | 127 7 353 | 128 15 354 | 129 14 355 | 130 6 356 | 131 19 357 | 132 11 358 | 133 12 359 | 134 23 360 | 135 26 361 | 136 17 362 | 137 6 363 | 138 9 364 | 139 15 365 | 140 14 366 | 141 7 367 | 142 27 368 | 143 13 369 | 144 11 370 | 145 16 371 | 146 10 372 | 147 5 373 | 148 25 374 | 149 17 375 | 150 18 376 | 151 10 377 | 152 18 378 | 153 26 379 | 154 11 380 | 155 30 381 | 156 21 382 | 157 19 383 | 158 15 384 | 159 16 385 | 160 29 386 | 161 26 387 | 162 37 388 | 163 16 389 | 164 12 390 | 165 31 391 | 166 8 392 | 167 19 393 | 168 20 394 | 169 13 395 | 170 15 396 | 171 22 397 | 172 28 398 | 173 12 399 | 174 6 400 | 175 27 401 | 176 14 402 | 177 18 403 | 178 17 404 | 179 29 405 | 180 13 406 | 181 22 407 | 182 25 408 | 183 28 409 | 184 27 410 | 185 19 411 | 186 10 412 | 187 12 413 | 188 14 414 | 189 24 415 | 190 16 416 | 191 33 417 | 192 15 418 | 193 11 419 | 194 18 420 | 195 17 421 | 196 21 422 | 197 27 423 | 198 19 424 | 199 20 425 | 200 5 426 | STATIONS_COORD_SECTION 427 | 201 428 | 202 429 | 203 430 | 204 431 | 205 432 | 206 433 | 207 434 | 208 435 | 209 436 | 210 437 | 211 438 | 212 439 | DEPOT_SECTION 440 | 1 441 | -1 442 | EOF 443 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Electric Vehicle Routing Problem # 2 | 3 | The Electric Vehicle Routing Problem (EVRP) is a twist on the classic Vehicle Routing Problem (VRP) that considers the limitations of electric vehicles (EVs) for logistics and delivery planning. 4 | 5 | Here's a breakdown of the key points: 6 | 7 | Traditional VRP: This aims to find the most efficient routes for a fleet of vehicles to deliver goods or services, considering factors like distance, capacity, and customer locations. 8 | 9 | EVRP Challenges: Unlike traditional vehicles, EVs have limited driving range due to battery capacity and require recharging. EVRP incorporates these challenges by: 10 | 11 | Accounting for battery range: Routes need to be planned within the EV's driving range or include stops for recharging. 12 | Factoring in charging stations: The location and availability of charging stations become important considerations when designing routes. 13 | Potential for multiple routes: An EV might need to complete a delivery in multiple legs with charging stops in between. 14 | EVRP Applications: Delivery fleets, ride-sharing services, and public transportation with electric vehicles can all benefit from EVRP solutions to optimize their operations. Optimizing routes reduces costs, improves efficiency, and minimizes environmental impact. 15 | 16 | EVRP is an active area of research with various solution approaches being developed. Some focus on minimizing travel distance or the number of vehicles needed, while others consider factors like charging time and energy consumption. 17 | 18 | We applied the Greedy Search + Genetic Algorithm (GSGA) to solve the EVRP. The GSGA algorithm combines the Greedy Search heuristic with a Genetic Algorithm to find high-quality solutions efficiently. The Greedy Search phase constructs initial solutions, which are then improved by the Genetic Algorithm through selection, crossover, and mutation operations. 19 | 20 | [Paper link](https://link.springer.com/article/10.1007/s10489-022-03555-8): A greedy search based evolutionary algorithm for electric vehicle routing problem 21 | 22 | ### This repository contains algorithms to solve the EVRP (Electric Vehicle Routing Problem) in Python ### 23 | 24 | 25 | #### Algorithms: #### 26 | 1. Greedy Search 27 | 2. Greedy Search + Genetic Algorithm (GSGA) 28 | 29 | ### Installation ### 30 | ```bash 31 | pip install -e . 32 | ``` 33 | 34 | ### How to run the code ### 35 | ```bash 36 | python evrp.py -p ./benchmarks/evrp-2019/E-n22-k4.evrp -a GSGA -o ./results/GSGA/ -n 10 --seed 42 37 | ``` 38 | 39 | *** Example of solution in graph E-n22-k4.evrp using GSGA algorithm 40 | ![Solution](examples/E-n22-k4.png) 41 | 42 | *** Example of solution in graph E-n51-k5.evrp using GSGA algorithm 43 | ![Solution](examples/E-n51-k5.png) 44 | 45 | 46 | The algorithm in C++ version [here](https://github.com/NeiH4207/EVRP) archived top 3 in competition [CEC-12 (2019)](https://mavrovouniotis.github.io/EVRPcompetition2020/) 47 | 48 | | instances | VNS | | | | SA | | | | GSGA | | | | 49 | |:----------------:|:-----------:|:---------:|:---------:|:------:|:----------:|:---------:|:---------:|:------:|:-------------:|:---------:|:---------:|:-------:| 50 | | | min | max | mean | stdev | min | max | mean | stdev | min | max | mean | stdev | 51 | | E-n22-k4 | 384.67 | 384.67 | 384.67 | 0.0 | 384.67 | 384.67 | 384.67 | 0.00 | 384.67 | 384.67 | 384.67 | 0.0 | 52 | | E-n23-k3 | 571.94 | 571.94 | 571.94 | 0.0 | 571.94 | 571.94 | 571.94 | 0.00 | 571.94 | 571.94 | 571.94 | 0.0 | 53 | | E-n30-k3 | 509.47 | 509.47 | 509.47 | 0.0 | 509.47 | 509.47 | 509.47 | 0.00 | 509.47 | 509.47 | 509.47 | 0.0 | 54 | | E-n33-k4 | 840.14 | 840.46 | 840.43 | 1.18 | 840.57 | 873.33 | 854.07 | 12.80 | 844.25 | 846.21 | 845.62 | 0.92 | 55 | | E-n51-k5 | 529.90 | 548.98 | 543.26 | 3.52 | 533.66 | 533.66 | 533.66 | 0.00 | 529.90 | 553.23 | 542.08 | 8.57 | 56 | | E-n76-k7 | 692.64 | 707.49 | 697.89 | 3.09 | 701.03 | 716.77 | 712.17 | 5.78 | 697.27 | 730.92 | 717.30 | 9.58 | 57 | | E-n101-k8 | 839.29 | 853.34 | 853.34 | 4.73 | 845.84 | 856.74 | 852.48 | 3.44 | 852.69 | 887.14 | 872.69 | 9.58 | 58 | | X-n143-k7 | 16028.05 | 16883.38 | 16459.31 | 242.59 | 16610.37 | 17396.06 | 17188.90 | 170.44 | 16488.60 | 17478.86 | 16911.50 | 282.30 | 59 | | X-n214-k11 | 11323.56 | 11660.70 | 11482.20 | 76.14 | 11404.44 | 11881.73 | 11680.35 | 116.47 | 11762.07 | 12309.38 | 12007.06 | 156.69 | 60 | | X-n352-k40 | 27064.88 | 27418.38 | 27217.77 | 86.20 | 27222.96 | 27796.69 | 27498.03 | 155.62 | 28008.09 | 28792.66 | 28336.07 | 205.29 | 61 | | X-n459-k26 | 25370.80 | 25774.62 | 25582.27 | 106.89 | 25464.84 | 26038.65 | 25809.47 | 157.97 | 26048.21 | 26742.11 | 26345.12 | 185.14 | 62 | | X-n573-k30 | 52181.51 | 51929.24 | 52548.09 | 278.85 | 51929.24 | 53534.01 | 52793.66 | 577.24 | 54189.62 | 56327.62 | 55327.62 | 548.05 | 63 | | X-n685-k75 | 71345.40 | 72187.75 | 71770.57 | 197.08 | 72549.90 | 73693.49 | 73124.98 | 320.07 | 73925.56 | 75535.99 | 74508.03 | 409.43 | 64 | | X-n749-k98 | 81002.01 | 81634.06 | 81327.39 | 176.19 | 81392.78 | 82414.80 | 81848.13 | 275.26 | 84034.73 | 85549.36 | 84759.79 | 376.10 | 65 | | X-n819-k171 | 164289.95 | 165571.48 | 164926.41 | 318.62 | 165069.77 | 166640.37 | 165895.78 | 403.70 | 170965.68 | 173371.76 | 172410.12 | 568.58 | 66 | | X-n916-k207 | 341649.91 | 343338.01 | 342460.70 | 510.66 | 342796.88 | 344521.64 | 343533.85 | 556.98 | 357391.57 | 362422.52 | 360269.94 | 1192.57 | 67 | | X-n1001-k43 | 77476.36 | 78464.68 | 77920.52 | 234.73 | 78053.86 | 79226.81 | 78593.50 | 306.27 | 78832.90 | 79567.00 | 79163.34 | 229.19 | 68 | 69 | -------------------------------------------------------------------------------- /benchmarks/evrp-2022/X-n221-k11-s7.evrp: -------------------------------------------------------------------------------- 1 | NAME: X-n221-k11-s9.evrp 2 | COMMENT: Modificatification of X-n214-k11 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 11 6 | DIMENSION: 221 7 | STATIONS: 7 8 | CAPACITY: 944 9 | ENERGY_CAPACITY: 1204 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 500 500 14 | 2 753 355 15 | 3 663 83 16 | 4 725 286 17 | 5 581 444 18 | 6 700 205 19 | 7 630 475 20 | 8 560 407 21 | 9 848 374 22 | 10 752 315 23 | 11 454 310 24 | 12 685 227 25 | 13 747 468 26 | 14 540 348 27 | 15 882 346 28 | 16 762 228 29 | 17 884 307 30 | 18 681 274 31 | 19 761 254 32 | 20 791 205 33 | 21 699 559 34 | 22 694 352 35 | 23 679 11 36 | 24 656 446 37 | 25 428 487 38 | 26 838 395 39 | 27 554 590 40 | 28 567 250 41 | 29 769 381 42 | 30 753 20 43 | 31 710 296 44 | 32 653 489 45 | 33 711 447 46 | 34 516 322 47 | 35 704 265 48 | 36 742 358 49 | 37 578 423 50 | 38 923 378 51 | 39 451 120 52 | 40 449 254 53 | 41 626 264 54 | 42 701 203 55 | 43 751 293 56 | 44 835 0 57 | 45 810 318 58 | 46 640 218 59 | 47 493 226 60 | 48 483 445 61 | 49 671 134 62 | 50 465 361 63 | 51 521 69 64 | 52 894 399 65 | 53 824 388 66 | 54 605 238 67 | 55 848 251 68 | 56 561 443 69 | 57 663 9 70 | 58 768 339 71 | 59 634 426 72 | 60 590 60 73 | 61 735 280 74 | 62 842 365 75 | 63 671 124 76 | 64 680 251 77 | 65 615 361 78 | 66 558 451 79 | 67 884 356 80 | 68 746 384 81 | 69 687 227 82 | 70 855 350 83 | 71 656 450 84 | 72 560 459 85 | 73 591 433 86 | 74 451 36 87 | 75 747 26 88 | 76 753 384 89 | 77 530 259 90 | 78 739 215 91 | 79 537 267 92 | 80 742 304 93 | 81 509 418 94 | 82 667 17 95 | 83 534 297 96 | 84 605 382 97 | 85 470 482 98 | 86 817 366 99 | 87 815 268 100 | 88 728 264 101 | 89 778 44 102 | 90 856 360 103 | 91 818 284 104 | 92 666 107 105 | 93 628 378 106 | 94 538 317 107 | 95 715 34 108 | 96 875 290 109 | 97 495 468 110 | 98 584 145 111 | 99 725 237 112 | 100 563 394 113 | 101 775 378 114 | 102 587 443 115 | 103 535 665 116 | 104 696 387 117 | 105 704 153 118 | 106 667 448 119 | 107 557 440 120 | 108 682 461 121 | 109 762 279 122 | 110 824 522 123 | 111 764 259 124 | 112 759 334 125 | 113 750 391 126 | 114 893 283 127 | 115 900 308 128 | 116 595 73 129 | 117 641 474 130 | 118 597 236 131 | 119 294 448 132 | 120 852 182 133 | 121 526 330 134 | 122 735 460 135 | 123 901 303 136 | 124 639 390 137 | 125 545 395 138 | 126 494 2 139 | 127 741 339 140 | 128 795 456 141 | 129 783 343 142 | 130 694 224 143 | 131 756 99 144 | 132 698 323 145 | 133 683 222 146 | 134 704 269 147 | 135 769 321 148 | 136 596 321 149 | 137 605 103 150 | 138 507 448 151 | 139 567 464 152 | 140 743 205 153 | 141 622 449 154 | 142 767 116 155 | 143 745 269 156 | 144 603 447 157 | 145 634 194 158 | 146 832 312 159 | 147 796 292 160 | 148 662 86 161 | 149 608 618 162 | 150 489 267 163 | 151 837 289 164 | 152 478 510 165 | 153 569 497 166 | 154 611 550 167 | 155 749 387 168 | 156 683 355 169 | 157 682 81 170 | 158 701 170 171 | 159 653 414 172 | 160 584 21 173 | 161 683 308 174 | 162 659 582 175 | 163 668 329 176 | 164 662 288 177 | 165 897 399 178 | 166 770 366 179 | 167 540 212 180 | 168 606 309 181 | 169 581 254 182 | 170 582 485 183 | 171 848 381 184 | 172 828 150 185 | 173 536 445 186 | 174 531 56 187 | 175 707 424 188 | 176 587 191 189 | 177 770 259 190 | 178 702 94 191 | 179 823 162 192 | 180 644 364 193 | 181 570 186 194 | 182 552 317 195 | 183 626 88 196 | 184 999 631 197 | 185 860 274 198 | 186 354 662 199 | 187 625 323 200 | 188 654 285 201 | 189 785 82 202 | 190 650 335 203 | 191 637 568 204 | 192 449 359 205 | 193 885 77 206 | 194 552 440 207 | 195 810 205 208 | 196 628 24 209 | 197 728 294 210 | 198 733 311 211 | 199 750 327 212 | 200 727 278 213 | 201 618 336 214 | 202 537 137 215 | 203 718 413 216 | 204 725 355 217 | 205 710 139 218 | 206 723 556 219 | 207 449 346 220 | 208 731 373 221 | 209 349 465 222 | 210 572 542 223 | 211 612 377 224 | 212 711 417 225 | 213 678 44 226 | 214 604 593 227 | 215 418 530 228 | 216 528 148 229 | 217 570 393 230 | 218 571 521 231 | 219 736 90 232 | 220 784 325 233 | 221 871 568 234 | DEMAND_SECTION 235 | 1 0 236 | 2 83 237 | 3 84 238 | 4 34 239 | 5 17 240 | 6 88 241 | 7 59 242 | 8 56 243 | 9 33 244 | 10 21 245 | 11 37 246 | 12 15 247 | 13 97 248 | 14 23 249 | 15 76 250 | 16 94 251 | 17 99 252 | 18 30 253 | 19 44 254 | 20 45 255 | 21 8 256 | 22 37 257 | 23 43 258 | 24 15 259 | 25 18 260 | 26 73 261 | 27 65 262 | 28 89 263 | 29 5 264 | 30 13 265 | 31 64 266 | 32 60 267 | 33 20 268 | 34 12 269 | 35 59 270 | 36 25 271 | 37 2 272 | 38 60 273 | 39 61 274 | 40 6 275 | 41 17 276 | 42 65 277 | 43 26 278 | 44 96 279 | 45 21 280 | 46 63 281 | 47 29 282 | 48 24 283 | 49 51 284 | 50 48 285 | 51 65 286 | 52 58 287 | 53 40 288 | 54 34 289 | 55 81 290 | 56 21 291 | 57 51 292 | 58 31 293 | 59 20 294 | 60 34 295 | 61 47 296 | 62 61 297 | 63 2 298 | 64 93 299 | 65 75 300 | 66 85 301 | 67 27 302 | 68 57 303 | 69 86 304 | 70 61 305 | 71 98 306 | 72 76 307 | 73 68 308 | 74 30 309 | 75 72 310 | 76 28 311 | 77 12 312 | 78 24 313 | 79 42 314 | 80 95 315 | 81 3 316 | 82 92 317 | 83 32 318 | 84 59 319 | 85 33 320 | 86 68 321 | 87 30 322 | 88 15 323 | 89 40 324 | 90 45 325 | 91 33 326 | 92 26 327 | 93 70 328 | 94 89 329 | 95 29 330 | 96 88 331 | 97 69 332 | 98 67 333 | 99 94 334 | 100 23 335 | 101 97 336 | 102 7 337 | 103 23 338 | 104 6 339 | 105 65 340 | 106 84 341 | 107 79 342 | 108 3 343 | 109 99 344 | 110 22 345 | 111 69 346 | 112 49 347 | 113 33 348 | 114 28 349 | 115 49 350 | 116 37 351 | 117 18 352 | 118 56 353 | 119 44 354 | 120 40 355 | 121 64 356 | 122 80 357 | 123 9 358 | 124 57 359 | 125 3 360 | 126 11 361 | 127 95 362 | 128 86 363 | 129 79 364 | 130 23 365 | 131 60 366 | 132 12 367 | 133 62 368 | 134 15 369 | 135 89 370 | 136 35 371 | 137 85 372 | 138 92 373 | 139 49 374 | 140 12 375 | 141 10 376 | 142 72 377 | 143 64 378 | 144 27 379 | 145 18 380 | 146 22 381 | 147 17 382 | 148 84 383 | 149 21 384 | 150 13 385 | 151 77 386 | 152 35 387 | 153 100 388 | 154 2 389 | 155 50 390 | 156 17 391 | 157 75 392 | 158 44 393 | 159 56 394 | 160 27 395 | 161 85 396 | 162 20 397 | 163 31 398 | 164 15 399 | 165 10 400 | 166 100 401 | 167 51 402 | 168 6 403 | 169 7 404 | 170 19 405 | 171 87 406 | 172 46 407 | 173 74 408 | 174 91 409 | 175 79 410 | 176 67 411 | 177 38 412 | 178 39 413 | 179 40 414 | 180 91 415 | 181 71 416 | 182 54 417 | 183 80 418 | 184 42 419 | 185 28 420 | 186 76 421 | 187 59 422 | 188 97 423 | 189 12 424 | 190 2 425 | 191 64 426 | 192 52 427 | 193 63 428 | 194 24 429 | 195 8 430 | 196 23 431 | 197 69 432 | 198 77 433 | 199 60 434 | 200 59 435 | 201 10 436 | 202 31 437 | 203 94 438 | 204 94 439 | 205 18 440 | 206 93 441 | 207 68 442 | 208 12 443 | 209 69 444 | 210 45 445 | 211 22 446 | 212 48 447 | 213 95 448 | 214 95 449 | STATIONS_COORD_SECTION 450 | 215 451 | 216 452 | 217 453 | 218 454 | 219 455 | 220 456 | 221 457 | DEPOT_SECTION 458 | 1 459 | -1 460 | EOF 461 | -------------------------------------------------------------------------------- /benchmarks/evrp-2019/X-n214-k11.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of X-n214-k11 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 0 5 | VEHICLES: 11 6 | DIMENSION: 223 7 | STATIONS: 9 8 | CAPACITY: 944 9 | ENERGY_CAPACITY: 987 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 500 500 14 | 2 753 355 15 | 3 663 83 16 | 4 725 286 17 | 5 581 444 18 | 6 700 205 19 | 7 630 475 20 | 8 560 407 21 | 9 848 374 22 | 10 752 315 23 | 11 454 310 24 | 12 685 227 25 | 13 747 468 26 | 14 540 348 27 | 15 882 346 28 | 16 762 228 29 | 17 884 307 30 | 18 681 274 31 | 19 761 254 32 | 20 791 205 33 | 21 699 559 34 | 22 694 352 35 | 23 679 11 36 | 24 656 446 37 | 25 428 487 38 | 26 838 395 39 | 27 554 590 40 | 28 567 250 41 | 29 769 381 42 | 30 753 20 43 | 31 710 296 44 | 32 653 489 45 | 33 711 447 46 | 34 516 322 47 | 35 704 265 48 | 36 742 358 49 | 37 578 423 50 | 38 923 378 51 | 39 451 120 52 | 40 449 254 53 | 41 626 264 54 | 42 701 203 55 | 43 751 293 56 | 44 835 0 57 | 45 810 318 58 | 46 640 218 59 | 47 493 226 60 | 48 483 445 61 | 49 671 134 62 | 50 465 361 63 | 51 521 69 64 | 52 894 399 65 | 53 824 388 66 | 54 605 238 67 | 55 848 251 68 | 56 561 443 69 | 57 663 9 70 | 58 768 339 71 | 59 634 426 72 | 60 590 60 73 | 61 735 280 74 | 62 842 365 75 | 63 671 124 76 | 64 680 251 77 | 65 615 361 78 | 66 558 451 79 | 67 884 356 80 | 68 746 384 81 | 69 687 227 82 | 70 855 350 83 | 71 656 450 84 | 72 560 459 85 | 73 591 433 86 | 74 451 36 87 | 75 747 26 88 | 76 753 384 89 | 77 530 259 90 | 78 739 215 91 | 79 537 267 92 | 80 742 304 93 | 81 509 418 94 | 82 667 17 95 | 83 534 297 96 | 84 605 382 97 | 85 470 482 98 | 86 817 366 99 | 87 815 268 100 | 88 728 264 101 | 89 778 44 102 | 90 856 360 103 | 91 818 284 104 | 92 666 107 105 | 93 628 378 106 | 94 538 317 107 | 95 715 34 108 | 96 875 290 109 | 97 495 468 110 | 98 584 145 111 | 99 725 237 112 | 100 563 394 113 | 101 775 378 114 | 102 587 443 115 | 103 535 665 116 | 104 696 387 117 | 105 704 153 118 | 106 667 448 119 | 107 557 440 120 | 108 682 461 121 | 109 762 279 122 | 110 824 522 123 | 111 764 259 124 | 112 759 334 125 | 113 750 391 126 | 114 893 283 127 | 115 900 308 128 | 116 595 73 129 | 117 641 474 130 | 118 597 236 131 | 119 294 448 132 | 120 852 182 133 | 121 526 330 134 | 122 735 460 135 | 123 901 303 136 | 124 639 390 137 | 125 545 395 138 | 126 494 2 139 | 127 741 339 140 | 128 795 456 141 | 129 783 343 142 | 130 694 224 143 | 131 756 99 144 | 132 698 323 145 | 133 683 222 146 | 134 704 269 147 | 135 769 321 148 | 136 596 321 149 | 137 605 103 150 | 138 507 448 151 | 139 567 464 152 | 140 743 205 153 | 141 622 449 154 | 142 767 116 155 | 143 745 269 156 | 144 603 447 157 | 145 634 194 158 | 146 832 312 159 | 147 796 292 160 | 148 662 86 161 | 149 608 618 162 | 150 489 267 163 | 151 837 289 164 | 152 478 510 165 | 153 569 497 166 | 154 611 550 167 | 155 749 387 168 | 156 683 355 169 | 157 682 81 170 | 158 701 170 171 | 159 653 414 172 | 160 584 21 173 | 161 683 308 174 | 162 659 582 175 | 163 668 329 176 | 164 662 288 177 | 165 897 399 178 | 166 770 366 179 | 167 540 212 180 | 168 606 309 181 | 169 581 254 182 | 170 582 485 183 | 171 848 381 184 | 172 828 150 185 | 173 536 445 186 | 174 531 56 187 | 175 707 424 188 | 176 587 191 189 | 177 770 259 190 | 178 702 94 191 | 179 823 162 192 | 180 644 364 193 | 181 570 186 194 | 182 552 317 195 | 183 626 88 196 | 184 999 631 197 | 185 860 274 198 | 186 354 662 199 | 187 625 323 200 | 188 654 285 201 | 189 785 82 202 | 190 650 335 203 | 191 637 568 204 | 192 449 359 205 | 193 885 77 206 | 194 552 440 207 | 195 810 205 208 | 196 628 24 209 | 197 728 294 210 | 198 733 311 211 | 199 750 327 212 | 200 727 278 213 | 201 618 336 214 | 202 537 137 215 | 203 718 413 216 | 204 725 355 217 | 205 710 139 218 | 206 723 556 219 | 207 449 346 220 | 208 731 373 221 | 209 349 465 222 | 210 572 542 223 | 211 612 377 224 | 212 711 417 225 | 213 678 44 226 | 214 604 593 227 | 215 412 111 228 | 216 412 333 229 | 217 412 555 230 | 218 647 111 231 | 219 647 333 232 | 220 647 555 233 | 221 882 111 234 | 222 882 333 235 | 223 882 555 236 | DEMAND_SECTION 237 | 1 0 238 | 2 83 239 | 3 84 240 | 4 34 241 | 5 17 242 | 6 88 243 | 7 59 244 | 8 56 245 | 9 33 246 | 10 21 247 | 11 37 248 | 12 15 249 | 13 97 250 | 14 23 251 | 15 76 252 | 16 94 253 | 17 99 254 | 18 30 255 | 19 44 256 | 20 45 257 | 21 8 258 | 22 37 259 | 23 43 260 | 24 15 261 | 25 18 262 | 26 73 263 | 27 65 264 | 28 89 265 | 29 5 266 | 30 13 267 | 31 64 268 | 32 60 269 | 33 20 270 | 34 12 271 | 35 59 272 | 36 25 273 | 37 2 274 | 38 60 275 | 39 61 276 | 40 6 277 | 41 17 278 | 42 65 279 | 43 26 280 | 44 96 281 | 45 21 282 | 46 63 283 | 47 29 284 | 48 24 285 | 49 51 286 | 50 48 287 | 51 65 288 | 52 58 289 | 53 40 290 | 54 34 291 | 55 81 292 | 56 21 293 | 57 51 294 | 58 31 295 | 59 20 296 | 60 34 297 | 61 47 298 | 62 61 299 | 63 2 300 | 64 93 301 | 65 75 302 | 66 85 303 | 67 27 304 | 68 57 305 | 69 86 306 | 70 61 307 | 71 98 308 | 72 76 309 | 73 68 310 | 74 30 311 | 75 72 312 | 76 28 313 | 77 12 314 | 78 24 315 | 79 42 316 | 80 95 317 | 81 3 318 | 82 92 319 | 83 32 320 | 84 59 321 | 85 33 322 | 86 68 323 | 87 30 324 | 88 15 325 | 89 40 326 | 90 45 327 | 91 33 328 | 92 26 329 | 93 70 330 | 94 89 331 | 95 29 332 | 96 88 333 | 97 69 334 | 98 67 335 | 99 94 336 | 100 23 337 | 101 97 338 | 102 7 339 | 103 23 340 | 104 6 341 | 105 65 342 | 106 84 343 | 107 79 344 | 108 3 345 | 109 99 346 | 110 22 347 | 111 69 348 | 112 49 349 | 113 33 350 | 114 28 351 | 115 49 352 | 116 37 353 | 117 18 354 | 118 56 355 | 119 44 356 | 120 40 357 | 121 64 358 | 122 80 359 | 123 9 360 | 124 57 361 | 125 3 362 | 126 11 363 | 127 95 364 | 128 86 365 | 129 79 366 | 130 23 367 | 131 60 368 | 132 12 369 | 133 62 370 | 134 15 371 | 135 89 372 | 136 35 373 | 137 85 374 | 138 92 375 | 139 49 376 | 140 12 377 | 141 10 378 | 142 72 379 | 143 64 380 | 144 27 381 | 145 18 382 | 146 22 383 | 147 17 384 | 148 84 385 | 149 21 386 | 150 13 387 | 151 77 388 | 152 35 389 | 153 100 390 | 154 2 391 | 155 50 392 | 156 17 393 | 157 75 394 | 158 44 395 | 159 56 396 | 160 27 397 | 161 85 398 | 162 20 399 | 163 31 400 | 164 15 401 | 165 10 402 | 166 100 403 | 167 51 404 | 168 6 405 | 169 7 406 | 170 19 407 | 171 87 408 | 172 46 409 | 173 74 410 | 174 91 411 | 175 79 412 | 176 67 413 | 177 38 414 | 178 39 415 | 179 40 416 | 180 91 417 | 181 71 418 | 182 54 419 | 183 80 420 | 184 42 421 | 185 28 422 | 186 76 423 | 187 59 424 | 188 97 425 | 189 12 426 | 190 2 427 | 191 64 428 | 192 52 429 | 193 63 430 | 194 24 431 | 195 8 432 | 196 23 433 | 197 69 434 | 198 77 435 | 199 60 436 | 200 59 437 | 201 10 438 | 202 31 439 | 203 94 440 | 204 94 441 | 205 18 442 | 206 93 443 | 207 68 444 | 208 12 445 | 209 69 446 | 210 45 447 | 211 22 448 | 212 48 449 | 213 95 450 | 214 95 451 | STATIONS_COORD_SECTION 452 | 215 453 | 216 454 | 217 455 | 218 456 | 219 457 | 220 458 | 221 459 | 222 460 | 223 461 | DEPOT_SECTION 462 | 1 463 | -1 464 | EOF -------------------------------------------------------------------------------- /benchmarks/evrp-2022/X-n360-k40-s9.evrp: -------------------------------------------------------------------------------- 1 | NAME: X-n360-k40-s9.evrp 2 | COMMENT: Modificatification of X-n351-k40 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 40 6 | DIMENSION: 360 7 | STATIONS: 9 8 | CAPACITY: 436 9 | ENERGY_CAPACITY: 1236 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 500 500 14 | 2 740 442 15 | 3 261 710 16 | 4 578 522 17 | 5 562 509 18 | 6 795 425 19 | 7 636 463 20 | 8 645 617 21 | 9 595 524 22 | 10 649 599 23 | 11 745 252 24 | 12 180 757 25 | 13 590 598 26 | 14 332 775 27 | 15 544 551 28 | 16 1000 444 29 | 17 581 521 30 | 18 240 609 31 | 19 700 468 32 | 20 735 579 33 | 21 403 569 34 | 22 352 905 35 | 23 733 352 36 | 24 289 705 37 | 25 598 249 38 | 26 565 570 39 | 27 711 336 40 | 28 816 497 41 | 29 769 411 42 | 30 409 651 43 | 31 231 742 44 | 32 575 555 45 | 33 567 477 46 | 34 693 537 47 | 35 521 534 48 | 36 457 414 49 | 37 826 450 50 | 38 638 617 51 | 39 245 744 52 | 40 235 859 53 | 41 233 821 54 | 42 863 455 55 | 43 739 480 56 | 44 311 717 57 | 45 567 373 58 | 46 753 427 59 | 47 547 493 60 | 48 732 382 61 | 49 664 511 62 | 50 945 316 63 | 51 250 770 64 | 52 598 493 65 | 53 262 653 66 | 54 568 558 67 | 55 877 808 68 | 56 395 796 69 | 57 467 732 70 | 58 685 327 71 | 59 260 910 72 | 60 571 648 73 | 61 747 398 74 | 62 571 650 75 | 63 541 442 76 | 64 841 466 77 | 65 744 725 78 | 66 662 349 79 | 67 686 543 80 | 68 184 776 81 | 69 177 770 82 | 70 664 559 83 | 71 802 446 84 | 72 110 559 85 | 73 662 566 86 | 74 605 544 87 | 75 287 671 88 | 76 556 738 89 | 77 615 511 90 | 78 293 693 91 | 79 375 671 92 | 80 383 614 93 | 81 834 417 94 | 82 704 397 95 | 83 255 696 96 | 84 708 388 97 | 85 799 172 98 | 86 298 531 99 | 87 740 456 100 | 88 661 582 101 | 89 664 398 102 | 90 659 461 103 | 91 630 290 104 | 92 267 721 105 | 93 682 474 106 | 94 269 639 107 | 95 577 361 108 | 96 540 550 109 | 97 370 733 110 | 98 546 587 111 | 99 708 412 112 | 100 724 572 113 | 101 416 688 114 | 102 544 794 115 | 103 714 478 116 | 104 916 502 117 | 105 313 770 118 | 106 464 361 119 | 107 356 921 120 | 108 776 470 121 | 109 477 721 122 | 110 733 447 123 | 111 724 495 124 | 112 272 792 125 | 113 491 471 126 | 114 348 505 127 | 115 168 309 128 | 116 595 628 129 | 117 227 720 130 | 118 781 585 131 | 119 228 680 132 | 120 807 595 133 | 121 582 503 134 | 122 327 603 135 | 123 505 586 136 | 124 235 788 137 | 125 135 677 138 | 126 716 440 139 | 127 221 678 140 | 128 633 421 141 | 129 826 476 142 | 130 879 350 143 | 131 738 475 144 | 132 676 446 145 | 133 388 669 146 | 134 465 690 147 | 135 543 422 148 | 136 675 544 149 | 137 770 613 150 | 138 309 590 151 | 139 434 594 152 | 140 647 551 153 | 141 468 405 154 | 142 0 863 155 | 143 663 582 156 | 144 209 755 157 | 145 966 516 158 | 146 580 593 159 | 147 221 558 160 | 148 230 594 161 | 149 329 768 162 | 150 786 523 163 | 151 636 512 164 | 152 704 474 165 | 153 819 376 166 | 154 516 472 167 | 155 724 505 168 | 156 565 501 169 | 157 404 589 170 | 158 663 527 171 | 159 901 693 172 | 160 254 640 173 | 161 726 813 174 | 162 253 708 175 | 163 269 730 176 | 164 823 519 177 | 165 586 689 178 | 166 739 421 179 | 167 706 519 180 | 168 726 423 181 | 169 614 525 182 | 170 239 690 183 | 171 643 328 184 | 172 793 426 185 | 173 221 731 186 | 174 290 732 187 | 175 709 310 188 | 176 654 492 189 | 177 745 370 190 | 178 459 639 191 | 179 618 570 192 | 180 613 528 193 | 181 808 359 194 | 182 652 434 195 | 183 258 637 196 | 184 722 421 197 | 185 837 321 198 | 186 68 544 199 | 187 191 686 200 | 188 535 578 201 | 189 242 624 202 | 190 371 387 203 | 191 835 757 204 | 192 671 445 205 | 193 764 425 206 | 194 771 480 207 | 195 242 763 208 | 196 670 520 209 | 197 580 482 210 | 198 292 823 211 | 199 547 443 212 | 200 807 780 213 | 201 520 622 214 | 202 797 356 215 | 203 555 484 216 | 204 747 340 217 | 205 228 846 218 | 206 760 446 219 | 207 734 451 220 | 208 604 277 221 | 209 790 405 222 | 210 680 445 223 | 211 741 460 224 | 212 244 758 225 | 213 632 536 226 | 214 600 503 227 | 215 562 518 228 | 216 672 398 229 | 217 620 425 230 | 218 852 489 231 | 219 577 553 232 | 220 235 755 233 | 221 879 359 234 | 222 187 725 235 | 223 724 328 236 | 224 775 451 237 | 225 283 660 238 | 226 195 572 239 | 227 830 457 240 | 228 205 739 241 | 229 733 341 242 | 230 884 418 243 | 231 434 452 244 | 232 716 458 245 | 233 495 573 246 | 234 579 545 247 | 235 228 725 248 | 236 604 417 249 | 237 806 347 250 | 238 420 730 251 | 239 626 499 252 | 240 555 449 253 | 241 326 598 254 | 242 551 554 255 | 243 177 983 256 | 244 794 430 257 | 245 771 573 258 | 246 135 683 259 | 247 487 291 260 | 248 239 703 261 | 249 789 477 262 | 250 273 752 263 | 251 521 478 264 | 252 677 456 265 | 253 505 327 266 | 254 453 744 267 | 255 321 753 268 | 256 509 497 269 | 257 749 451 270 | 258 633 815 271 | 259 796 429 272 | 260 341 677 273 | 261 797 485 274 | 262 571 649 275 | 263 276 631 276 | 264 857 439 277 | 265 587 776 278 | 266 750 412 279 | 267 752 393 280 | 268 338 657 281 | 269 206 651 282 | 270 170 716 283 | 271 831 441 284 | 272 104 694 285 | 273 809 569 286 | 274 591 407 287 | 275 605 549 288 | 276 201 625 289 | 277 300 676 290 | 278 548 478 291 | 279 637 450 292 | 280 706 463 293 | 281 788 583 294 | 282 611 574 295 | 283 176 761 296 | 284 404 508 297 | 285 798 573 298 | 286 614 415 299 | 287 257 707 300 | 288 780 394 301 | 289 729 472 302 | 290 547 462 303 | 291 379 817 304 | 292 539 556 305 | 293 498 909 306 | 294 275 706 307 | 295 726 426 308 | 296 269 637 309 | 297 780 439 310 | 298 724 478 311 | 299 832 405 312 | 300 229 700 313 | 301 223 692 314 | 302 512 428 315 | 303 623 445 316 | 304 763 481 317 | 305 817 463 318 | 306 755 418 319 | 307 655 522 320 | 308 720 471 321 | 309 286 645 322 | 310 320 745 323 | 311 111 606 324 | 312 289 737 325 | 313 636 260 326 | 314 184 680 327 | 315 679 590 328 | 316 256 618 329 | 317 200 671 330 | 318 264 677 331 | 319 326 681 332 | 320 102 640 333 | 321 229 729 334 | 322 553 266 335 | 323 519 526 336 | 324 692 552 337 | 325 709 509 338 | 326 547 655 339 | 327 794 421 340 | 328 189 728 341 | 329 565 676 342 | 330 326 462 343 | 331 687 334 344 | 332 298 705 345 | 333 582 478 346 | 334 737 579 347 | 335 458 895 348 | 336 663 391 349 | 337 394 639 350 | 338 352 782 351 | 339 621 303 352 | 340 268 629 353 | 341 440 831 354 | 342 748 593 355 | 343 400 547 356 | 344 268 721 357 | 345 226 646 358 | 346 578 616 359 | 347 648 377 360 | 348 446 574 361 | 349 502 571 362 | 350 574 593 363 | 351 459 466 364 | 352 150 832 365 | 353 165 462 366 | 354 254 622 367 | 355 435 789 368 | 356 464 443 369 | 357 656 556 370 | 358 702 287 371 | 359 752 719 372 | 360 925 468 373 | DEMAND_SECTION 374 | 1 0 375 | 2 43 376 | 3 82 377 | 4 57 378 | 5 51 379 | 6 29 380 | 7 55 381 | 8 71 382 | 9 35 383 | 10 28 384 | 11 36 385 | 12 18 386 | 13 42 387 | 14 79 388 | 15 88 389 | 16 68 390 | 17 99 391 | 18 10 392 | 19 11 393 | 20 77 394 | 21 68 395 | 22 44 396 | 23 17 397 | 24 60 398 | 25 33 399 | 26 30 400 | 27 37 401 | 28 87 402 | 29 18 403 | 30 6 404 | 31 42 405 | 32 1 406 | 33 22 407 | 34 78 408 | 35 94 409 | 36 65 410 | 37 88 411 | 38 28 412 | 39 29 413 | 40 34 414 | 41 87 415 | 42 47 416 | 43 53 417 | 44 44 418 | 45 34 419 | 46 94 420 | 47 70 421 | 48 41 422 | 49 28 423 | 50 80 424 | 51 32 425 | 52 20 426 | 53 16 427 | 54 70 428 | 55 22 429 | 56 96 430 | 57 81 431 | 58 23 432 | 59 46 433 | 60 2 434 | 61 56 435 | 62 45 436 | 63 66 437 | 64 7 438 | 65 64 439 | 66 73 440 | 67 51 441 | 68 64 442 | 69 81 443 | 70 86 444 | 71 52 445 | 72 76 446 | 73 26 447 | 74 30 448 | 75 3 449 | 76 95 450 | 77 75 451 | 78 85 452 | 79 50 453 | 80 41 454 | 81 1 455 | 82 42 456 | 83 1 457 | 84 47 458 | 85 34 459 | 86 13 460 | 87 1 461 | 88 31 462 | 89 56 463 | 90 63 464 | 91 39 465 | 92 87 466 | 93 8 467 | 94 67 468 | 95 66 469 | 96 11 470 | 97 38 471 | 98 94 472 | 99 57 473 | 100 43 474 | 101 56 475 | 102 18 476 | 103 77 477 | 104 39 478 | 105 30 479 | 106 42 480 | 107 90 481 | 108 62 482 | 109 95 483 | 110 66 484 | 111 84 485 | 112 9 486 | 113 96 487 | 114 63 488 | 115 19 489 | 116 51 490 | 117 50 491 | 118 89 492 | 119 9 493 | 120 6 494 | 121 34 495 | 122 15 496 | 123 20 497 | 124 33 498 | 125 3 499 | 126 87 500 | 127 96 501 | 128 53 502 | 129 24 503 | 130 7 504 | 131 13 505 | 132 94 506 | 133 44 507 | 134 40 508 | 135 56 509 | 136 62 510 | 137 78 511 | 138 50 512 | 139 16 513 | 140 35 514 | 141 21 515 | 142 54 516 | 143 22 517 | 144 85 518 | 145 92 519 | 146 8 520 | 147 90 521 | 148 21 522 | 149 91 523 | 150 12 524 | 151 98 525 | 152 62 526 | 153 95 527 | 154 45 528 | 155 92 529 | 156 30 530 | 157 67 531 | 158 21 532 | 159 8 533 | 160 73 534 | 161 99 535 | 162 76 536 | 163 25 537 | 164 6 538 | 165 71 539 | 166 68 540 | 167 43 541 | 168 86 542 | 169 46 543 | 170 19 544 | 171 85 545 | 172 5 546 | 173 82 547 | 174 64 548 | 175 20 549 | 176 9 550 | 177 66 551 | 178 43 552 | 179 17 553 | 180 48 554 | 181 86 555 | 182 98 556 | 183 22 557 | 184 39 558 | 185 16 559 | 186 18 560 | 187 59 561 | 188 70 562 | 189 30 563 | 190 86 564 | 191 54 565 | 192 12 566 | 193 41 567 | 194 67 568 | 195 93 569 | 196 70 570 | 197 66 571 | 198 17 572 | 199 92 573 | 200 52 574 | 201 15 575 | 202 13 576 | 203 100 577 | 204 62 578 | 205 4 579 | 206 12 580 | 207 30 581 | 208 23 582 | 209 96 583 | 210 32 584 | 211 3 585 | 212 22 586 | 213 63 587 | 214 64 588 | 215 33 589 | 216 79 590 | 217 76 591 | 218 1 592 | 219 23 593 | 220 42 594 | 221 20 595 | 222 96 596 | 223 90 597 | 224 11 598 | 225 29 599 | 226 47 600 | 227 23 601 | 228 78 602 | 229 57 603 | 230 4 604 | 231 54 605 | 232 1 606 | 233 61 607 | 234 100 608 | 235 64 609 | 236 98 610 | 237 18 611 | 238 13 612 | 239 4 613 | 240 68 614 | 241 62 615 | 242 43 616 | 243 52 617 | 244 35 618 | 245 51 619 | 246 25 620 | 247 86 621 | 248 22 622 | 249 53 623 | 250 58 624 | 251 87 625 | 252 39 626 | 253 64 627 | 254 67 628 | 255 66 629 | 256 11 630 | 257 41 631 | 258 80 632 | 259 16 633 | 260 19 634 | 261 72 635 | 262 42 636 | 263 84 637 | 264 72 638 | 265 63 639 | 266 45 640 | 267 80 641 | 268 2 642 | 269 49 643 | 270 83 644 | 271 96 645 | 272 83 646 | 273 40 647 | 274 40 648 | 275 65 649 | 276 77 650 | 277 76 651 | 278 96 652 | 279 31 653 | 280 7 654 | 281 25 655 | 282 56 656 | 283 55 657 | 284 49 658 | 285 91 659 | 286 14 660 | 287 38 661 | 288 51 662 | 289 55 663 | 290 33 664 | 291 76 665 | 292 84 666 | 293 40 667 | 294 49 668 | 295 34 669 | 296 7 670 | 297 99 671 | 298 13 672 | 299 51 673 | 300 65 674 | 301 28 675 | 302 38 676 | 303 60 677 | 304 9 678 | 305 9 679 | 306 90 680 | 307 48 681 | 308 39 682 | 309 68 683 | 310 93 684 | 311 24 685 | 312 77 686 | 313 69 687 | 314 60 688 | 315 30 689 | 316 64 690 | 317 28 691 | 318 55 692 | 319 57 693 | 320 73 694 | 321 48 695 | 322 70 696 | 323 6 697 | 324 64 698 | 325 88 699 | 326 40 700 | 327 58 701 | 328 47 702 | 329 47 703 | 330 69 704 | 331 80 705 | 332 79 706 | 333 82 707 | 334 93 708 | 335 48 709 | 336 87 710 | 337 47 711 | 338 57 712 | 339 1 713 | 340 10 714 | 341 54 715 | 342 31 716 | 343 17 717 | 344 72 718 | 345 65 719 | 346 36 720 | 347 14 721 | 348 74 722 | 349 5 723 | 350 3 724 | 351 77 725 | STATIONS_COORD_SECTION 726 | 352 727 | 353 728 | 354 729 | 355 730 | 356 731 | 357 732 | 358 733 | 359 734 | 360 735 | DEPOT_SECTION 736 | 1 737 | -1 738 | EOF 739 | -------------------------------------------------------------------------------- /benchmarks/evrp-2019/X-n351-k40.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of X-n351-k40 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 0 5 | VEHICLES: 40 6 | DIMENSION: 386 7 | STATIONS: 35 8 | CAPACITY: 436 9 | ENERGY_CAPACITY: 649 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 500 500 14 | 2 740 442 15 | 3 261 710 16 | 4 578 522 17 | 5 562 509 18 | 6 795 425 19 | 7 636 463 20 | 8 645 617 21 | 9 595 524 22 | 10 649 599 23 | 11 745 252 24 | 12 180 757 25 | 13 590 598 26 | 14 332 775 27 | 15 544 551 28 | 16 1000 444 29 | 17 581 521 30 | 18 240 609 31 | 19 700 468 32 | 20 735 579 33 | 21 403 569 34 | 22 352 905 35 | 23 733 352 36 | 24 289 705 37 | 25 598 249 38 | 26 565 570 39 | 27 711 336 40 | 28 816 497 41 | 29 769 411 42 | 30 409 651 43 | 31 231 742 44 | 32 575 555 45 | 33 567 477 46 | 34 693 537 47 | 35 521 534 48 | 36 457 414 49 | 37 826 450 50 | 38 638 617 51 | 39 245 744 52 | 40 235 859 53 | 41 233 821 54 | 42 863 455 55 | 43 739 480 56 | 44 311 717 57 | 45 567 373 58 | 46 753 427 59 | 47 547 493 60 | 48 732 382 61 | 49 664 511 62 | 50 945 316 63 | 51 250 770 64 | 52 598 493 65 | 53 262 653 66 | 54 568 558 67 | 55 877 808 68 | 56 395 796 69 | 57 467 732 70 | 58 685 327 71 | 59 260 910 72 | 60 571 648 73 | 61 747 398 74 | 62 571 650 75 | 63 541 442 76 | 64 841 466 77 | 65 744 725 78 | 66 662 349 79 | 67 686 543 80 | 68 184 776 81 | 69 177 770 82 | 70 664 559 83 | 71 802 446 84 | 72 110 559 85 | 73 662 566 86 | 74 605 544 87 | 75 287 671 88 | 76 556 738 89 | 77 615 511 90 | 78 293 693 91 | 79 375 671 92 | 80 383 614 93 | 81 834 417 94 | 82 704 397 95 | 83 255 696 96 | 84 708 388 97 | 85 799 172 98 | 86 298 531 99 | 87 740 456 100 | 88 661 582 101 | 89 664 398 102 | 90 659 461 103 | 91 630 290 104 | 92 267 721 105 | 93 682 474 106 | 94 269 639 107 | 95 577 361 108 | 96 540 550 109 | 97 370 733 110 | 98 546 587 111 | 99 708 412 112 | 100 724 572 113 | 101 416 688 114 | 102 544 794 115 | 103 714 478 116 | 104 916 502 117 | 105 313 770 118 | 106 464 361 119 | 107 356 921 120 | 108 776 470 121 | 109 477 721 122 | 110 733 447 123 | 111 724 495 124 | 112 272 792 125 | 113 491 471 126 | 114 348 505 127 | 115 168 309 128 | 116 595 628 129 | 117 227 720 130 | 118 781 585 131 | 119 228 680 132 | 120 807 595 133 | 121 582 503 134 | 122 327 603 135 | 123 505 586 136 | 124 235 788 137 | 125 135 677 138 | 126 716 440 139 | 127 221 678 140 | 128 633 421 141 | 129 826 476 142 | 130 879 350 143 | 131 738 475 144 | 132 676 446 145 | 133 388 669 146 | 134 465 690 147 | 135 543 422 148 | 136 675 544 149 | 137 770 613 150 | 138 309 590 151 | 139 434 594 152 | 140 647 551 153 | 141 468 405 154 | 142 0 863 155 | 143 663 582 156 | 144 209 755 157 | 145 966 516 158 | 146 580 593 159 | 147 221 558 160 | 148 230 594 161 | 149 329 768 162 | 150 786 523 163 | 151 636 512 164 | 152 704 474 165 | 153 819 376 166 | 154 516 472 167 | 155 724 505 168 | 156 565 501 169 | 157 404 589 170 | 158 663 527 171 | 159 901 693 172 | 160 254 640 173 | 161 726 813 174 | 162 253 708 175 | 163 269 730 176 | 164 823 519 177 | 165 586 689 178 | 166 739 421 179 | 167 706 519 180 | 168 726 423 181 | 169 614 525 182 | 170 239 690 183 | 171 643 328 184 | 172 793 426 185 | 173 221 731 186 | 174 290 732 187 | 175 709 310 188 | 176 654 492 189 | 177 745 370 190 | 178 459 639 191 | 179 618 570 192 | 180 613 528 193 | 181 808 359 194 | 182 652 434 195 | 183 258 637 196 | 184 722 421 197 | 185 837 321 198 | 186 68 544 199 | 187 191 686 200 | 188 535 578 201 | 189 242 624 202 | 190 371 387 203 | 191 835 757 204 | 192 671 445 205 | 193 764 425 206 | 194 771 480 207 | 195 242 763 208 | 196 670 520 209 | 197 580 482 210 | 198 292 823 211 | 199 547 443 212 | 200 807 780 213 | 201 520 622 214 | 202 797 356 215 | 203 555 484 216 | 204 747 340 217 | 205 228 846 218 | 206 760 446 219 | 207 734 451 220 | 208 604 277 221 | 209 790 405 222 | 210 680 445 223 | 211 741 460 224 | 212 244 758 225 | 213 632 536 226 | 214 600 503 227 | 215 562 518 228 | 216 672 398 229 | 217 620 425 230 | 218 852 489 231 | 219 577 553 232 | 220 235 755 233 | 221 879 359 234 | 222 187 725 235 | 223 724 328 236 | 224 775 451 237 | 225 283 660 238 | 226 195 572 239 | 227 830 457 240 | 228 205 739 241 | 229 733 341 242 | 230 884 418 243 | 231 434 452 244 | 232 716 458 245 | 233 495 573 246 | 234 579 545 247 | 235 228 725 248 | 236 604 417 249 | 237 806 347 250 | 238 420 730 251 | 239 626 499 252 | 240 555 449 253 | 241 326 598 254 | 242 551 554 255 | 243 177 983 256 | 244 794 430 257 | 245 771 573 258 | 246 135 683 259 | 247 487 291 260 | 248 239 703 261 | 249 789 477 262 | 250 273 752 263 | 251 521 478 264 | 252 677 456 265 | 253 505 327 266 | 254 453 744 267 | 255 321 753 268 | 256 509 497 269 | 257 749 451 270 | 258 633 815 271 | 259 796 429 272 | 260 341 677 273 | 261 797 485 274 | 262 571 649 275 | 263 276 631 276 | 264 857 439 277 | 265 587 776 278 | 266 750 412 279 | 267 752 393 280 | 268 338 657 281 | 269 206 651 282 | 270 170 716 283 | 271 831 441 284 | 272 104 694 285 | 273 809 569 286 | 274 591 407 287 | 275 605 549 288 | 276 201 625 289 | 277 300 676 290 | 278 548 478 291 | 279 637 450 292 | 280 706 463 293 | 281 788 583 294 | 282 611 574 295 | 283 176 761 296 | 284 404 508 297 | 285 798 573 298 | 286 614 415 299 | 287 257 707 300 | 288 780 394 301 | 289 729 472 302 | 290 547 462 303 | 291 379 817 304 | 292 539 556 305 | 293 498 909 306 | 294 275 706 307 | 295 726 426 308 | 296 269 637 309 | 297 780 439 310 | 298 724 478 311 | 299 832 405 312 | 300 229 700 313 | 301 223 692 314 | 302 512 428 315 | 303 623 445 316 | 304 763 481 317 | 305 817 463 318 | 306 755 418 319 | 307 655 522 320 | 308 720 471 321 | 309 286 645 322 | 310 320 745 323 | 311 111 606 324 | 312 289 737 325 | 313 636 260 326 | 314 184 680 327 | 315 679 590 328 | 316 256 618 329 | 317 200 671 330 | 318 264 677 331 | 319 326 681 332 | 320 102 640 333 | 321 229 729 334 | 322 553 266 335 | 323 519 526 336 | 324 692 552 337 | 325 709 509 338 | 326 547 655 339 | 327 794 421 340 | 328 189 728 341 | 329 565 676 342 | 330 326 462 343 | 331 687 334 344 | 332 298 705 345 | 333 582 478 346 | 334 737 579 347 | 335 458 895 348 | 336 663 391 349 | 337 394 639 350 | 338 352 782 351 | 339 621 303 352 | 340 268 629 353 | 341 440 831 354 | 342 748 593 355 | 343 400 547 356 | 344 268 721 357 | 345 226 646 358 | 346 578 616 359 | 347 648 377 360 | 348 446 574 361 | 349 502 571 362 | 350 574 593 363 | 351 459 466 364 | 352 72 254 365 | 353 72 416 366 | 354 72 578 367 | 355 72 740 368 | 356 72 902 369 | 357 215 254 370 | 358 215 416 371 | 359 215 578 372 | 360 215 740 373 | 361 215 902 374 | 362 358 254 375 | 363 358 416 376 | 364 358 578 377 | 365 358 740 378 | 366 358 902 379 | 367 500 254 380 | 368 500 416 381 | 369 500 578 382 | 370 500 740 383 | 371 500 902 384 | 372 643 254 385 | 373 643 416 386 | 374 643 578 387 | 375 643 740 388 | 376 643 902 389 | 377 786 254 390 | 378 786 416 391 | 379 786 578 392 | 380 786 740 393 | 381 786 902 394 | 382 929 254 395 | 383 929 416 396 | 384 929 578 397 | 385 929 740 398 | 386 929 902 399 | DEMAND_SECTION 400 | 1 0 401 | 2 43 402 | 3 82 403 | 4 57 404 | 5 51 405 | 6 29 406 | 7 55 407 | 8 71 408 | 9 35 409 | 10 28 410 | 11 36 411 | 12 18 412 | 13 42 413 | 14 79 414 | 15 88 415 | 16 68 416 | 17 99 417 | 18 10 418 | 19 11 419 | 20 77 420 | 21 68 421 | 22 44 422 | 23 17 423 | 24 60 424 | 25 33 425 | 26 30 426 | 27 37 427 | 28 87 428 | 29 18 429 | 30 6 430 | 31 42 431 | 32 1 432 | 33 22 433 | 34 78 434 | 35 94 435 | 36 65 436 | 37 88 437 | 38 28 438 | 39 29 439 | 40 34 440 | 41 87 441 | 42 47 442 | 43 53 443 | 44 44 444 | 45 34 445 | 46 94 446 | 47 70 447 | 48 41 448 | 49 28 449 | 50 80 450 | 51 32 451 | 52 20 452 | 53 16 453 | 54 70 454 | 55 22 455 | 56 96 456 | 57 81 457 | 58 23 458 | 59 46 459 | 60 2 460 | 61 56 461 | 62 45 462 | 63 66 463 | 64 7 464 | 65 64 465 | 66 73 466 | 67 51 467 | 68 64 468 | 69 81 469 | 70 86 470 | 71 52 471 | 72 76 472 | 73 26 473 | 74 30 474 | 75 3 475 | 76 95 476 | 77 75 477 | 78 85 478 | 79 50 479 | 80 41 480 | 81 1 481 | 82 42 482 | 83 1 483 | 84 47 484 | 85 34 485 | 86 13 486 | 87 1 487 | 88 31 488 | 89 56 489 | 90 63 490 | 91 39 491 | 92 87 492 | 93 8 493 | 94 67 494 | 95 66 495 | 96 11 496 | 97 38 497 | 98 94 498 | 99 57 499 | 100 43 500 | 101 56 501 | 102 18 502 | 103 77 503 | 104 39 504 | 105 30 505 | 106 42 506 | 107 90 507 | 108 62 508 | 109 95 509 | 110 66 510 | 111 84 511 | 112 9 512 | 113 96 513 | 114 63 514 | 115 19 515 | 116 51 516 | 117 50 517 | 118 89 518 | 119 9 519 | 120 6 520 | 121 34 521 | 122 15 522 | 123 20 523 | 124 33 524 | 125 3 525 | 126 87 526 | 127 96 527 | 128 53 528 | 129 24 529 | 130 7 530 | 131 13 531 | 132 94 532 | 133 44 533 | 134 40 534 | 135 56 535 | 136 62 536 | 137 78 537 | 138 50 538 | 139 16 539 | 140 35 540 | 141 21 541 | 142 54 542 | 143 22 543 | 144 85 544 | 145 92 545 | 146 8 546 | 147 90 547 | 148 21 548 | 149 91 549 | 150 12 550 | 151 98 551 | 152 62 552 | 153 95 553 | 154 45 554 | 155 92 555 | 156 30 556 | 157 67 557 | 158 21 558 | 159 8 559 | 160 73 560 | 161 99 561 | 162 76 562 | 163 25 563 | 164 6 564 | 165 71 565 | 166 68 566 | 167 43 567 | 168 86 568 | 169 46 569 | 170 19 570 | 171 85 571 | 172 5 572 | 173 82 573 | 174 64 574 | 175 20 575 | 176 9 576 | 177 66 577 | 178 43 578 | 179 17 579 | 180 48 580 | 181 86 581 | 182 98 582 | 183 22 583 | 184 39 584 | 185 16 585 | 186 18 586 | 187 59 587 | 188 70 588 | 189 30 589 | 190 86 590 | 191 54 591 | 192 12 592 | 193 41 593 | 194 67 594 | 195 93 595 | 196 70 596 | 197 66 597 | 198 17 598 | 199 92 599 | 200 52 600 | 201 15 601 | 202 13 602 | 203 100 603 | 204 62 604 | 205 4 605 | 206 12 606 | 207 30 607 | 208 23 608 | 209 96 609 | 210 32 610 | 211 3 611 | 212 22 612 | 213 63 613 | 214 64 614 | 215 33 615 | 216 79 616 | 217 76 617 | 218 1 618 | 219 23 619 | 220 42 620 | 221 20 621 | 222 96 622 | 223 90 623 | 224 11 624 | 225 29 625 | 226 47 626 | 227 23 627 | 228 78 628 | 229 57 629 | 230 4 630 | 231 54 631 | 232 1 632 | 233 61 633 | 234 100 634 | 235 64 635 | 236 98 636 | 237 18 637 | 238 13 638 | 239 4 639 | 240 68 640 | 241 62 641 | 242 43 642 | 243 52 643 | 244 35 644 | 245 51 645 | 246 25 646 | 247 86 647 | 248 22 648 | 249 53 649 | 250 58 650 | 251 87 651 | 252 39 652 | 253 64 653 | 254 67 654 | 255 66 655 | 256 11 656 | 257 41 657 | 258 80 658 | 259 16 659 | 260 19 660 | 261 72 661 | 262 42 662 | 263 84 663 | 264 72 664 | 265 63 665 | 266 45 666 | 267 80 667 | 268 2 668 | 269 49 669 | 270 83 670 | 271 96 671 | 272 83 672 | 273 40 673 | 274 40 674 | 275 65 675 | 276 77 676 | 277 76 677 | 278 96 678 | 279 31 679 | 280 7 680 | 281 25 681 | 282 56 682 | 283 55 683 | 284 49 684 | 285 91 685 | 286 14 686 | 287 38 687 | 288 51 688 | 289 55 689 | 290 33 690 | 291 76 691 | 292 84 692 | 293 40 693 | 294 49 694 | 295 34 695 | 296 7 696 | 297 99 697 | 298 13 698 | 299 51 699 | 300 65 700 | 301 28 701 | 302 38 702 | 303 60 703 | 304 9 704 | 305 9 705 | 306 90 706 | 307 48 707 | 308 39 708 | 309 68 709 | 310 93 710 | 311 24 711 | 312 77 712 | 313 69 713 | 314 60 714 | 315 30 715 | 316 64 716 | 317 28 717 | 318 55 718 | 319 57 719 | 320 73 720 | 321 48 721 | 322 70 722 | 323 6 723 | 324 64 724 | 325 88 725 | 326 40 726 | 327 58 727 | 328 47 728 | 329 47 729 | 330 69 730 | 331 80 731 | 332 79 732 | 333 82 733 | 334 93 734 | 335 48 735 | 336 87 736 | 337 47 737 | 338 57 738 | 339 1 739 | 340 10 740 | 341 54 741 | 342 31 742 | 343 17 743 | 344 72 744 | 345 65 745 | 346 36 746 | 347 14 747 | 348 74 748 | 349 5 749 | 350 3 750 | 351 77 751 | STATIONS_COORD_SECTION 752 | 352 753 | 353 754 | 354 755 | 355 756 | 356 757 | 357 758 | 358 759 | 359 760 | 360 761 | 361 762 | 362 763 | 363 764 | 364 765 | 365 766 | 366 767 | 367 768 | 368 769 | 369 770 | 370 771 | 371 772 | 372 773 | 373 774 | 374 775 | 375 776 | 376 777 | 377 778 | 378 779 | 379 780 | 380 781 | 381 782 | 382 783 | 383 784 | 384 785 | 385 786 | 386 787 | DEPOT_SECTION 788 | 1 789 | -1 790 | EOF -------------------------------------------------------------------------------- /benchmarks/evrp-2022/X-n469-k26-s10.evrp: -------------------------------------------------------------------------------- 1 | NAME: X-n469-k26-s10.evrp 2 | COMMENT: Modificatification of X-n459-k26 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 26 6 | DIMENSION: 469 7 | STATIONS: 10 8 | CAPACITY: 1106 9 | ENERGY_CAPACITY: 1230 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 500 500 14 | 2 832 885 15 | 3 777 632 16 | 4 406 257 17 | 5 620 467 18 | 6 343 166 19 | 7 355 345 20 | 8 393 299 21 | 9 631 767 22 | 10 384 340 23 | 11 643 630 24 | 12 786 593 25 | 13 789 727 26 | 14 443 205 27 | 15 679 408 28 | 16 845 535 29 | 17 732 820 30 | 18 890 861 31 | 19 645 689 32 | 20 800 517 33 | 21 951 643 34 | 22 828 746 35 | 23 862 625 36 | 24 606 432 37 | 25 672 984 38 | 26 580 338 39 | 27 629 494 40 | 28 809 663 41 | 29 738 595 42 | 30 604 320 43 | 31 645 532 44 | 32 688 728 45 | 33 390 680 46 | 34 842 517 47 | 35 525 404 48 | 36 697 719 49 | 37 837 853 50 | 38 741 585 51 | 39 628 506 52 | 40 354 280 53 | 41 726 834 54 | 42 721 635 55 | 43 448 363 56 | 44 963 702 57 | 45 570 484 58 | 46 389 281 59 | 47 708 380 60 | 48 522 439 61 | 49 771 523 62 | 50 778 645 63 | 51 402 318 64 | 52 817 717 65 | 53 730 655 66 | 54 814 925 67 | 55 743 362 68 | 56 568 298 69 | 57 555 132 70 | 58 937 637 71 | 59 542 678 72 | 60 822 854 73 | 61 711 697 74 | 62 603 310 75 | 63 864 674 76 | 64 850 879 77 | 65 280 198 78 | 66 502 417 79 | 67 764 610 80 | 68 729 822 81 | 69 307 258 82 | 70 896 958 83 | 71 774 732 84 | 72 684 446 85 | 73 691 793 86 | 74 905 888 87 | 75 664 411 88 | 76 875 981 89 | 77 477 226 90 | 78 607 624 91 | 79 823 875 92 | 80 558 543 93 | 81 410 237 94 | 82 712 692 95 | 83 804 678 96 | 84 491 317 97 | 85 475 280 98 | 86 881 872 99 | 87 371 269 100 | 88 520 562 101 | 89 590 431 102 | 90 420 245 103 | 91 811 647 104 | 92 501 507 105 | 93 684 647 106 | 94 739 969 107 | 95 854 717 108 | 96 844 268 109 | 97 520 823 110 | 98 866 966 111 | 99 720 645 112 | 100 564 493 113 | 101 653 541 114 | 102 831 758 115 | 103 694 804 116 | 104 661 469 117 | 105 417 251 118 | 106 683 364 119 | 107 648 479 120 | 108 255 225 121 | 109 836 934 122 | 110 811 960 123 | 111 888 492 124 | 112 111 261 125 | 113 866 827 126 | 114 822 876 127 | 115 672 419 128 | 116 750 974 129 | 117 545 420 130 | 118 140 267 131 | 119 925 749 132 | 120 505 282 133 | 121 701 477 134 | 122 427 272 135 | 123 293 242 136 | 124 757 929 137 | 125 856 861 138 | 126 848 809 139 | 127 331 214 140 | 128 682 480 141 | 129 804 638 142 | 130 349 234 143 | 131 426 194 144 | 132 499 348 145 | 133 692 700 146 | 134 331 318 147 | 135 738 644 148 | 136 967 900 149 | 137 604 563 150 | 138 701 540 151 | 139 523 429 152 | 140 834 880 153 | 141 714 644 154 | 142 369 222 155 | 143 720 566 156 | 144 606 512 157 | 145 840 926 158 | 146 786 354 159 | 147 667 709 160 | 148 670 508 161 | 149 456 202 162 | 150 827 687 163 | 151 871 800 164 | 152 556 837 165 | 153 810 589 166 | 154 537 360 167 | 155 456 275 168 | 156 688 214 169 | 157 346 163 170 | 158 880 569 171 | 159 360 215 172 | 160 849 686 173 | 161 617 420 174 | 162 308 466 175 | 163 734 534 176 | 164 880 638 177 | 165 751 763 178 | 166 616 485 179 | 167 719 744 180 | 168 371 346 181 | 169 379 420 182 | 170 565 524 183 | 171 377 138 184 | 172 864 721 185 | 173 823 535 186 | 174 367 218 187 | 175 614 761 188 | 176 659 383 189 | 177 867 910 190 | 178 717 895 191 | 179 865 793 192 | 180 588 663 193 | 181 595 488 194 | 182 408 268 195 | 183 713 863 196 | 184 652 409 197 | 185 920 394 198 | 186 819 367 199 | 187 653 425 200 | 188 618 425 201 | 189 657 290 202 | 190 709 839 203 | 191 739 541 204 | 192 909 732 205 | 193 373 218 206 | 194 375 283 207 | 195 278 391 208 | 196 843 873 209 | 197 443 229 210 | 198 756 702 211 | 199 365 293 212 | 200 821 637 213 | 201 477 191 214 | 202 401 102 215 | 203 359 290 216 | 204 791 751 217 | 205 938 787 218 | 206 709 469 219 | 207 329 178 220 | 208 559 543 221 | 209 916 882 222 | 210 758 635 223 | 211 855 710 224 | 212 797 783 225 | 213 428 238 226 | 214 802 823 227 | 215 730 542 228 | 216 797 464 229 | 217 217 29 230 | 218 939 745 231 | 219 911 889 232 | 220 829 679 233 | 221 678 523 234 | 222 709 224 235 | 223 550 429 236 | 224 821 933 237 | 225 798 482 238 | 226 686 615 239 | 227 735 658 240 | 228 728 531 241 | 229 736 452 242 | 230 721 459 243 | 231 818 377 244 | 232 421 479 245 | 233 768 524 246 | 234 498 441 247 | 235 601 454 248 | 236 851 574 249 | 237 662 511 250 | 238 526 279 251 | 239 447 601 252 | 240 889 610 253 | 241 891 930 254 | 242 483 278 255 | 243 728 845 256 | 244 451 299 257 | 245 308 215 258 | 246 643 486 259 | 247 758 963 260 | 248 439 458 261 | 249 830 608 262 | 250 387 233 263 | 251 837 948 264 | 252 561 410 265 | 253 721 439 266 | 254 778 640 267 | 255 826 627 268 | 256 644 724 269 | 257 515 465 270 | 258 728 651 271 | 259 666 474 272 | 260 759 94 273 | 261 525 419 274 | 262 927 692 275 | 263 597 228 276 | 264 448 218 277 | 265 575 349 278 | 266 921 883 279 | 267 406 172 280 | 268 840 847 281 | 269 787 660 282 | 270 301 545 283 | 271 668 880 284 | 272 594 416 285 | 273 791 861 286 | 274 740 581 287 | 275 438 272 288 | 276 500 259 289 | 277 600 464 290 | 278 965 412 291 | 279 614 568 292 | 280 829 644 293 | 281 556 518 294 | 282 660 676 295 | 283 525 793 296 | 284 623 482 297 | 285 369 195 298 | 286 805 668 299 | 287 820 936 300 | 288 879 886 301 | 289 713 679 302 | 290 728 597 303 | 291 833 719 304 | 292 720 473 305 | 293 744 569 306 | 294 739 539 307 | 295 644 446 308 | 296 896 850 309 | 297 393 284 310 | 298 708 586 311 | 299 694 612 312 | 300 446 162 313 | 301 383 213 314 | 302 738 669 315 | 303 726 702 316 | 304 749 641 317 | 305 499 397 318 | 306 335 416 319 | 307 828 951 320 | 308 634 368 321 | 309 720 559 322 | 310 428 272 323 | 311 664 226 324 | 312 772 626 325 | 313 602 466 326 | 314 592 394 327 | 315 627 408 328 | 316 754 637 329 | 317 643 572 330 | 318 699 167 331 | 319 880 867 332 | 320 493 305 333 | 321 698 630 334 | 322 819 640 335 | 323 819 577 336 | 324 860 866 337 | 325 303 326 338 | 326 523 470 339 | 327 780 647 340 | 328 630 579 341 | 329 893 578 342 | 330 545 465 343 | 331 782 723 344 | 332 639 609 345 | 333 313 267 346 | 334 810 893 347 | 335 407 307 348 | 336 808 666 349 | 337 621 427 350 | 338 841 943 351 | 339 761 602 352 | 340 513 340 353 | 341 335 150 354 | 342 807 564 355 | 343 715 936 356 | 344 818 834 357 | 345 881 870 358 | 346 300 679 359 | 347 628 402 360 | 348 697 551 361 | 349 342 373 362 | 350 819 859 363 | 351 830 955 364 | 352 651 493 365 | 353 378 248 366 | 354 675 424 367 | 355 700 76 368 | 356 398 303 369 | 357 890 373 370 | 358 799 623 371 | 359 812 806 372 | 360 770 860 373 | 361 776 711 374 | 362 661 839 375 | 363 829 895 376 | 364 392 227 377 | 365 891 565 378 | 366 569 489 379 | 367 824 716 380 | 368 827 436 381 | 369 380 217 382 | 370 527 376 383 | 371 838 855 384 | 372 537 432 385 | 373 468 195 386 | 374 714 807 387 | 375 553 104 388 | 376 448 331 389 | 377 846 863 390 | 378 815 689 391 | 379 639 332 392 | 380 748 365 393 | 381 577 442 394 | 382 572 461 395 | 383 431 304 396 | 384 731 688 397 | 385 415 256 398 | 386 933 687 399 | 387 461 392 400 | 388 827 906 401 | 389 786 737 402 | 390 825 375 403 | 391 583 513 404 | 392 793 632 405 | 393 540 374 406 | 394 604 445 407 | 395 303 293 408 | 396 802 534 409 | 397 443 308 410 | 398 298 118 411 | 399 500 353 412 | 400 818 892 413 | 401 487 444 414 | 402 744 657 415 | 403 701 547 416 | 404 297 237 417 | 405 660 436 418 | 406 580 450 419 | 407 591 411 420 | 408 877 905 421 | 409 377 314 422 | 410 868 819 423 | 411 750 857 424 | 412 643 336 425 | 413 770 609 426 | 414 873 547 427 | 415 746 949 428 | 416 771 418 429 | 417 736 788 430 | 418 676 521 431 | 419 934 919 432 | 420 673 493 433 | 421 817 914 434 | 422 493 28 435 | 423 322 227 436 | 424 746 617 437 | 425 754 950 438 | 426 523 296 439 | 427 675 488 440 | 428 860 848 441 | 429 466 251 442 | 430 772 307 443 | 431 396 235 444 | 432 796 976 445 | 433 792 646 446 | 434 417 267 447 | 435 871 536 448 | 436 285 205 449 | 437 474 257 450 | 438 854 648 451 | 439 602 262 452 | 440 950 821 453 | 441 698 633 454 | 442 760 957 455 | 443 418 292 456 | 444 690 602 457 | 445 669 683 458 | 446 565 562 459 | 447 832 811 460 | 448 797 722 461 | 449 594 646 462 | 450 597 358 463 | 451 944 834 464 | 452 776 610 465 | 453 719 441 466 | 454 832 908 467 | 455 702 378 468 | 456 604 494 469 | 457 757 832 470 | 458 647 400 471 | 459 601 706 472 | 460 262 282 473 | 461 357 90 474 | 462 381 553 475 | 463 499 219 476 | 464 604 431 477 | 465 628 715 478 | 466 704 228 479 | 467 744 967 480 | 468 856 515 481 | 469 878 777 482 | DEMAND_SECTION 483 | 1 0 484 | 2 71 485 | 3 54 486 | 4 74 487 | 5 9 488 | 6 91 489 | 7 98 490 | 8 72 491 | 9 67 492 | 10 70 493 | 11 68 494 | 12 92 495 | 13 93 496 | 14 97 497 | 15 23 498 | 16 75 499 | 17 61 500 | 18 91 501 | 19 61 502 | 20 89 503 | 21 70 504 | 22 63 505 | 23 93 506 | 24 18 507 | 25 65 508 | 26 33 509 | 27 11 510 | 28 80 511 | 29 88 512 | 30 7 513 | 31 71 514 | 32 68 515 | 33 38 516 | 34 79 517 | 35 28 518 | 36 63 519 | 37 99 520 | 38 99 521 | 39 94 522 | 40 69 523 | 41 78 524 | 42 76 525 | 43 90 526 | 44 57 527 | 45 29 528 | 46 82 529 | 47 42 530 | 48 18 531 | 49 58 532 | 50 89 533 | 51 85 534 | 52 66 535 | 53 57 536 | 54 75 537 | 55 1 538 | 56 49 539 | 57 8 540 | 58 51 541 | 59 67 542 | 60 58 543 | 61 66 544 | 62 13 545 | 63 69 546 | 64 85 547 | 65 53 548 | 66 30 549 | 67 67 550 | 68 79 551 | 69 79 552 | 70 90 553 | 71 81 554 | 72 33 555 | 73 80 556 | 74 78 557 | 75 6 558 | 76 93 559 | 77 60 560 | 78 60 561 | 79 83 562 | 80 97 563 | 81 76 564 | 82 60 565 | 83 94 566 | 84 59 567 | 85 72 568 | 86 58 569 | 87 59 570 | 88 97 571 | 89 11 572 | 90 70 573 | 91 90 574 | 92 54 575 | 93 73 576 | 94 61 577 | 95 52 578 | 96 46 579 | 97 77 580 | 98 60 581 | 99 100 582 | 100 10 583 | 101 100 584 | 102 76 585 | 103 67 586 | 104 45 587 | 105 84 588 | 106 14 589 | 107 49 590 | 108 61 591 | 109 97 592 | 110 55 593 | 111 9 594 | 112 52 595 | 113 99 596 | 114 83 597 | 115 26 598 | 116 85 599 | 117 43 600 | 118 74 601 | 119 98 602 | 120 28 603 | 121 5 604 | 122 66 605 | 123 71 606 | 124 58 607 | 125 90 608 | 126 75 609 | 127 59 610 | 128 3 611 | 129 95 612 | 130 62 613 | 131 54 614 | 132 78 615 | 133 93 616 | 134 54 617 | 135 57 618 | 136 100 619 | 137 89 620 | 138 72 621 | 139 19 622 | 140 55 623 | 141 81 624 | 142 86 625 | 143 64 626 | 144 87 627 | 145 97 628 | 146 7 629 | 147 75 630 | 148 76 631 | 149 98 632 | 150 68 633 | 151 67 634 | 152 59 635 | 153 76 636 | 154 27 637 | 155 67 638 | 156 50 639 | 157 72 640 | 158 91 641 | 159 54 642 | 160 54 643 | 161 11 644 | 162 55 645 | 163 62 646 | 164 89 647 | 165 61 648 | 166 19 649 | 167 79 650 | 168 71 651 | 169 56 652 | 170 75 653 | 171 97 654 | 172 51 655 | 173 93 656 | 174 54 657 | 175 93 658 | 176 47 659 | 177 95 660 | 178 67 661 | 179 77 662 | 180 93 663 | 181 26 664 | 182 82 665 | 183 78 666 | 184 17 667 | 185 29 668 | 186 25 669 | 187 22 670 | 188 22 671 | 189 4 672 | 190 100 673 | 191 71 674 | 192 93 675 | 193 84 676 | 194 51 677 | 195 94 678 | 196 74 679 | 197 59 680 | 198 62 681 | 199 81 682 | 200 73 683 | 201 91 684 | 202 98 685 | 203 56 686 | 204 92 687 | 205 95 688 | 206 20 689 | 207 99 690 | 208 53 691 | 209 74 692 | 210 75 693 | 211 63 694 | 212 86 695 | 213 53 696 | 214 62 697 | 215 93 698 | 216 29 699 | 217 73 700 | 218 99 701 | 219 74 702 | 220 69 703 | 221 51 704 | 222 29 705 | 223 10 706 | 224 56 707 | 225 33 708 | 226 92 709 | 227 90 710 | 228 58 711 | 229 15 712 | 230 3 713 | 231 20 714 | 232 59 715 | 233 98 716 | 234 91 717 | 235 14 718 | 236 53 719 | 237 52 720 | 238 37 721 | 239 47 722 | 240 79 723 | 241 92 724 | 242 90 725 | 243 54 726 | 244 95 727 | 245 66 728 | 246 2 729 | 247 80 730 | 248 74 731 | 249 62 732 | 250 70 733 | 251 75 734 | 252 11 735 | 253 9 736 | 254 99 737 | 255 63 738 | 256 89 739 | 257 6 740 | 258 90 741 | 259 29 742 | 260 18 743 | 261 16 744 | 262 97 745 | 263 6 746 | 264 100 747 | 265 46 748 | 266 85 749 | 267 95 750 | 268 78 751 | 269 83 752 | 270 45 753 | 271 53 754 | 272 34 755 | 273 89 756 | 274 87 757 | 275 92 758 | 276 24 759 | 277 38 760 | 278 39 761 | 279 85 762 | 280 81 763 | 281 73 764 | 282 51 765 | 283 62 766 | 284 49 767 | 285 67 768 | 286 73 769 | 287 73 770 | 288 91 771 | 289 82 772 | 290 57 773 | 291 77 774 | 292 48 775 | 293 71 776 | 294 83 777 | 295 15 778 | 296 54 779 | 297 73 780 | 298 80 781 | 299 77 782 | 300 65 783 | 301 51 784 | 302 67 785 | 303 96 786 | 304 53 787 | 305 94 788 | 306 73 789 | 307 78 790 | 308 37 791 | 309 97 792 | 310 64 793 | 311 23 794 | 312 55 795 | 313 30 796 | 314 43 797 | 315 35 798 | 316 76 799 | 317 65 800 | 318 9 801 | 319 68 802 | 320 60 803 | 321 57 804 | 322 97 805 | 323 63 806 | 324 51 807 | 325 65 808 | 326 46 809 | 327 70 810 | 328 63 811 | 329 86 812 | 330 15 813 | 331 90 814 | 332 62 815 | 333 62 816 | 334 56 817 | 335 63 818 | 336 93 819 | 337 31 820 | 338 90 821 | 339 58 822 | 340 10 823 | 341 100 824 | 342 67 825 | 343 78 826 | 344 94 827 | 345 91 828 | 346 11 829 | 347 19 830 | 348 52 831 | 349 52 832 | 350 54 833 | 351 87 834 | 352 41 835 | 353 77 836 | 354 21 837 | 355 37 838 | 356 61 839 | 357 32 840 | 358 86 841 | 359 67 842 | 360 59 843 | 361 53 844 | 362 82 845 | 363 55 846 | 364 63 847 | 365 62 848 | 366 25 849 | 367 59 850 | 368 24 851 | 369 65 852 | 370 22 853 | 371 90 854 | 372 7 855 | 373 67 856 | 374 86 857 | 375 19 858 | 376 93 859 | 377 80 860 | 378 63 861 | 379 34 862 | 380 1 863 | 381 14 864 | 382 1 865 | 383 87 866 | 384 63 867 | 385 55 868 | 386 94 869 | 387 59 870 | 388 62 871 | 389 71 872 | 390 37 873 | 391 79 874 | 392 83 875 | 393 50 876 | 394 46 877 | 395 76 878 | 396 65 879 | 397 95 880 | 398 71 881 | 399 21 882 | 400 100 883 | 401 66 884 | 402 97 885 | 403 80 886 | 404 100 887 | 405 34 888 | 406 5 889 | 407 32 890 | 408 76 891 | 409 78 892 | 410 94 893 | 411 53 894 | 412 36 895 | 413 73 896 | 414 85 897 | 415 55 898 | 416 31 899 | 417 66 900 | 418 98 901 | 419 94 902 | 420 1 903 | 421 60 904 | 422 93 905 | 423 67 906 | 424 85 907 | 425 76 908 | 426 16 909 | 427 32 910 | 428 76 911 | 429 65 912 | 430 8 913 | 431 68 914 | 432 54 915 | 433 58 916 | 434 92 917 | 435 64 918 | 436 85 919 | 437 66 920 | 438 64 921 | 439 4 922 | 440 57 923 | 441 73 924 | 442 88 925 | 443 89 926 | 444 72 927 | 445 73 928 | 446 89 929 | 447 74 930 | 448 56 931 | 449 79 932 | 450 41 933 | 451 62 934 | 452 59 935 | 453 28 936 | 454 72 937 | 455 31 938 | 456 45 939 | 457 80 940 | 458 48 941 | 459 99 942 | STATIONS_COORD_SECTION 943 | 460 944 | 461 945 | 462 946 | 463 947 | 464 948 | 465 949 | 466 950 | 467 951 | 468 952 | 469 953 | DEPOT_SECTION 954 | 1 955 | -1 956 | EOF 957 | -------------------------------------------------------------------------------- /benchmarks/evrp-2019/X-n459-k26.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of X-n459-k26 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 0 5 | VEHICLES: 26 6 | DIMENSION: 479 7 | STATIONS: 20 8 | CAPACITY: 1106 9 | ENERGY_CAPACITY: 929 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 500 500 14 | 2 832 885 15 | 3 777 632 16 | 4 406 257 17 | 5 620 467 18 | 6 343 166 19 | 7 355 345 20 | 8 393 299 21 | 9 631 767 22 | 10 384 340 23 | 11 643 630 24 | 12 786 593 25 | 13 789 727 26 | 14 443 205 27 | 15 679 408 28 | 16 845 535 29 | 17 732 820 30 | 18 890 861 31 | 19 645 689 32 | 20 800 517 33 | 21 951 643 34 | 22 828 746 35 | 23 862 625 36 | 24 606 432 37 | 25 672 984 38 | 26 580 338 39 | 27 629 494 40 | 28 809 663 41 | 29 738 595 42 | 30 604 320 43 | 31 645 532 44 | 32 688 728 45 | 33 390 680 46 | 34 842 517 47 | 35 525 404 48 | 36 697 719 49 | 37 837 853 50 | 38 741 585 51 | 39 628 506 52 | 40 354 280 53 | 41 726 834 54 | 42 721 635 55 | 43 448 363 56 | 44 963 702 57 | 45 570 484 58 | 46 389 281 59 | 47 708 380 60 | 48 522 439 61 | 49 771 523 62 | 50 778 645 63 | 51 402 318 64 | 52 817 717 65 | 53 730 655 66 | 54 814 925 67 | 55 743 362 68 | 56 568 298 69 | 57 555 132 70 | 58 937 637 71 | 59 542 678 72 | 60 822 854 73 | 61 711 697 74 | 62 603 310 75 | 63 864 674 76 | 64 850 879 77 | 65 280 198 78 | 66 502 417 79 | 67 764 610 80 | 68 729 822 81 | 69 307 258 82 | 70 896 958 83 | 71 774 732 84 | 72 684 446 85 | 73 691 793 86 | 74 905 888 87 | 75 664 411 88 | 76 875 981 89 | 77 477 226 90 | 78 607 624 91 | 79 823 875 92 | 80 558 543 93 | 81 410 237 94 | 82 712 692 95 | 83 804 678 96 | 84 491 317 97 | 85 475 280 98 | 86 881 872 99 | 87 371 269 100 | 88 520 562 101 | 89 590 431 102 | 90 420 245 103 | 91 811 647 104 | 92 501 507 105 | 93 684 647 106 | 94 739 969 107 | 95 854 717 108 | 96 844 268 109 | 97 520 823 110 | 98 866 966 111 | 99 720 645 112 | 100 564 493 113 | 101 653 541 114 | 102 831 758 115 | 103 694 804 116 | 104 661 469 117 | 105 417 251 118 | 106 683 364 119 | 107 648 479 120 | 108 255 225 121 | 109 836 934 122 | 110 811 960 123 | 111 888 492 124 | 112 111 261 125 | 113 866 827 126 | 114 822 876 127 | 115 672 419 128 | 116 750 974 129 | 117 545 420 130 | 118 140 267 131 | 119 925 749 132 | 120 505 282 133 | 121 701 477 134 | 122 427 272 135 | 123 293 242 136 | 124 757 929 137 | 125 856 861 138 | 126 848 809 139 | 127 331 214 140 | 128 682 480 141 | 129 804 638 142 | 130 349 234 143 | 131 426 194 144 | 132 499 348 145 | 133 692 700 146 | 134 331 318 147 | 135 738 644 148 | 136 967 900 149 | 137 604 563 150 | 138 701 540 151 | 139 523 429 152 | 140 834 880 153 | 141 714 644 154 | 142 369 222 155 | 143 720 566 156 | 144 606 512 157 | 145 840 926 158 | 146 786 354 159 | 147 667 709 160 | 148 670 508 161 | 149 456 202 162 | 150 827 687 163 | 151 871 800 164 | 152 556 837 165 | 153 810 589 166 | 154 537 360 167 | 155 456 275 168 | 156 688 214 169 | 157 346 163 170 | 158 880 569 171 | 159 360 215 172 | 160 849 686 173 | 161 617 420 174 | 162 308 466 175 | 163 734 534 176 | 164 880 638 177 | 165 751 763 178 | 166 616 485 179 | 167 719 744 180 | 168 371 346 181 | 169 379 420 182 | 170 565 524 183 | 171 377 138 184 | 172 864 721 185 | 173 823 535 186 | 174 367 218 187 | 175 614 761 188 | 176 659 383 189 | 177 867 910 190 | 178 717 895 191 | 179 865 793 192 | 180 588 663 193 | 181 595 488 194 | 182 408 268 195 | 183 713 863 196 | 184 652 409 197 | 185 920 394 198 | 186 819 367 199 | 187 653 425 200 | 188 618 425 201 | 189 657 290 202 | 190 709 839 203 | 191 739 541 204 | 192 909 732 205 | 193 373 218 206 | 194 375 283 207 | 195 278 391 208 | 196 843 873 209 | 197 443 229 210 | 198 756 702 211 | 199 365 293 212 | 200 821 637 213 | 201 477 191 214 | 202 401 102 215 | 203 359 290 216 | 204 791 751 217 | 205 938 787 218 | 206 709 469 219 | 207 329 178 220 | 208 559 543 221 | 209 916 882 222 | 210 758 635 223 | 211 855 710 224 | 212 797 783 225 | 213 428 238 226 | 214 802 823 227 | 215 730 542 228 | 216 797 464 229 | 217 217 29 230 | 218 939 745 231 | 219 911 889 232 | 220 829 679 233 | 221 678 523 234 | 222 709 224 235 | 223 550 429 236 | 224 821 933 237 | 225 798 482 238 | 226 686 615 239 | 227 735 658 240 | 228 728 531 241 | 229 736 452 242 | 230 721 459 243 | 231 818 377 244 | 232 421 479 245 | 233 768 524 246 | 234 498 441 247 | 235 601 454 248 | 236 851 574 249 | 237 662 511 250 | 238 526 279 251 | 239 447 601 252 | 240 889 610 253 | 241 891 930 254 | 242 483 278 255 | 243 728 845 256 | 244 451 299 257 | 245 308 215 258 | 246 643 486 259 | 247 758 963 260 | 248 439 458 261 | 249 830 608 262 | 250 387 233 263 | 251 837 948 264 | 252 561 410 265 | 253 721 439 266 | 254 778 640 267 | 255 826 627 268 | 256 644 724 269 | 257 515 465 270 | 258 728 651 271 | 259 666 474 272 | 260 759 94 273 | 261 525 419 274 | 262 927 692 275 | 263 597 228 276 | 264 448 218 277 | 265 575 349 278 | 266 921 883 279 | 267 406 172 280 | 268 840 847 281 | 269 787 660 282 | 270 301 545 283 | 271 668 880 284 | 272 594 416 285 | 273 791 861 286 | 274 740 581 287 | 275 438 272 288 | 276 500 259 289 | 277 600 464 290 | 278 965 412 291 | 279 614 568 292 | 280 829 644 293 | 281 556 518 294 | 282 660 676 295 | 283 525 793 296 | 284 623 482 297 | 285 369 195 298 | 286 805 668 299 | 287 820 936 300 | 288 879 886 301 | 289 713 679 302 | 290 728 597 303 | 291 833 719 304 | 292 720 473 305 | 293 744 569 306 | 294 739 539 307 | 295 644 446 308 | 296 896 850 309 | 297 393 284 310 | 298 708 586 311 | 299 694 612 312 | 300 446 162 313 | 301 383 213 314 | 302 738 669 315 | 303 726 702 316 | 304 749 641 317 | 305 499 397 318 | 306 335 416 319 | 307 828 951 320 | 308 634 368 321 | 309 720 559 322 | 310 428 272 323 | 311 664 226 324 | 312 772 626 325 | 313 602 466 326 | 314 592 394 327 | 315 627 408 328 | 316 754 637 329 | 317 643 572 330 | 318 699 167 331 | 319 880 867 332 | 320 493 305 333 | 321 698 630 334 | 322 819 640 335 | 323 819 577 336 | 324 860 866 337 | 325 303 326 338 | 326 523 470 339 | 327 780 647 340 | 328 630 579 341 | 329 893 578 342 | 330 545 465 343 | 331 782 723 344 | 332 639 609 345 | 333 313 267 346 | 334 810 893 347 | 335 407 307 348 | 336 808 666 349 | 337 621 427 350 | 338 841 943 351 | 339 761 602 352 | 340 513 340 353 | 341 335 150 354 | 342 807 564 355 | 343 715 936 356 | 344 818 834 357 | 345 881 870 358 | 346 300 679 359 | 347 628 402 360 | 348 697 551 361 | 349 342 373 362 | 350 819 859 363 | 351 830 955 364 | 352 651 493 365 | 353 378 248 366 | 354 675 424 367 | 355 700 76 368 | 356 398 303 369 | 357 890 373 370 | 358 799 623 371 | 359 812 806 372 | 360 770 860 373 | 361 776 711 374 | 362 661 839 375 | 363 829 895 376 | 364 392 227 377 | 365 891 565 378 | 366 569 489 379 | 367 824 716 380 | 368 827 436 381 | 369 380 217 382 | 370 527 376 383 | 371 838 855 384 | 372 537 432 385 | 373 468 195 386 | 374 714 807 387 | 375 553 104 388 | 376 448 331 389 | 377 846 863 390 | 378 815 689 391 | 379 639 332 392 | 380 748 365 393 | 381 577 442 394 | 382 572 461 395 | 383 431 304 396 | 384 731 688 397 | 385 415 256 398 | 386 933 687 399 | 387 461 392 400 | 388 827 906 401 | 389 786 737 402 | 390 825 375 403 | 391 583 513 404 | 392 793 632 405 | 393 540 374 406 | 394 604 445 407 | 395 303 293 408 | 396 802 534 409 | 397 443 308 410 | 398 298 118 411 | 399 500 353 412 | 400 818 892 413 | 401 487 444 414 | 402 744 657 415 | 403 701 547 416 | 404 297 237 417 | 405 660 436 418 | 406 580 450 419 | 407 591 411 420 | 408 877 905 421 | 409 377 314 422 | 410 868 819 423 | 411 750 857 424 | 412 643 336 425 | 413 770 609 426 | 414 873 547 427 | 415 746 949 428 | 416 771 418 429 | 417 736 788 430 | 418 676 521 431 | 419 934 919 432 | 420 673 493 433 | 421 817 914 434 | 422 493 28 435 | 423 322 227 436 | 424 746 617 437 | 425 754 950 438 | 426 523 296 439 | 427 675 488 440 | 428 860 848 441 | 429 466 251 442 | 430 772 307 443 | 431 396 235 444 | 432 796 976 445 | 433 792 646 446 | 434 417 267 447 | 435 871 536 448 | 436 285 205 449 | 437 474 257 450 | 438 854 648 451 | 439 602 262 452 | 440 950 821 453 | 441 698 633 454 | 442 760 957 455 | 443 418 292 456 | 444 690 602 457 | 445 669 683 458 | 446 565 562 459 | 447 832 811 460 | 448 797 722 461 | 449 594 646 462 | 450 597 358 463 | 451 944 834 464 | 452 776 610 465 | 453 719 441 466 | 454 832 908 467 | 455 702 378 468 | 456 604 494 469 | 457 757 832 470 | 458 647 400 471 | 459 601 706 472 | 460 218 124 473 | 461 218 315 474 | 462 218 506 475 | 463 218 698 476 | 464 218 889 477 | 465 432 124 478 | 466 432 315 479 | 467 432 506 480 | 468 432 698 481 | 469 432 889 482 | 470 646 124 483 | 471 646 315 484 | 472 646 506 485 | 473 646 698 486 | 474 646 889 487 | 475 860 124 488 | 476 860 315 489 | 477 860 506 490 | 478 860 698 491 | 479 860 889 492 | DEMAND_SECTION 493 | 1 0 494 | 2 71 495 | 3 54 496 | 4 74 497 | 5 9 498 | 6 91 499 | 7 98 500 | 8 72 501 | 9 67 502 | 10 70 503 | 11 68 504 | 12 92 505 | 13 93 506 | 14 97 507 | 15 23 508 | 16 75 509 | 17 61 510 | 18 91 511 | 19 61 512 | 20 89 513 | 21 70 514 | 22 63 515 | 23 93 516 | 24 18 517 | 25 65 518 | 26 33 519 | 27 11 520 | 28 80 521 | 29 88 522 | 30 7 523 | 31 71 524 | 32 68 525 | 33 38 526 | 34 79 527 | 35 28 528 | 36 63 529 | 37 99 530 | 38 99 531 | 39 94 532 | 40 69 533 | 41 78 534 | 42 76 535 | 43 90 536 | 44 57 537 | 45 29 538 | 46 82 539 | 47 42 540 | 48 18 541 | 49 58 542 | 50 89 543 | 51 85 544 | 52 66 545 | 53 57 546 | 54 75 547 | 55 1 548 | 56 49 549 | 57 8 550 | 58 51 551 | 59 67 552 | 60 58 553 | 61 66 554 | 62 13 555 | 63 69 556 | 64 85 557 | 65 53 558 | 66 30 559 | 67 67 560 | 68 79 561 | 69 79 562 | 70 90 563 | 71 81 564 | 72 33 565 | 73 80 566 | 74 78 567 | 75 6 568 | 76 93 569 | 77 60 570 | 78 60 571 | 79 83 572 | 80 97 573 | 81 76 574 | 82 60 575 | 83 94 576 | 84 59 577 | 85 72 578 | 86 58 579 | 87 59 580 | 88 97 581 | 89 11 582 | 90 70 583 | 91 90 584 | 92 54 585 | 93 73 586 | 94 61 587 | 95 52 588 | 96 46 589 | 97 77 590 | 98 60 591 | 99 100 592 | 100 10 593 | 101 100 594 | 102 76 595 | 103 67 596 | 104 45 597 | 105 84 598 | 106 14 599 | 107 49 600 | 108 61 601 | 109 97 602 | 110 55 603 | 111 9 604 | 112 52 605 | 113 99 606 | 114 83 607 | 115 26 608 | 116 85 609 | 117 43 610 | 118 74 611 | 119 98 612 | 120 28 613 | 121 5 614 | 122 66 615 | 123 71 616 | 124 58 617 | 125 90 618 | 126 75 619 | 127 59 620 | 128 3 621 | 129 95 622 | 130 62 623 | 131 54 624 | 132 78 625 | 133 93 626 | 134 54 627 | 135 57 628 | 136 100 629 | 137 89 630 | 138 72 631 | 139 19 632 | 140 55 633 | 141 81 634 | 142 86 635 | 143 64 636 | 144 87 637 | 145 97 638 | 146 7 639 | 147 75 640 | 148 76 641 | 149 98 642 | 150 68 643 | 151 67 644 | 152 59 645 | 153 76 646 | 154 27 647 | 155 67 648 | 156 50 649 | 157 72 650 | 158 91 651 | 159 54 652 | 160 54 653 | 161 11 654 | 162 55 655 | 163 62 656 | 164 89 657 | 165 61 658 | 166 19 659 | 167 79 660 | 168 71 661 | 169 56 662 | 170 75 663 | 171 97 664 | 172 51 665 | 173 93 666 | 174 54 667 | 175 93 668 | 176 47 669 | 177 95 670 | 178 67 671 | 179 77 672 | 180 93 673 | 181 26 674 | 182 82 675 | 183 78 676 | 184 17 677 | 185 29 678 | 186 25 679 | 187 22 680 | 188 22 681 | 189 4 682 | 190 100 683 | 191 71 684 | 192 93 685 | 193 84 686 | 194 51 687 | 195 94 688 | 196 74 689 | 197 59 690 | 198 62 691 | 199 81 692 | 200 73 693 | 201 91 694 | 202 98 695 | 203 56 696 | 204 92 697 | 205 95 698 | 206 20 699 | 207 99 700 | 208 53 701 | 209 74 702 | 210 75 703 | 211 63 704 | 212 86 705 | 213 53 706 | 214 62 707 | 215 93 708 | 216 29 709 | 217 73 710 | 218 99 711 | 219 74 712 | 220 69 713 | 221 51 714 | 222 29 715 | 223 10 716 | 224 56 717 | 225 33 718 | 226 92 719 | 227 90 720 | 228 58 721 | 229 15 722 | 230 3 723 | 231 20 724 | 232 59 725 | 233 98 726 | 234 91 727 | 235 14 728 | 236 53 729 | 237 52 730 | 238 37 731 | 239 47 732 | 240 79 733 | 241 92 734 | 242 90 735 | 243 54 736 | 244 95 737 | 245 66 738 | 246 2 739 | 247 80 740 | 248 74 741 | 249 62 742 | 250 70 743 | 251 75 744 | 252 11 745 | 253 9 746 | 254 99 747 | 255 63 748 | 256 89 749 | 257 6 750 | 258 90 751 | 259 29 752 | 260 18 753 | 261 16 754 | 262 97 755 | 263 6 756 | 264 100 757 | 265 46 758 | 266 85 759 | 267 95 760 | 268 78 761 | 269 83 762 | 270 45 763 | 271 53 764 | 272 34 765 | 273 89 766 | 274 87 767 | 275 92 768 | 276 24 769 | 277 38 770 | 278 39 771 | 279 85 772 | 280 81 773 | 281 73 774 | 282 51 775 | 283 62 776 | 284 49 777 | 285 67 778 | 286 73 779 | 287 73 780 | 288 91 781 | 289 82 782 | 290 57 783 | 291 77 784 | 292 48 785 | 293 71 786 | 294 83 787 | 295 15 788 | 296 54 789 | 297 73 790 | 298 80 791 | 299 77 792 | 300 65 793 | 301 51 794 | 302 67 795 | 303 96 796 | 304 53 797 | 305 94 798 | 306 73 799 | 307 78 800 | 308 37 801 | 309 97 802 | 310 64 803 | 311 23 804 | 312 55 805 | 313 30 806 | 314 43 807 | 315 35 808 | 316 76 809 | 317 65 810 | 318 9 811 | 319 68 812 | 320 60 813 | 321 57 814 | 322 97 815 | 323 63 816 | 324 51 817 | 325 65 818 | 326 46 819 | 327 70 820 | 328 63 821 | 329 86 822 | 330 15 823 | 331 90 824 | 332 62 825 | 333 62 826 | 334 56 827 | 335 63 828 | 336 93 829 | 337 31 830 | 338 90 831 | 339 58 832 | 340 10 833 | 341 100 834 | 342 67 835 | 343 78 836 | 344 94 837 | 345 91 838 | 346 11 839 | 347 19 840 | 348 52 841 | 349 52 842 | 350 54 843 | 351 87 844 | 352 41 845 | 353 77 846 | 354 21 847 | 355 37 848 | 356 61 849 | 357 32 850 | 358 86 851 | 359 67 852 | 360 59 853 | 361 53 854 | 362 82 855 | 363 55 856 | 364 63 857 | 365 62 858 | 366 25 859 | 367 59 860 | 368 24 861 | 369 65 862 | 370 22 863 | 371 90 864 | 372 7 865 | 373 67 866 | 374 86 867 | 375 19 868 | 376 93 869 | 377 80 870 | 378 63 871 | 379 34 872 | 380 1 873 | 381 14 874 | 382 1 875 | 383 87 876 | 384 63 877 | 385 55 878 | 386 94 879 | 387 59 880 | 388 62 881 | 389 71 882 | 390 37 883 | 391 79 884 | 392 83 885 | 393 50 886 | 394 46 887 | 395 76 888 | 396 65 889 | 397 95 890 | 398 71 891 | 399 21 892 | 400 100 893 | 401 66 894 | 402 97 895 | 403 80 896 | 404 100 897 | 405 34 898 | 406 5 899 | 407 32 900 | 408 76 901 | 409 78 902 | 410 94 903 | 411 53 904 | 412 36 905 | 413 73 906 | 414 85 907 | 415 55 908 | 416 31 909 | 417 66 910 | 418 98 911 | 419 94 912 | 420 1 913 | 421 60 914 | 422 93 915 | 423 67 916 | 424 85 917 | 425 76 918 | 426 16 919 | 427 32 920 | 428 76 921 | 429 65 922 | 430 8 923 | 431 68 924 | 432 54 925 | 433 58 926 | 434 92 927 | 435 64 928 | 436 85 929 | 437 66 930 | 438 64 931 | 439 4 932 | 440 57 933 | 441 73 934 | 442 88 935 | 443 89 936 | 444 72 937 | 445 73 938 | 446 89 939 | 447 74 940 | 448 56 941 | 449 79 942 | 450 41 943 | 451 62 944 | 452 59 945 | 453 28 946 | 454 72 947 | 455 31 948 | 456 45 949 | 457 80 950 | 458 48 951 | 459 99 952 | STATIONS_COORD_SECTION 953 | 460 954 | 461 955 | 462 956 | 463 957 | 464 958 | 465 959 | 466 960 | 467 961 | 468 962 | 469 963 | 470 964 | 471 965 | 472 966 | 473 967 | 474 968 | 475 969 | 476 970 | 477 971 | 478 972 | 479 973 | DEPOT_SECTION 974 | 1 975 | -1 976 | EOF -------------------------------------------------------------------------------- /objects/problem.py: -------------------------------------------------------------------------------- 1 | from collections import OrderedDict 2 | from copy import deepcopy 3 | import os 4 | from random import shuffle 5 | import numpy as np 6 | from matplotlib import pyplot as plt 7 | 8 | from objects.node import Node 9 | from objects.solution import Solution 10 | 11 | from src.utils import get_problem_name, logger 12 | 13 | class Problem(): 14 | 15 | def __init__(self, problem_path=None): 16 | """ 17 | Initializes an instance of the class with the given parameters. 18 | 19 | :param problem_name: A string representing the name of the problem to be solved (e.g. E-n22-k4) 20 | :type problem_name: str 21 | :param dataset_path: A string representing the path of the dataset to be used (default is ./EVRP/benchmark/) 22 | :type dataset_path: str 23 | """ 24 | self.problem_path = problem_path 25 | self.problem_name = get_problem_name(problem_path) 26 | if not os.path.isfile(problem_path): 27 | raise ValueError(f"Problem file not found: {problem_path}. Please input a valid problem name.") 28 | 29 | self.max_num_vehicles = None 30 | self.energy_capacity = None 31 | self.capacity = None 32 | self.num_stations = None 33 | self.num_dimensions = None 34 | self.optimal_value = None 35 | self.energy_consumption = None 36 | self.nodes = [] 37 | self.node_dict = dict() 38 | self.customers = [] 39 | self.customer_ids = [] 40 | self.stations = [] 41 | self.station_ids = [] 42 | self.demands = [] 43 | self.depot = None 44 | self.depot_id = None 45 | 46 | self.problem = self.__read_problem(problem_path) 47 | 48 | def get_name(self): 49 | return self.problem_name 50 | 51 | def get_problem_size(self): 52 | return len(self.nodes) 53 | 54 | def get_depot(self): 55 | return self.depot 56 | 57 | def get_num_customers(self): 58 | return self.num_customers 59 | 60 | def get_num_stations(self): 61 | return self.num_stations 62 | 63 | def get_num_dimensions(self): 64 | return self.num_dimensions 65 | 66 | def get_max_num_vehicles(self): 67 | return self.max_num_vehicles 68 | 69 | def get_customer_demand(self, node): 70 | return node.get_demand() 71 | 72 | def get_energy_consumption(self, from_node, to_node): 73 | return self.energy_consumption * from_node.distance(to_node) 74 | 75 | def get_depot_id(self): 76 | return self.depot_id 77 | 78 | def get_customer_ids(self): 79 | return deepcopy(self.customer_ids) 80 | 81 | def get_station_ids(self): 82 | return deepcopy(self.station_ids) 83 | 84 | def get_all_stations(self): 85 | return deepcopy(self.stations) 86 | 87 | def get_battery_capacity(self): 88 | return self.energy_capacity 89 | 90 | def get_capacity(self): 91 | return self.capacity 92 | 93 | def get_all_customers(self): 94 | return self.customers 95 | 96 | def get_node_from_id(self, id): 97 | return self.node_dict[id] 98 | 99 | def get_distance(self, from_node, to_node): 100 | return from_node.distance(to_node) 101 | 102 | def __read_problem(self, problem_file_path): 103 | """ 104 | Reads a problem file and initializes the problem. 105 | 106 | :param problem_file_path: str, the path to the problem file. 107 | 108 | :return: None 109 | 110 | The function reads the problem file at the specified path and initializes the problem 111 | attributes such as number of vehicles, number of dimensions, number of stations, number 112 | of customers, capacity, energy capacity, energy consumption, nodes, demands, customer 113 | ids, customers, station ids, stations, and depot id. It also sets the type of each node 114 | (depot, customer, or station) and its demand. If the edge weight type is not EUC_2D, 115 | the function raises a ValueError. 116 | """ 117 | with open(problem_file_path, 'r') as f: 118 | lines = f.readlines() 119 | 120 | """ Read metadata """ 121 | logger.info(f"Read problem file: {problem_file_path}") 122 | logger.info("{}".format(lines[0])) 123 | logger.info("{}".format(lines[1])) 124 | logger.info("{}".format(lines[2])) 125 | logger.info("{}".format(lines[3])) 126 | self.max_num_vehicles = int(lines[4].split()[-1]) 127 | self.num_dimensions = int(lines[5].split()[-1]) 128 | self.num_stations = int(lines[6].split()[-1]) 129 | self.num_customers = self.num_dimensions - self.num_stations 130 | self.capacity = float(lines[7].split()[-1]) 131 | self.energy_capacity = float(lines[8].split()[-1]) 132 | self.energy_consumption = float(lines[9].split()[-1]) 133 | logger.info("{}".format(lines[10])) 134 | edge_weight_type = lines[10].split()[-1] 135 | 136 | """ Read NODES """ 137 | if edge_weight_type == 'EUC_2D': 138 | start_line = 12 139 | end_line = 12 + self.num_dimensions 140 | for i in range(start_line, end_line): 141 | id, x, y = lines[i].split() 142 | id = int(id) - 1 143 | self.nodes.append(Node(int(id), float(x), float(y))) 144 | self.node_dict[id] = self.nodes[-1] 145 | 146 | start_line = end_line + 1 147 | end_line = start_line + self.num_customers 148 | for i in range(start_line, end_line): 149 | _id, demand = lines[i].split()[-2:] 150 | _id = int(_id) - 1 151 | demand = float(demand) 152 | self.demands.append(demand) 153 | self.nodes[_id].set_type('C') 154 | self.nodes[_id].set_demand(demand) 155 | self.customer_ids.append(_id) 156 | self.customers.append(self.nodes[_id]) 157 | 158 | start_line = end_line + 1 159 | end_line = start_line + self.num_stations 160 | for i in range(start_line, end_line): 161 | _id = lines[i].split()[-1] 162 | _id = int(_id) - 1 163 | self.nodes[_id].set_type('S') 164 | self.station_ids.append(_id) 165 | self.stations.append(self.nodes[_id]) 166 | 167 | self.depot_id = int(lines[end_line + 1].split()[-1]) - 1 168 | self.nodes[self.depot_id].set_type('D') 169 | self.depot = self.nodes[self.depot_id] 170 | # remove depot from customers 171 | self.customer_ids.remove(self.depot_id) 172 | for i in range(len(self.customers)): 173 | if self.customers[i].is_depot(): 174 | self.customers.pop(i) 175 | break 176 | 177 | self.num_customers -= 1 # skip depot from customers 178 | else: 179 | raise ValueError(f"Invalid benchmark, edge weight type: {edge_weight_type} not supported.") 180 | 181 | def check_valid_solution(self, solution, verbose=False): 182 | """ 183 | Check if a given solution is a valid solution for the Vehicle Routing Problem (VRP). 184 | 185 | Args: 186 | solution: A Solution object containing the tours to be checked. 187 | 188 | Returns: 189 | A boolean value indicating whether the solution is valid or not. 190 | """ 191 | is_valid = solution.set_tour_index() 192 | if not is_valid: 193 | if verbose: 194 | logger.warning("The vehicle has visited a customer more than once.") 195 | return False 196 | 197 | tours = solution.get_tours() 198 | 199 | if len(tours) > self.max_num_vehicles: 200 | if verbose: 201 | logger.warning("This solution using more than number of available vehicles.") 202 | return False 203 | 204 | visited = {} 205 | 206 | for tour in tours: 207 | energy_temp = self.get_battery_capacity() 208 | capacity_temp = self.get_capacity() 209 | 210 | 211 | for i in range(len(tour) - 1): 212 | first_node = tour[i] 213 | second_node = tour[i + 1] 214 | 215 | if first_node.is_customer(): 216 | if first_node.get_id() in visited: 217 | if verbose: 218 | logger.warning("The vehicle has visited a customer more than once.") 219 | return False 220 | visited[first_node.get_id()] = 1 221 | 222 | capacity_temp -= self.get_customer_demand(second_node) 223 | energy_temp -= self.get_energy_consumption(first_node, second_node) 224 | 225 | if capacity_temp < 0.0: 226 | if verbose: 227 | logger.warning("The vehicle exceeds capacity when visiting {}.".format(second_node.get_id())) 228 | return False 229 | 230 | if energy_temp < 0.0: 231 | if verbose: 232 | logger.warning("The vehicle exceeds energy when visiting {}.".format(second_node.get_id())) 233 | return False 234 | 235 | if second_node.is_depot(): 236 | capacity_temp = self.get_capacity() 237 | energy_temp = self.get_battery_capacity() 238 | 239 | if second_node.is_charging_station(): 240 | energy_temp = self.get_battery_capacity() 241 | 242 | return True 243 | 244 | def random_solution(self): 245 | """ 246 | Returns: 247 | solution (Solution): a randomly generated solution for the EVRP problem instance 248 | 249 | Example: 250 | Basic presentation: [0, 1, 2, 3, 0, 4, 5, 0, 6, 0] 251 | Vehicle tours: 252 | Vehicle 1: 0 -> 1 -> 2 -> 3 -> 0 253 | Vehicle 2: 0 -> 4 -> 5 -> 0 254 | Vehicle 3: 0 -> 6 -> 0 255 | 256 | (*) Note: The solution generated by the algorithm is not guaranteed to be valid 257 | in terms of capacity and energy constraints. 258 | Your task is to modify the solution to a valid one that has the shortest tour length. 259 | """ 260 | # Create an empty solution object 261 | solution = Solution() 262 | 263 | # Generate a list of all customer IDs 264 | temp_solution = self.get_customer_ids() 265 | 266 | # Shuffle the list of customer IDs to randomize the solution 267 | shuffle(temp_solution) 268 | 269 | splited_tour_indexes = np.random.choice(len(temp_solution), self.max_num_vehicles - 1, replace=False) 270 | 271 | splited_tour_indexes = np.append(0, splited_tour_indexes) 272 | 273 | splited_tour_indexes = np.append(splited_tour_indexes, len(temp_solution)) 274 | 275 | splited_tour_indexes = np.sort(splited_tour_indexes) 276 | 277 | for i in range(self.max_num_vehicles): 278 | tour_ids = temp_solution[splited_tour_indexes[i]:splited_tour_indexes[i + 1]] 279 | tour = [self.get_node_from_id(_id) for _id in tour_ids] 280 | solution.add_tour(tour) 281 | 282 | solution.set_tour_index() 283 | 284 | return solution 285 | 286 | def get_tour_length(self, tour): 287 | tour_length = 0 288 | for i in range(len(tour) - 1): 289 | tour_length += tour[i].distance(tour[i + 1]) 290 | return tour_length 291 | 292 | def calculate_tour_length(self, solution: Solution): 293 | tour_length = 0 294 | for tour in solution.get_tours(): 295 | tour = [self.get_depot()] + tour + [self.get_depot()] 296 | for i in range(len(tour) - 1): 297 | tour_length += tour[i].distance(tour[i + 1]) 298 | 299 | if self.check_valid_solution(solution): 300 | return tour_length 301 | else: 302 | return tour_length * 2 303 | 304 | def plot(self, solution=None, path=None): 305 | """ 306 | Plot the solution of the vehicle routing problem on a scatter plot. 307 | 308 | Args: 309 | solution (Solution): A `Solution` object containing the solution of the vehicle routing problem. 310 | 311 | Returns: 312 | None. 313 | """ 314 | 315 | _, ax = plt.subplots() 316 | 317 | for node in self.nodes: 318 | if node.is_customer(): 319 | ax.scatter(node.x, node.y, c='green', marker='o', 320 | s=30, alpha=0.5, label="Customer Node") 321 | elif node.is_depot(): 322 | ax.scatter(node.x, node.y, c='red', marker='s', 323 | s=30, alpha=0.5, label="Depot Node") 324 | elif node.is_charging_station(): 325 | ax.scatter(node.x, node.y, c='blue', marker='^', 326 | s=30, alpha=0.5, label="Charging Station Node") 327 | else: 328 | raise ValueError("Invalid node type") 329 | 330 | # Set title and labels 331 | ax.set_title(f"Problem {self.problem_name}") 332 | 333 | handles, labels = plt.gca().get_legend_handles_labels() 334 | by_label = OrderedDict(zip(labels, handles)) 335 | plt.legend(by_label.values(), by_label.keys(), 336 | loc='upper right', 337 | prop={'size': 6}) 338 | 339 | if solution is not None: 340 | tours = solution.get_tours() 341 | for tour in tours: 342 | if len(tour) == 0: 343 | continue 344 | plt.plot([self.get_depot().x, tour[0].x], 345 | [self.get_depot().y, tour[0].y], 346 | c='black', linewidth=0.5, linestyle='--') 347 | 348 | for i in range(len(tour) - 1): 349 | first_node = tour[i] 350 | second_node = tour[i + 1] 351 | plt.plot([first_node.x, second_node.x], 352 | [first_node.y, second_node.y], 353 | c='black', linewidth=0.5, linestyle='--') 354 | 355 | plt.plot([tour[-1].x, self.get_depot().x], 356 | [tour[-1].y, self.get_depot().y], 357 | c='black', linewidth=0.5, linestyle='--') 358 | if path is None: 359 | plt.show() 360 | else: 361 | plt.savefig(path) 362 | plt.close() 363 | 364 | if __name__ == "__main__": 365 | # evrp = EVRP('X-n1006-k43-s5', dataset_path='./EVRP/benchmark-2022/') 366 | evrp = Problem('E-n22-k4', dataset_path='./EVRP/benchmark-2019/') 367 | solution = evrp.random_solution() 368 | logger.info("Random solution is {}".format("valid" if evrp.check_valid_solution(solution, verbose=True) else "invalid")) 369 | print(solution) 370 | evrp.plot(solution) 371 | 372 | 373 | -------------------------------------------------------------------------------- /benchmarks/evrp-2022/X-n577-k30-s4.evrp: -------------------------------------------------------------------------------- 1 | NAME: X-n577-k30-s4.evrp 2 | COMMENT: Modificatification of X-n573-k30 instance. Modified by Mavrovouniotis & Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: - 5 | VEHICLES: 30 6 | DIMENSION: 577 7 | STATIONS: 4 8 | CAPACITY: 210 9 | ENERGY_CAPACITY: 2191 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_TYPE: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 0 0 14 | 2 753 355 15 | 3 663 83 16 | 4 725 286 17 | 5 734 504 18 | 6 704 145 19 | 7 728 311 20 | 8 675 58 21 | 9 617 242 22 | 10 864 334 23 | 11 772 258 24 | 12 516 109 25 | 13 717 123 26 | 14 768 161 27 | 15 598 365 28 | 16 896 569 29 | 17 781 281 30 | 18 898 397 31 | 19 714 126 32 | 20 780 311 33 | 21 809 60 34 | 22 728 244 35 | 23 724 219 36 | 24 712 177 37 | 25 694 432 38 | 26 491 157 39 | 27 854 648 40 | 28 612 179 41 | 29 623 337 42 | 30 788 320 43 | 31 772 378 44 | 32 736 308 45 | 33 692 303 46 | 34 737 334 47 | 35 576 27 48 | 36 731 360 49 | 37 763 301 50 | 38 633 578 51 | 39 935 244 52 | 40 513 73 53 | 41 511 133 54 | 42 671 349 55 | 43 729 254 56 | 44 771 261 57 | 45 851 278 58 | 46 827 365 59 | 47 682 113 60 | 48 553 425 61 | 49 544 282 62 | 50 706 165 63 | 51 527 26 64 | 52 580 220 65 | 53 908 303 66 | 54 841 306 67 | 55 656 34 68 | 56 864 196 69 | 57 618 270 70 | 58 699 347 71 | 59 787 289 72 | 60 678 11 73 | 61 643 387 74 | 62 757 114 75 | 63 858 395 76 | 64 706 157 77 | 65 713 243 78 | 66 663 319 79 | 67 615 448 80 | 68 898 477 81 | 69 767 131 82 | 70 718 334 83 | 71 871 216 84 | 72 694 435 85 | 73 617 345 86 | 74 645 75 87 | 75 513 50 88 | 76 767 259 89 | 77 773 313 90 | 78 589 104 91 | 79 760 287 92 | 80 595 425 93 | 81 763 240 94 | 82 569 225 95 | 83 702 417 96 | 84 593 51 97 | 85 656 83 98 | 86 532 93 99 | 87 834 351 100 | 88 832 274 101 | 89 751 126 102 | 90 796 290 103 | 91 872 212 104 | 92 835 257 105 | 93 702 185 106 | 94 673 187 107 | 95 596 422 108 | 96 740 147 109 | 97 890 180 110 | 98 556 120 111 | 99 638 386 112 | 100 748 319 113 | 101 620 112 114 | 102 794 226 115 | 103 641 383 116 | 104 594 302 117 | 105 725 400 118 | 106 731 321 119 | 107 703 296 120 | 108 614 503 121 | 109 715 179 122 | 110 781 317 123 | 111 841 365 124 | 112 783 270 125 | 113 778 420 126 | 114 770 372 127 | 115 907 192 128 | 116 913 434 129 | 117 647 749 130 | 118 683 171 131 | 119 649 324 132 | 120 359 195 133 | 121 867 471 134 | 122 585 218 135 | 123 757 323 136 | 124 914 399 137 | 125 681 323 138 | 126 603 251 139 | 127 554 275 140 | 128 762 315 141 | 129 813 342 142 | 130 801 379 143 | 131 724 14 144 | 132 775 342 145 | 133 727 221 146 | 134 715 314 147 | 135 731 363 148 | 136 788 250 149 | 137 649 29 150 | 138 655 407 151 | 139 567 325 152 | 140 624 88 153 | 141 763 422 154 | 142 669 54 155 | 143 785 537 156 | 144 765 384 157 | 145 654 348 158 | 146 677 313 159 | 147 848 491 160 | 148 814 112 161 | 149 699 70 162 | 150 658 353 163 | 151 550 42 164 | 152 853 372 165 | 153 540 24 166 | 154 626 65 167 | 155 661 37 168 | 156 769 395 169 | 157 715 396 170 | 158 714 325 171 | 159 729 241 172 | 160 692 271 173 | 161 638 306 174 | 162 715 360 175 | 163 697 213 176 | 164 704 114 177 | 165 699 231 178 | 166 911 240 179 | 167 789 296 180 | 168 598 279 181 | 169 656 384 182 | 170 636 117 183 | 171 637 296 184 | 172 864 347 185 | 173 844 382 186 | 174 595 121 187 | 175 590 28 188 | 176 734 288 189 | 177 641 174 190 | 178 789 60 191 | 179 729 563 192 | 180 839 459 193 | 181 685 249 194 | 182 626 159 195 | 183 610 15 196 | 184 671 265 197 | 185 1000 201 198 | 186 875 408 199 | 187 419 38 200 | 188 671 63 201 | 189 693 73 202 | 190 803 184 203 | 191 690 55 204 | 192 680 192 205 | 193 511 191 206 | 194 899 256 207 | 195 610 110 208 | 196 827 287 209 | 197 672 526 210 | 198 751 216 211 | 199 755 311 212 | 200 770 321 213 | 201 750 262 214 | 202 665 436 215 | 203 595 339 216 | 204 743 228 217 | 205 748 421 218 | 206 736 240 219 | 207 747 298 220 | 208 511 179 221 | 209 753 707 222 | 210 413 402 223 | 211 628 437 224 | 212 661 207 225 | 213 737 328 226 | 214 711 285 227 | 215 655 325 228 | 216 800 288 229 | 217 804 352 230 | 218 678 59 231 | 219 623 79 232 | 220 825 278 233 | 221 736 469 234 | 222 728 268 235 | 223 675 177 236 | 224 641 245 237 | 225 686 180 238 | 226 617 646 239 | 227 903 84 240 | 228 646 72 241 | 229 778 409 242 | 230 865 386 243 | 231 928 420 244 | 232 668 91 245 | 233 702 123 246 | 234 705 306 247 | 235 574 355 248 | 236 684 468 249 | 237 700 483 250 | 238 617 442 251 | 239 629 426 252 | 240 767 394 253 | 241 750 212 254 | 242 828 227 255 | 243 544 253 256 | 244 605 107 257 | 245 746 356 258 | 246 737 130 259 | 247 638 79 260 | 248 600 47 261 | 249 734 377 262 | 250 652 13 263 | 251 482 164 264 | 252 737 249 265 | 253 740 161 266 | 254 554 181 267 | 255 623 270 268 | 256 748 363 269 | 257 655 305 270 | 258 878 250 271 | 259 638 311 272 | 260 743 397 273 | 261 663 78 274 | 262 649 322 275 | 263 718 309 276 | 264 711 345 277 | 265 750 222 278 | 266 734 195 279 | 267 691 372 280 | 268 676 264 281 | 269 793 263 282 | 270 638 111 283 | 271 717 372 284 | 272 670 184 285 | 273 635 112 286 | 274 677 120 287 | 275 708 173 288 | 276 741 62 289 | 277 483 71 290 | 278 851 348 291 | 279 776 165 292 | 280 807 346 293 | 281 659 341 294 | 282 732 272 295 | 283 815 259 296 | 284 739 375 297 | 285 907 319 298 | 286 777 316 299 | 287 756 77 300 | 288 668 72 301 | 289 766 304 302 | 290 661 144 303 | 291 599 97 304 | 292 648 208 305 | 293 696 412 306 | 294 878 216 307 | 295 507 50 308 | 296 848 417 309 | 297 673 295 310 | 298 734 420 311 | 299 676 104 312 | 300 756 332 313 | 301 667 238 314 | 302 616 134 315 | 303 692 255 316 | 304 705 186 317 | 305 675 191 318 | 306 657 99 319 | 307 760 418 320 | 308 827 350 321 | 309 662 529 322 | 310 821 447 323 | 311 759 191 324 | 312 753 72 325 | 313 859 378 326 | 314 646 242 327 | 315 896 475 328 | 316 566 258 329 | 317 645 338 330 | 318 546 60 331 | 319 748 263 332 | 320 805 435 333 | 321 785 387 334 | 322 510 198 335 | 323 937 390 336 | 324 641 386 337 | 325 759 274 338 | 326 714 352 339 | 327 674 332 340 | 328 662 189 341 | 329 712 354 342 | 330 685 112 343 | 331 628 73 344 | 332 728 372 345 | 333 703 99 346 | 334 692 48 347 | 335 746 335 348 | 336 791 248 349 | 337 579 98 350 | 338 732 249 351 | 339 503 63 352 | 340 595 63 353 | 341 877 228 354 | 342 812 137 355 | 343 788 235 356 | 344 647 192 357 | 345 738 410 358 | 346 600 100 359 | 347 742 417 360 | 348 616 343 361 | 349 830 330 362 | 350 681 162 363 | 351 809 41 364 | 352 845 394 365 | 353 714 51 366 | 354 602 236 367 | 355 590 57 368 | 356 766 375 369 | 357 746 391 370 | 358 657 113 371 | 359 630 128 372 | 360 643 248 373 | 361 623 315 374 | 362 805 534 375 | 363 639 178 376 | 364 603 114 377 | 365 779 398 378 | 366 680 289 379 | 367 994 383 380 | 368 463 284 381 | 369 715 367 382 | 370 625 297 383 | 371 773 278 384 | 372 701 345 385 | 373 729 331 386 | 374 658 317 387 | 375 807 287 388 | 376 638 7 389 | 377 669 12 390 | 378 616 128 391 | 379 587 403 392 | 380 962 294 393 | 381 717 278 394 | 382 557 161 395 | 383 565 465 396 | 384 631 245 397 | 385 816 144 398 | 386 706 90 399 | 387 771 428 400 | 388 839 190 401 | 389 786 419 402 | 390 754 358 403 | 391 687 82 404 | 392 690 187 405 | 393 692 441 406 | 394 839 365 407 | 395 763 191 408 | 396 724 301 409 | 397 791 198 410 | 398 697 159 411 | 399 661 220 412 | 400 776 276 413 | 401 736 431 414 | 402 892 182 415 | 403 602 33 416 | 404 487 297 417 | 405 747 65 418 | 406 721 103 419 | 407 744 240 420 | 408 648 381 421 | 409 571 6 422 | 410 646 130 423 | 411 758 317 424 | 412 779 433 425 | 413 737 308 426 | 414 736 197 427 | 415 585 87 428 | 416 668 304 429 | 417 863 289 430 | 418 861 472 431 | 419 628 358 432 | 420 857 330 433 | 421 755 375 434 | 422 601 537 435 | 423 759 310 436 | 424 704 272 437 | 425 642 346 438 | 426 710 240 439 | 427 877 382 440 | 428 877 287 441 | 429 573 197 442 | 430 339 383 443 | 431 651 320 444 | 432 754 254 445 | 433 694 52 446 | 434 814 293 447 | 435 703 274 448 | 436 496 169 449 | 437 766 182 450 | 438 480 92 451 | 439 847 178 452 | 440 928 298 453 | 441 871 664 454 | 442 656 36 455 | 443 753 175 456 | 444 742 128 457 | 445 760 363 458 | 446 677 376 459 | 447 761 383 460 | 448 855 434 461 | 449 773 366 462 | 450 710 177 463 | 451 762 378 464 | 452 876 191 465 | 453 801 250 466 | 454 481 159 467 | 455 839 209 468 | 456 544 312 469 | 457 749 288 470 | 458 704 91 471 | 459 647 158 472 | 460 722 176 473 | 461 608 213 474 | 462 720 277 475 | 463 757 350 476 | 464 697 229 477 | 465 890 258 478 | 466 779 273 479 | 467 949 223 480 | 468 738 400 481 | 469 674 438 482 | 470 626 293 483 | 471 716 467 484 | 472 593 371 485 | 473 872 314 486 | 474 616 310 487 | 475 670 454 488 | 476 762 339 489 | 477 676 366 490 | 478 766 318 491 | 479 753 389 492 | 480 766 236 493 | 481 671 75 494 | 482 901 344 495 | 483 737 290 496 | 484 602 77 497 | 485 784 319 498 | 486 783 268 499 | 487 792 335 500 | 488 813 294 501 | 489 768 302 502 | 490 770 281 503 | 491 798 190 504 | 492 696 305 505 | 493 714 336 506 | 494 684 65 507 | 495 686 329 508 | 496 751 357 509 | 497 667 260 510 | 498 734 295 511 | 499 538 203 512 | 500 838 499 513 | 501 104 364 514 | 502 689 47 515 | 503 621 231 516 | 504 656 128 517 | 505 595 31 518 | 506 793 258 519 | 507 844 287 520 | 508 630 165 521 | 509 537 118 522 | 510 607 413 523 | 511 783 359 524 | 512 673 280 525 | 513 756 224 526 | 514 676 466 527 | 515 609 102 528 | 516 738 221 529 | 517 556 84 530 | 518 789 84 531 | 519 624 239 532 | 520 721 70 533 | 521 711 338 534 | 522 649 180 535 | 523 229 166 536 | 524 782 342 537 | 525 759 222 538 | 526 872 494 539 | 527 589 39 540 | 528 533 226 541 | 529 704 206 542 | 530 644 66 543 | 531 830 288 544 | 532 585 126 545 | 533 660 72 546 | 534 554 11 547 | 535 755 300 548 | 536 587 243 549 | 537 708 115 550 | 538 610 16 551 | 539 774 505 552 | 540 640 436 553 | 541 683 210 554 | 542 936 268 555 | 543 795 414 556 | 544 693 592 557 | 545 817 108 558 | 546 710 305 559 | 547 739 217 560 | 548 725 45 561 | 549 638 118 562 | 550 711 456 563 | 551 783 128 564 | 552 761 313 565 | 553 866 479 566 | 554 817 400 567 | 555 554 297 568 | 556 778 342 569 | 557 654 271 570 | 558 756 239 571 | 559 748 41 572 | 560 648 151 573 | 561 701 286 574 | 562 735 275 575 | 563 792 334 576 | 564 674 111 577 | 565 754 300 578 | 566 740 149 579 | 567 798 531 580 | 568 661 275 581 | 569 530 155 582 | 570 532 181 583 | 571 587 360 584 | 572 869 444 585 | 573 794 227 586 | 574 239 130 587 | 575 366 135 588 | 576 624 575 589 | 577 754 254 590 | DEMAND_SECTION 591 | 1 0 592 | 2 78 593 | 3 96 594 | 4 64 595 | 5 87 596 | 6 70 597 | 7 57 598 | 8 63 599 | 9 86 600 | 10 89 601 | 11 64 602 | 12 53 603 | 13 86 604 | 14 69 605 | 15 94 606 | 16 62 607 | 17 96 608 | 18 89 609 | 19 92 610 | 20 72 611 | 21 59 612 | 22 93 613 | 23 55 614 | 24 96 615 | 25 81 616 | 26 65 617 | 27 52 618 | 28 99 619 | 29 99 620 | 30 57 621 | 31 100 622 | 32 73 623 | 33 61 624 | 34 64 625 | 35 85 626 | 36 69 627 | 37 55 628 | 38 95 629 | 39 95 630 | 40 64 631 | 41 73 632 | 42 99 633 | 43 88 634 | 44 89 635 | 45 10 636 | 46 9 637 | 47 5 638 | 48 1 639 | 49 3 640 | 50 9 641 | 51 5 642 | 52 4 643 | 53 10 644 | 54 3 645 | 55 5 646 | 56 7 647 | 57 9 648 | 58 6 649 | 59 5 650 | 60 8 651 | 61 2 652 | 62 4 653 | 63 3 654 | 64 3 655 | 65 6 656 | 66 3 657 | 67 3 658 | 68 8 659 | 69 5 660 | 70 9 661 | 71 10 662 | 72 4 663 | 73 2 664 | 74 10 665 | 75 1 666 | 76 3 667 | 77 2 668 | 78 5 669 | 79 4 670 | 80 5 671 | 81 7 672 | 82 3 673 | 83 1 674 | 84 7 675 | 85 9 676 | 86 4 677 | 87 4 678 | 88 6 679 | 89 2 680 | 90 8 681 | 91 8 682 | 92 5 683 | 93 5 684 | 94 9 685 | 95 10 686 | 96 8 687 | 97 1 688 | 98 6 689 | 99 10 690 | 100 6 691 | 101 10 692 | 102 6 693 | 103 7 694 | 104 6 695 | 105 2 696 | 106 9 697 | 107 6 698 | 108 8 699 | 109 6 700 | 110 3 701 | 111 10 702 | 112 6 703 | 113 4 704 | 114 2 705 | 115 9 706 | 116 6 707 | 117 1 708 | 118 3 709 | 119 9 710 | 120 8 711 | 121 8 712 | 122 1 713 | 123 4 714 | 124 4 715 | 125 2 716 | 126 7 717 | 127 5 718 | 128 2 719 | 129 10 720 | 130 7 721 | 131 9 722 | 132 1 723 | 133 9 724 | 134 2 725 | 135 2 726 | 136 4 727 | 137 6 728 | 138 2 729 | 139 4 730 | 140 6 731 | 141 6 732 | 142 7 733 | 143 5 734 | 144 9 735 | 145 6 736 | 146 10 737 | 147 1 738 | 148 3 739 | 149 9 740 | 150 3 741 | 151 4 742 | 152 6 743 | 153 1 744 | 154 8 745 | 155 5 746 | 156 7 747 | 157 5 748 | 158 2 749 | 159 1 750 | 160 8 751 | 161 6 752 | 162 7 753 | 163 4 754 | 164 6 755 | 165 5 756 | 166 1 757 | 167 8 758 | 168 9 759 | 169 8 760 | 170 9 761 | 171 8 762 | 172 9 763 | 173 3 764 | 174 9 765 | 175 2 766 | 176 4 767 | 177 6 768 | 178 8 769 | 179 9 770 | 180 1 771 | 181 5 772 | 182 6 773 | 183 2 774 | 184 4 775 | 185 2 776 | 186 2 777 | 187 3 778 | 188 6 779 | 189 7 780 | 190 6 781 | 191 9 782 | 192 9 783 | 193 1 784 | 194 10 785 | 195 7 786 | 196 2 787 | 197 1 788 | 198 5 789 | 199 7 790 | 200 4 791 | 201 9 792 | 202 4 793 | 203 1 794 | 204 10 795 | 205 1 796 | 206 1 797 | 207 2 798 | 208 5 799 | 209 6 800 | 210 10 801 | 211 7 802 | 212 2 803 | 213 1 804 | 214 6 805 | 215 3 806 | 216 2 807 | 217 4 808 | 218 4 809 | 219 1 810 | 220 4 811 | 221 10 812 | 222 2 813 | 223 2 814 | 224 6 815 | 225 7 816 | 226 7 817 | 227 10 818 | 228 4 819 | 229 9 820 | 230 6 821 | 231 2 822 | 232 1 823 | 233 2 824 | 234 9 825 | 235 5 826 | 236 2 827 | 237 1 828 | 238 7 829 | 239 9 830 | 240 4 831 | 241 9 832 | 242 7 833 | 243 7 834 | 244 10 835 | 245 1 836 | 246 4 837 | 247 2 838 | 248 4 839 | 249 9 840 | 250 8 841 | 251 2 842 | 252 4 843 | 253 7 844 | 254 2 845 | 255 3 846 | 256 3 847 | 257 8 848 | 258 10 849 | 259 7 850 | 260 3 851 | 261 1 852 | 262 7 853 | 263 5 854 | 264 4 855 | 265 1 856 | 266 7 857 | 267 2 858 | 268 6 859 | 269 5 860 | 270 7 861 | 271 5 862 | 272 4 863 | 273 8 864 | 274 3 865 | 275 1 866 | 276 6 867 | 277 6 868 | 278 4 869 | 279 1 870 | 280 3 871 | 281 1 872 | 282 5 873 | 283 7 874 | 284 8 875 | 285 1 876 | 286 9 877 | 287 4 878 | 288 1 879 | 289 5 880 | 290 4 881 | 291 9 882 | 292 1 883 | 293 10 884 | 294 1 885 | 295 9 886 | 296 4 887 | 297 6 888 | 298 10 889 | 299 6 890 | 300 5 891 | 301 8 892 | 302 6 893 | 303 2 894 | 304 7 895 | 305 4 896 | 306 10 897 | 307 2 898 | 308 2 899 | 309 9 900 | 310 6 901 | 311 1 902 | 312 10 903 | 313 1 904 | 314 9 905 | 315 10 906 | 316 9 907 | 317 3 908 | 318 5 909 | 319 8 910 | 320 4 911 | 321 1 912 | 322 9 913 | 323 9 914 | 324 2 915 | 325 9 916 | 326 9 917 | 327 7 918 | 328 4 919 | 329 1 920 | 330 1 921 | 331 9 922 | 332 2 923 | 333 10 924 | 334 5 925 | 335 3 926 | 336 5 927 | 337 1 928 | 338 9 929 | 339 2 930 | 340 2 931 | 341 4 932 | 342 5 933 | 343 6 934 | 344 8 935 | 345 2 936 | 346 2 937 | 347 3 938 | 348 8 939 | 349 6 940 | 350 3 941 | 351 7 942 | 352 4 943 | 353 9 944 | 354 9 945 | 355 10 946 | 356 7 947 | 357 9 948 | 358 4 949 | 359 10 950 | 360 6 951 | 361 9 952 | 362 1 953 | 363 2 954 | 364 9 955 | 365 5 956 | 366 7 957 | 367 1 958 | 368 2 959 | 369 10 960 | 370 5 961 | 371 3 962 | 372 8 963 | 373 1 964 | 374 3 965 | 375 8 966 | 376 10 967 | 377 6 968 | 378 6 969 | 379 8 970 | 380 9 971 | 381 3 972 | 382 5 973 | 383 4 974 | 384 3 975 | 385 1 976 | 386 6 977 | 387 3 978 | 388 9 979 | 389 4 980 | 390 9 981 | 391 1 982 | 392 3 983 | 393 1 984 | 394 5 985 | 395 9 986 | 396 10 987 | 397 6 988 | 398 4 989 | 399 7 990 | 400 9 991 | 401 5 992 | 402 9 993 | 403 9 994 | 404 3 995 | 405 4 996 | 406 1 997 | 407 10 998 | 408 8 999 | 409 7 1000 | 410 4 1001 | 411 8 1002 | 412 4 1003 | 413 7 1004 | 414 3 1005 | 415 1 1006 | 416 3 1007 | 417 9 1008 | 418 2 1009 | 419 2 1010 | 420 1 1011 | 421 6 1012 | 422 7 1013 | 423 4 1014 | 424 8 1015 | 425 10 1016 | 426 3 1017 | 427 3 1018 | 428 5 1019 | 429 3 1020 | 430 10 1021 | 431 5 1022 | 432 9 1023 | 433 8 1024 | 434 3 1025 | 435 2 1026 | 436 8 1027 | 437 5 1028 | 438 3 1029 | 439 4 1030 | 440 5 1031 | 441 6 1032 | 442 9 1033 | 443 5 1034 | 444 6 1035 | 445 9 1036 | 446 1 1037 | 447 1 1038 | 448 9 1039 | 449 7 1040 | 450 10 1041 | 451 9 1042 | 452 5 1043 | 453 7 1044 | 454 9 1045 | 455 10 1046 | 456 3 1047 | 457 9 1048 | 458 9 1049 | 459 5 1050 | 460 8 1051 | 461 1 1052 | 462 6 1053 | 463 7 1054 | 464 5 1055 | 465 1 1056 | 466 1 1057 | 467 4 1058 | 468 7 1059 | 469 7 1060 | 470 2 1061 | 471 2 1062 | 472 4 1063 | 473 6 1064 | 474 2 1065 | 475 2 1066 | 476 6 1067 | 477 3 1068 | 478 1 1069 | 479 5 1070 | 480 1 1071 | 481 6 1072 | 482 3 1073 | 483 7 1074 | 484 4 1075 | 485 10 1076 | 486 9 1077 | 487 1 1078 | 488 10 1079 | 489 10 1080 | 490 6 1081 | 491 8 1082 | 492 2 1083 | 493 1 1084 | 494 4 1085 | 495 6 1086 | 496 9 1087 | 497 7 1088 | 498 4 1089 | 499 8 1090 | 500 1 1091 | 501 2 1092 | 502 8 1093 | 503 7 1094 | 504 5 1095 | 505 9 1096 | 506 7 1097 | 507 2 1098 | 508 8 1099 | 509 10 1100 | 510 4 1101 | 511 8 1102 | 512 2 1103 | 513 10 1104 | 514 3 1105 | 515 7 1106 | 516 10 1107 | 517 8 1108 | 518 8 1109 | 519 1 1110 | 520 2 1111 | 521 7 1112 | 522 4 1113 | 523 5 1114 | 524 8 1115 | 525 6 1116 | 526 9 1117 | 527 3 1118 | 528 3 1119 | 529 9 1120 | 530 6 1121 | 531 6 1122 | 532 4 1123 | 533 3 1124 | 534 6 1125 | 535 2 1126 | 536 4 1127 | 537 8 1128 | 538 6 1129 | 539 6 1130 | 540 4 1131 | 541 4 1132 | 542 5 1133 | 543 1 1134 | 544 5 1135 | 545 10 1136 | 546 2 1137 | 547 4 1138 | 548 6 1139 | 549 2 1140 | 550 10 1141 | 551 2 1142 | 552 2 1143 | 553 10 1144 | 554 8 1145 | 555 8 1146 | 556 10 1147 | 557 9 1148 | 558 1 1149 | 559 2 1150 | 560 1 1151 | 561 8 1152 | 562 9 1153 | 563 1 1154 | 564 8 1155 | 565 1 1156 | 566 8 1157 | 567 10 1158 | 568 1 1159 | 569 6 1160 | 570 1 1161 | 571 8 1162 | 572 7 1163 | 573 7 1164 | STATIONS_COORD_SECTION 1165 | 574 1166 | 575 1167 | 576 1168 | 577 1169 | DEPOT_SECTION 1170 | 1 1171 | -1 1172 | EOF 1173 | -------------------------------------------------------------------------------- /benchmarks/evrp-2019/X-n573-k30.evrp: -------------------------------------------------------------------------------- 1 | Name: Mavrovouniotis Menelaou Instances Test: 1 2 | COMMENT: Modificatification of X-n573-k30 instance. Modified by Mavrovouniotis Menelaou. 3 | TYPE: EVRP 4 | OPTIMAL_VALUE: 0 5 | VEHICLES: 30 6 | DIMENSION: 579 7 | STATIONS: 6 8 | CAPACITY: 210 9 | ENERGY_CAPACITY: 1691 10 | ENERGY_CONSUMPTION: 1.00 11 | EDGE_WEIGHT_FORMAT: EUC_2D 12 | NODE_COORD_SECTION 13 | 1 0 0 14 | 2 753 355 15 | 3 663 83 16 | 4 725 286 17 | 5 734 504 18 | 6 704 145 19 | 7 728 311 20 | 8 675 58 21 | 9 617 242 22 | 10 864 334 23 | 11 772 258 24 | 12 516 109 25 | 13 717 123 26 | 14 768 161 27 | 15 598 365 28 | 16 896 569 29 | 17 781 281 30 | 18 898 397 31 | 19 714 126 32 | 20 780 311 33 | 21 809 60 34 | 22 728 244 35 | 23 724 219 36 | 24 712 177 37 | 25 694 432 38 | 26 491 157 39 | 27 854 648 40 | 28 612 179 41 | 29 623 337 42 | 30 788 320 43 | 31 772 378 44 | 32 736 308 45 | 33 692 303 46 | 34 737 334 47 | 35 576 27 48 | 36 731 360 49 | 37 763 301 50 | 38 633 578 51 | 39 935 244 52 | 40 513 73 53 | 41 511 133 54 | 42 671 349 55 | 43 729 254 56 | 44 771 261 57 | 45 851 278 58 | 46 827 365 59 | 47 682 113 60 | 48 553 425 61 | 49 544 282 62 | 50 706 165 63 | 51 527 26 64 | 52 580 220 65 | 53 908 303 66 | 54 841 306 67 | 55 656 34 68 | 56 864 196 69 | 57 618 270 70 | 58 699 347 71 | 59 787 289 72 | 60 678 11 73 | 61 643 387 74 | 62 757 114 75 | 63 858 395 76 | 64 706 157 77 | 65 713 243 78 | 66 663 319 79 | 67 615 448 80 | 68 898 477 81 | 69 767 131 82 | 70 718 334 83 | 71 871 216 84 | 72 694 435 85 | 73 617 345 86 | 74 645 75 87 | 75 513 50 88 | 76 767 259 89 | 77 773 313 90 | 78 589 104 91 | 79 760 287 92 | 80 595 425 93 | 81 763 240 94 | 82 569 225 95 | 83 702 417 96 | 84 593 51 97 | 85 656 83 98 | 86 532 93 99 | 87 834 351 100 | 88 832 274 101 | 89 751 126 102 | 90 796 290 103 | 91 872 212 104 | 92 835 257 105 | 93 702 185 106 | 94 673 187 107 | 95 596 422 108 | 96 740 147 109 | 97 890 180 110 | 98 556 120 111 | 99 638 386 112 | 100 748 319 113 | 101 620 112 114 | 102 794 226 115 | 103 641 383 116 | 104 594 302 117 | 105 725 400 118 | 106 731 321 119 | 107 703 296 120 | 108 614 503 121 | 109 715 179 122 | 110 781 317 123 | 111 841 365 124 | 112 783 270 125 | 113 778 420 126 | 114 770 372 127 | 115 907 192 128 | 116 913 434 129 | 117 647 749 130 | 118 683 171 131 | 119 649 324 132 | 120 359 195 133 | 121 867 471 134 | 122 585 218 135 | 123 757 323 136 | 124 914 399 137 | 125 681 323 138 | 126 603 251 139 | 127 554 275 140 | 128 762 315 141 | 129 813 342 142 | 130 801 379 143 | 131 724 14 144 | 132 775 342 145 | 133 727 221 146 | 134 715 314 147 | 135 731 363 148 | 136 788 250 149 | 137 649 29 150 | 138 655 407 151 | 139 567 325 152 | 140 624 88 153 | 141 763 422 154 | 142 669 54 155 | 143 785 537 156 | 144 765 384 157 | 145 654 348 158 | 146 677 313 159 | 147 848 491 160 | 148 814 112 161 | 149 699 70 162 | 150 658 353 163 | 151 550 42 164 | 152 853 372 165 | 153 540 24 166 | 154 626 65 167 | 155 661 37 168 | 156 769 395 169 | 157 715 396 170 | 158 714 325 171 | 159 729 241 172 | 160 692 271 173 | 161 638 306 174 | 162 715 360 175 | 163 697 213 176 | 164 704 114 177 | 165 699 231 178 | 166 911 240 179 | 167 789 296 180 | 168 598 279 181 | 169 656 384 182 | 170 636 117 183 | 171 637 296 184 | 172 864 347 185 | 173 844 382 186 | 174 595 121 187 | 175 590 28 188 | 176 734 288 189 | 177 641 174 190 | 178 789 60 191 | 179 729 563 192 | 180 839 459 193 | 181 685 249 194 | 182 626 159 195 | 183 610 15 196 | 184 671 265 197 | 185 1000 201 198 | 186 875 408 199 | 187 419 38 200 | 188 671 63 201 | 189 693 73 202 | 190 803 184 203 | 191 690 55 204 | 192 680 192 205 | 193 511 191 206 | 194 899 256 207 | 195 610 110 208 | 196 827 287 209 | 197 672 526 210 | 198 751 216 211 | 199 755 311 212 | 200 770 321 213 | 201 750 262 214 | 202 665 436 215 | 203 595 339 216 | 204 743 228 217 | 205 748 421 218 | 206 736 240 219 | 207 747 298 220 | 208 511 179 221 | 209 753 707 222 | 210 413 402 223 | 211 628 437 224 | 212 661 207 225 | 213 737 328 226 | 214 711 285 227 | 215 655 325 228 | 216 800 288 229 | 217 804 352 230 | 218 678 59 231 | 219 623 79 232 | 220 825 278 233 | 221 736 469 234 | 222 728 268 235 | 223 675 177 236 | 224 641 245 237 | 225 686 180 238 | 226 617 646 239 | 227 903 84 240 | 228 646 72 241 | 229 778 409 242 | 230 865 386 243 | 231 928 420 244 | 232 668 91 245 | 233 702 123 246 | 234 705 306 247 | 235 574 355 248 | 236 684 468 249 | 237 700 483 250 | 238 617 442 251 | 239 629 426 252 | 240 767 394 253 | 241 750 212 254 | 242 828 227 255 | 243 544 253 256 | 244 605 107 257 | 245 746 356 258 | 246 737 130 259 | 247 638 79 260 | 248 600 47 261 | 249 734 377 262 | 250 652 13 263 | 251 482 164 264 | 252 737 249 265 | 253 740 161 266 | 254 554 181 267 | 255 623 270 268 | 256 748 363 269 | 257 655 305 270 | 258 878 250 271 | 259 638 311 272 | 260 743 397 273 | 261 663 78 274 | 262 649 322 275 | 263 718 309 276 | 264 711 345 277 | 265 750 222 278 | 266 734 195 279 | 267 691 372 280 | 268 676 264 281 | 269 793 263 282 | 270 638 111 283 | 271 717 372 284 | 272 670 184 285 | 273 635 112 286 | 274 677 120 287 | 275 708 173 288 | 276 741 62 289 | 277 483 71 290 | 278 851 348 291 | 279 776 165 292 | 280 807 346 293 | 281 659 341 294 | 282 732 272 295 | 283 815 259 296 | 284 739 375 297 | 285 907 319 298 | 286 777 316 299 | 287 756 77 300 | 288 668 72 301 | 289 766 304 302 | 290 661 144 303 | 291 599 97 304 | 292 648 208 305 | 293 696 412 306 | 294 878 216 307 | 295 507 50 308 | 296 848 417 309 | 297 673 295 310 | 298 734 420 311 | 299 676 104 312 | 300 756 332 313 | 301 667 238 314 | 302 616 134 315 | 303 692 255 316 | 304 705 186 317 | 305 675 191 318 | 306 657 99 319 | 307 760 418 320 | 308 827 350 321 | 309 662 529 322 | 310 821 447 323 | 311 759 191 324 | 312 753 72 325 | 313 859 378 326 | 314 646 242 327 | 315 896 475 328 | 316 566 258 329 | 317 645 338 330 | 318 546 60 331 | 319 748 263 332 | 320 805 435 333 | 321 785 387 334 | 322 510 198 335 | 323 937 390 336 | 324 641 386 337 | 325 759 274 338 | 326 714 352 339 | 327 674 332 340 | 328 662 189 341 | 329 712 354 342 | 330 685 112 343 | 331 628 73 344 | 332 728 372 345 | 333 703 99 346 | 334 692 48 347 | 335 746 335 348 | 336 791 248 349 | 337 579 98 350 | 338 732 249 351 | 339 503 63 352 | 340 595 63 353 | 341 877 228 354 | 342 812 137 355 | 343 788 235 356 | 344 647 192 357 | 345 738 410 358 | 346 600 100 359 | 347 742 417 360 | 348 616 343 361 | 349 830 330 362 | 350 681 162 363 | 351 809 41 364 | 352 845 394 365 | 353 714 51 366 | 354 602 236 367 | 355 590 57 368 | 356 766 375 369 | 357 746 391 370 | 358 657 113 371 | 359 630 128 372 | 360 643 248 373 | 361 623 315 374 | 362 805 534 375 | 363 639 178 376 | 364 603 114 377 | 365 779 398 378 | 366 680 289 379 | 367 994 383 380 | 368 463 284 381 | 369 715 367 382 | 370 625 297 383 | 371 773 278 384 | 372 701 345 385 | 373 729 331 386 | 374 658 317 387 | 375 807 287 388 | 376 638 7 389 | 377 669 12 390 | 378 616 128 391 | 379 587 403 392 | 380 962 294 393 | 381 717 278 394 | 382 557 161 395 | 383 565 465 396 | 384 631 245 397 | 385 816 144 398 | 386 706 90 399 | 387 771 428 400 | 388 839 190 401 | 389 786 419 402 | 390 754 358 403 | 391 687 82 404 | 392 690 187 405 | 393 692 441 406 | 394 839 365 407 | 395 763 191 408 | 396 724 301 409 | 397 791 198 410 | 398 697 159 411 | 399 661 220 412 | 400 776 276 413 | 401 736 431 414 | 402 892 182 415 | 403 602 33 416 | 404 487 297 417 | 405 747 65 418 | 406 721 103 419 | 407 744 240 420 | 408 648 381 421 | 409 571 6 422 | 410 646 130 423 | 411 758 317 424 | 412 779 433 425 | 413 737 308 426 | 414 736 197 427 | 415 585 87 428 | 416 668 304 429 | 417 863 289 430 | 418 861 472 431 | 419 628 358 432 | 420 857 330 433 | 421 755 375 434 | 422 601 537 435 | 423 759 310 436 | 424 704 272 437 | 425 642 346 438 | 426 710 240 439 | 427 877 382 440 | 428 877 287 441 | 429 573 197 442 | 430 339 383 443 | 431 651 320 444 | 432 754 254 445 | 433 694 52 446 | 434 814 293 447 | 435 703 274 448 | 436 496 169 449 | 437 766 182 450 | 438 480 92 451 | 439 847 178 452 | 440 928 298 453 | 441 871 664 454 | 442 656 36 455 | 443 753 175 456 | 444 742 128 457 | 445 760 363 458 | 446 677 376 459 | 447 761 383 460 | 448 855 434 461 | 449 773 366 462 | 450 710 177 463 | 451 762 378 464 | 452 876 191 465 | 453 801 250 466 | 454 481 159 467 | 455 839 209 468 | 456 544 312 469 | 457 749 288 470 | 458 704 91 471 | 459 647 158 472 | 460 722 176 473 | 461 608 213 474 | 462 720 277 475 | 463 757 350 476 | 464 697 229 477 | 465 890 258 478 | 466 779 273 479 | 467 949 223 480 | 468 738 400 481 | 469 674 438 482 | 470 626 293 483 | 471 716 467 484 | 472 593 371 485 | 473 872 314 486 | 474 616 310 487 | 475 670 454 488 | 476 762 339 489 | 477 676 366 490 | 478 766 318 491 | 479 753 389 492 | 480 766 236 493 | 481 671 75 494 | 482 901 344 495 | 483 737 290 496 | 484 602 77 497 | 485 784 319 498 | 486 783 268 499 | 487 792 335 500 | 488 813 294 501 | 489 768 302 502 | 490 770 281 503 | 491 798 190 504 | 492 696 305 505 | 493 714 336 506 | 494 684 65 507 | 495 686 329 508 | 496 751 357 509 | 497 667 260 510 | 498 734 295 511 | 499 538 203 512 | 500 838 499 513 | 501 104 364 514 | 502 689 47 515 | 503 621 231 516 | 504 656 128 517 | 505 595 31 518 | 506 793 258 519 | 507 844 287 520 | 508 630 165 521 | 509 537 118 522 | 510 607 413 523 | 511 783 359 524 | 512 673 280 525 | 513 756 224 526 | 514 676 466 527 | 515 609 102 528 | 516 738 221 529 | 517 556 84 530 | 518 789 84 531 | 519 624 239 532 | 520 721 70 533 | 521 711 338 534 | 522 649 180 535 | 523 229 166 536 | 524 782 342 537 | 525 759 222 538 | 526 872 494 539 | 527 589 39 540 | 528 533 226 541 | 529 704 206 542 | 530 644 66 543 | 531 830 288 544 | 532 585 126 545 | 533 660 72 546 | 534 554 11 547 | 535 755 300 548 | 536 587 243 549 | 537 708 115 550 | 538 610 16 551 | 539 774 505 552 | 540 640 436 553 | 541 683 210 554 | 542 936 268 555 | 543 795 414 556 | 544 693 592 557 | 545 817 108 558 | 546 710 305 559 | 547 739 217 560 | 548 725 45 561 | 549 638 118 562 | 550 711 456 563 | 551 783 128 564 | 552 761 313 565 | 553 866 479 566 | 554 817 400 567 | 555 554 297 568 | 556 778 342 569 | 557 654 271 570 | 558 756 239 571 | 559 748 41 572 | 560 648 151 573 | 561 701 286 574 | 562 735 275 575 | 563 792 334 576 | 564 674 111 577 | 565 754 300 578 | 566 740 149 579 | 567 798 531 580 | 568 661 275 581 | 569 530 155 582 | 570 532 181 583 | 571 587 360 584 | 572 869 444 585 | 573 794 227 586 | 574 167 188 587 | 575 167 562 588 | 576 500 188 589 | 577 500 562 590 | 578 834 188 591 | 579 834 562 592 | DEMAND_SECTION 593 | 1 0 594 | 2 78 595 | 3 96 596 | 4 64 597 | 5 87 598 | 6 70 599 | 7 57 600 | 8 63 601 | 9 86 602 | 10 89 603 | 11 64 604 | 12 53 605 | 13 86 606 | 14 69 607 | 15 94 608 | 16 62 609 | 17 96 610 | 18 89 611 | 19 92 612 | 20 72 613 | 21 59 614 | 22 93 615 | 23 55 616 | 24 96 617 | 25 81 618 | 26 65 619 | 27 52 620 | 28 99 621 | 29 99 622 | 30 57 623 | 31 100 624 | 32 73 625 | 33 61 626 | 34 64 627 | 35 85 628 | 36 69 629 | 37 55 630 | 38 95 631 | 39 95 632 | 40 64 633 | 41 73 634 | 42 99 635 | 43 88 636 | 44 89 637 | 45 10 638 | 46 9 639 | 47 5 640 | 48 1 641 | 49 3 642 | 50 9 643 | 51 5 644 | 52 4 645 | 53 10 646 | 54 3 647 | 55 5 648 | 56 7 649 | 57 9 650 | 58 6 651 | 59 5 652 | 60 8 653 | 61 2 654 | 62 4 655 | 63 3 656 | 64 3 657 | 65 6 658 | 66 3 659 | 67 3 660 | 68 8 661 | 69 5 662 | 70 9 663 | 71 10 664 | 72 4 665 | 73 2 666 | 74 10 667 | 75 1 668 | 76 3 669 | 77 2 670 | 78 5 671 | 79 4 672 | 80 5 673 | 81 7 674 | 82 3 675 | 83 1 676 | 84 7 677 | 85 9 678 | 86 4 679 | 87 4 680 | 88 6 681 | 89 2 682 | 90 8 683 | 91 8 684 | 92 5 685 | 93 5 686 | 94 9 687 | 95 10 688 | 96 8 689 | 97 1 690 | 98 6 691 | 99 10 692 | 100 6 693 | 101 10 694 | 102 6 695 | 103 7 696 | 104 6 697 | 105 2 698 | 106 9 699 | 107 6 700 | 108 8 701 | 109 6 702 | 110 3 703 | 111 10 704 | 112 6 705 | 113 4 706 | 114 2 707 | 115 9 708 | 116 6 709 | 117 1 710 | 118 3 711 | 119 9 712 | 120 8 713 | 121 8 714 | 122 1 715 | 123 4 716 | 124 4 717 | 125 2 718 | 126 7 719 | 127 5 720 | 128 2 721 | 129 10 722 | 130 7 723 | 131 9 724 | 132 1 725 | 133 9 726 | 134 2 727 | 135 2 728 | 136 4 729 | 137 6 730 | 138 2 731 | 139 4 732 | 140 6 733 | 141 6 734 | 142 7 735 | 143 5 736 | 144 9 737 | 145 6 738 | 146 10 739 | 147 1 740 | 148 3 741 | 149 9 742 | 150 3 743 | 151 4 744 | 152 6 745 | 153 1 746 | 154 8 747 | 155 5 748 | 156 7 749 | 157 5 750 | 158 2 751 | 159 1 752 | 160 8 753 | 161 6 754 | 162 7 755 | 163 4 756 | 164 6 757 | 165 5 758 | 166 1 759 | 167 8 760 | 168 9 761 | 169 8 762 | 170 9 763 | 171 8 764 | 172 9 765 | 173 3 766 | 174 9 767 | 175 2 768 | 176 4 769 | 177 6 770 | 178 8 771 | 179 9 772 | 180 1 773 | 181 5 774 | 182 6 775 | 183 2 776 | 184 4 777 | 185 2 778 | 186 2 779 | 187 3 780 | 188 6 781 | 189 7 782 | 190 6 783 | 191 9 784 | 192 9 785 | 193 1 786 | 194 10 787 | 195 7 788 | 196 2 789 | 197 1 790 | 198 5 791 | 199 7 792 | 200 4 793 | 201 9 794 | 202 4 795 | 203 1 796 | 204 10 797 | 205 1 798 | 206 1 799 | 207 2 800 | 208 5 801 | 209 6 802 | 210 10 803 | 211 7 804 | 212 2 805 | 213 1 806 | 214 6 807 | 215 3 808 | 216 2 809 | 217 4 810 | 218 4 811 | 219 1 812 | 220 4 813 | 221 10 814 | 222 2 815 | 223 2 816 | 224 6 817 | 225 7 818 | 226 7 819 | 227 10 820 | 228 4 821 | 229 9 822 | 230 6 823 | 231 2 824 | 232 1 825 | 233 2 826 | 234 9 827 | 235 5 828 | 236 2 829 | 237 1 830 | 238 7 831 | 239 9 832 | 240 4 833 | 241 9 834 | 242 7 835 | 243 7 836 | 244 10 837 | 245 1 838 | 246 4 839 | 247 2 840 | 248 4 841 | 249 9 842 | 250 8 843 | 251 2 844 | 252 4 845 | 253 7 846 | 254 2 847 | 255 3 848 | 256 3 849 | 257 8 850 | 258 10 851 | 259 7 852 | 260 3 853 | 261 1 854 | 262 7 855 | 263 5 856 | 264 4 857 | 265 1 858 | 266 7 859 | 267 2 860 | 268 6 861 | 269 5 862 | 270 7 863 | 271 5 864 | 272 4 865 | 273 8 866 | 274 3 867 | 275 1 868 | 276 6 869 | 277 6 870 | 278 4 871 | 279 1 872 | 280 3 873 | 281 1 874 | 282 5 875 | 283 7 876 | 284 8 877 | 285 1 878 | 286 9 879 | 287 4 880 | 288 1 881 | 289 5 882 | 290 4 883 | 291 9 884 | 292 1 885 | 293 10 886 | 294 1 887 | 295 9 888 | 296 4 889 | 297 6 890 | 298 10 891 | 299 6 892 | 300 5 893 | 301 8 894 | 302 6 895 | 303 2 896 | 304 7 897 | 305 4 898 | 306 10 899 | 307 2 900 | 308 2 901 | 309 9 902 | 310 6 903 | 311 1 904 | 312 10 905 | 313 1 906 | 314 9 907 | 315 10 908 | 316 9 909 | 317 3 910 | 318 5 911 | 319 8 912 | 320 4 913 | 321 1 914 | 322 9 915 | 323 9 916 | 324 2 917 | 325 9 918 | 326 9 919 | 327 7 920 | 328 4 921 | 329 1 922 | 330 1 923 | 331 9 924 | 332 2 925 | 333 10 926 | 334 5 927 | 335 3 928 | 336 5 929 | 337 1 930 | 338 9 931 | 339 2 932 | 340 2 933 | 341 4 934 | 342 5 935 | 343 6 936 | 344 8 937 | 345 2 938 | 346 2 939 | 347 3 940 | 348 8 941 | 349 6 942 | 350 3 943 | 351 7 944 | 352 4 945 | 353 9 946 | 354 9 947 | 355 10 948 | 356 7 949 | 357 9 950 | 358 4 951 | 359 10 952 | 360 6 953 | 361 9 954 | 362 1 955 | 363 2 956 | 364 9 957 | 365 5 958 | 366 7 959 | 367 1 960 | 368 2 961 | 369 10 962 | 370 5 963 | 371 3 964 | 372 8 965 | 373 1 966 | 374 3 967 | 375 8 968 | 376 10 969 | 377 6 970 | 378 6 971 | 379 8 972 | 380 9 973 | 381 3 974 | 382 5 975 | 383 4 976 | 384 3 977 | 385 1 978 | 386 6 979 | 387 3 980 | 388 9 981 | 389 4 982 | 390 9 983 | 391 1 984 | 392 3 985 | 393 1 986 | 394 5 987 | 395 9 988 | 396 10 989 | 397 6 990 | 398 4 991 | 399 7 992 | 400 9 993 | 401 5 994 | 402 9 995 | 403 9 996 | 404 3 997 | 405 4 998 | 406 1 999 | 407 10 1000 | 408 8 1001 | 409 7 1002 | 410 4 1003 | 411 8 1004 | 412 4 1005 | 413 7 1006 | 414 3 1007 | 415 1 1008 | 416 3 1009 | 417 9 1010 | 418 2 1011 | 419 2 1012 | 420 1 1013 | 421 6 1014 | 422 7 1015 | 423 4 1016 | 424 8 1017 | 425 10 1018 | 426 3 1019 | 427 3 1020 | 428 5 1021 | 429 3 1022 | 430 10 1023 | 431 5 1024 | 432 9 1025 | 433 8 1026 | 434 3 1027 | 435 2 1028 | 436 8 1029 | 437 5 1030 | 438 3 1031 | 439 4 1032 | 440 5 1033 | 441 6 1034 | 442 9 1035 | 443 5 1036 | 444 6 1037 | 445 9 1038 | 446 1 1039 | 447 1 1040 | 448 9 1041 | 449 7 1042 | 450 10 1043 | 451 9 1044 | 452 5 1045 | 453 7 1046 | 454 9 1047 | 455 10 1048 | 456 3 1049 | 457 9 1050 | 458 9 1051 | 459 5 1052 | 460 8 1053 | 461 1 1054 | 462 6 1055 | 463 7 1056 | 464 5 1057 | 465 1 1058 | 466 1 1059 | 467 4 1060 | 468 7 1061 | 469 7 1062 | 470 2 1063 | 471 2 1064 | 472 4 1065 | 473 6 1066 | 474 2 1067 | 475 2 1068 | 476 6 1069 | 477 3 1070 | 478 1 1071 | 479 5 1072 | 480 1 1073 | 481 6 1074 | 482 3 1075 | 483 7 1076 | 484 4 1077 | 485 10 1078 | 486 9 1079 | 487 1 1080 | 488 10 1081 | 489 10 1082 | 490 6 1083 | 491 8 1084 | 492 2 1085 | 493 1 1086 | 494 4 1087 | 495 6 1088 | 496 9 1089 | 497 7 1090 | 498 4 1091 | 499 8 1092 | 500 1 1093 | 501 2 1094 | 502 8 1095 | 503 7 1096 | 504 5 1097 | 505 9 1098 | 506 7 1099 | 507 2 1100 | 508 8 1101 | 509 10 1102 | 510 4 1103 | 511 8 1104 | 512 2 1105 | 513 10 1106 | 514 3 1107 | 515 7 1108 | 516 10 1109 | 517 8 1110 | 518 8 1111 | 519 1 1112 | 520 2 1113 | 521 7 1114 | 522 4 1115 | 523 5 1116 | 524 8 1117 | 525 6 1118 | 526 9 1119 | 527 3 1120 | 528 3 1121 | 529 9 1122 | 530 6 1123 | 531 6 1124 | 532 4 1125 | 533 3 1126 | 534 6 1127 | 535 2 1128 | 536 4 1129 | 537 8 1130 | 538 6 1131 | 539 6 1132 | 540 4 1133 | 541 4 1134 | 542 5 1135 | 543 1 1136 | 544 5 1137 | 545 10 1138 | 546 2 1139 | 547 4 1140 | 548 6 1141 | 549 2 1142 | 550 10 1143 | 551 2 1144 | 552 2 1145 | 553 10 1146 | 554 8 1147 | 555 8 1148 | 556 10 1149 | 557 9 1150 | 558 1 1151 | 559 2 1152 | 560 1 1153 | 561 8 1154 | 562 9 1155 | 563 1 1156 | 564 8 1157 | 565 1 1158 | 566 8 1159 | 567 10 1160 | 568 1 1161 | 569 6 1162 | 570 1 1163 | 571 8 1164 | 572 7 1165 | 573 7 1166 | STATIONS_COORD_SECTION 1167 | 574 1168 | 575 1169 | 576 1170 | 577 1171 | 578 1172 | 579 1173 | DEPOT_SECTION 1174 | 1 1175 | -1 1176 | EOF -------------------------------------------------------------------------------- /algorithms/GSGA.py: -------------------------------------------------------------------------------- 1 | from bisect import bisect_right 2 | from copy import deepcopy 3 | import random 4 | from time import time 5 | from typing import List 6 | from random import shuffle, randint, uniform, random, choice 7 | 8 | import numpy as np 9 | 10 | from objects.node import Node 11 | from objects.solution import Solution 12 | from objects.problem import Problem 13 | from algorithms.GreedySearch import GreedySearch 14 | 15 | import pandas as pd 16 | import matplotlib.pyplot as plt 17 | 18 | class GSGA(): 19 | """ 20 | Here is a basic implementation of a GA class in Python for solving the VRP problem. 21 | It takes a `Problem` object, population size, generations, crossover probability, mutation probability, and elite size as input arguments. 22 | It has a `run` method which returns the best solution found by the GA after the specified number of generations. 23 | It also has several helper functions for initializing the population, obtaining the elite, tournament selection, crossover, and mutation. 24 | Note that this implementation only provides a basic framework for a GA and may need to be modified or extended depending on the specific VRP problem you are attempting to solve. 25 | 26 | """ 27 | def __init__(self, population_size: int, generations: int, crossover_prob: float, 28 | mutation_prob: float, elite_rate: int): 29 | self.population_size = population_size 30 | self.generations = generations 31 | self.crossover_prob = crossover_prob 32 | self.mutation_prob = mutation_prob 33 | self.elite_size = int(population_size * elite_rate) 34 | self.history = { 35 | 'Mean Pop Fitness': [], 36 | 'Best Pop Fitness': [] 37 | } 38 | self.ranks = [] 39 | self.population = [] 40 | self.gs = GreedySearch() 41 | 42 | def set_problem(self, problem: Problem): 43 | self.problem = problem 44 | self.gs.set_problem(problem) 45 | self.population = self._initial_population() 46 | 47 | def free(self): 48 | self.history = { 49 | 'Mean Pop Fitness': [], 50 | 'Best Pop Fitness': [] 51 | } 52 | self.ranks = [] 53 | self.population = self._initial_population() 54 | 55 | def selection(self, population: List[Solution], num: int) -> List[Solution]: 56 | population = sorted(population) 57 | # drop duplicates 58 | unique_pop = [population[0]] 59 | 60 | for i in range(1, len(population)): 61 | if population[i].get_presentation() != population[i-1].get_presentation(): 62 | unique_pop.append(population[i]) 63 | 64 | new_pop = unique_pop[:self.elite_size] 65 | new_pop.extend(self.choose_by_probs(unique_pop[len(new_pop):], num - len(new_pop))) 66 | return new_pop 67 | 68 | def solve(self, problem: Problem, verbose=False, plot_path=None) -> Solution: 69 | self.set_problem(problem) 70 | 71 | for i in range(self.generations): 72 | alpha = np.cos(np.pi / 3 * (i + 1) / self.generations) ** 2 73 | new_population = [] 74 | self.compute_rank(self.population) 75 | 76 | while len(new_population) < self.population_size: 77 | id_1 = self.choose_by_rank(self.population) 78 | id_2 = self.choose_by_rank(self.population) 79 | 80 | while id_1 == id_2: 81 | id_2 = self.choose_by_rank(self.population) 82 | 83 | child_1, child_2 = self.population[id_1], self.population[id_2] 84 | 85 | if random() < self.crossover_prob: 86 | child_1, child_2 = self.distribute_crossover(child_1, child_2) 87 | 88 | if random() < self.mutation_prob: 89 | if random() < 2.5 / 4 / np.sqrt(alpha): 90 | child_1 = self.hmm(child_1) 91 | elif random() < 3.75 / 4: 92 | child_1 = self.hsm(child_1) 93 | else: 94 | child_1 = self.random_swap_mutation(child_1) 95 | 96 | if random() < self.mutation_prob: 97 | if random() < 2.5 / 4 / np.sqrt(alpha): 98 | child_2 = self.hmm(child_2) 99 | elif random() < 3.75 / 4: 100 | child_2 = self.hsm(child_2) 101 | else: 102 | child_2 = self.random_swap_mutation(child_2) 103 | 104 | child_1 = self.gs.optimize(child_1) 105 | child_2 = self.gs.optimize(child_2) 106 | 107 | if child_1.get_tour_length() < child_2.get_tour_length(): 108 | new_population.append(child_1) 109 | else: 110 | new_population.append(child_2) 111 | else: 112 | if random() < 2.5 / 4: 113 | child_1 = self.hmm(child_1) 114 | elif random() < 3.75 / 4: 115 | child_1 = self.hsm(child_1) 116 | else: 117 | child_1 = self.random_swap_mutation(child_1) 118 | 119 | child_1 = self.gs.optimize(child_1) 120 | new_population.append(child_1) 121 | 122 | n_news = int(self.population_size * alpha * 0.3) 123 | new_indvs = [self.gs.optimize(self.gs.init_solution()) for _ in range(n_news)] 124 | self.population = self.selection(self.population + new_population, self.population_size - n_news) + new_indvs 125 | valids = [self.problem.check_valid_solution(indv) for indv in self.population] 126 | mean_fit = np.mean([indv.get_tour_length() for i, indv in enumerate(self.population) if valids[i]]) 127 | best_fit = np.min([indv.get_tour_length() for i, indv in enumerate(self.population) if valids[i]]) 128 | 129 | if verbose: 130 | print(f"Generation: {i}, mean fit: {np.round(mean_fit, 3)}, min fit: {np.round(best_fit, 3)}, alpha: {np.round(alpha, 3)}") 131 | 132 | self.history['Mean Pop Fitness'].append(mean_fit) 133 | self.history['Best Pop Fitness'].append(best_fit) 134 | 135 | if plot_path is not None: 136 | self.plot_history(plot_path) 137 | best_sol = self.population[0] 138 | self.problem.plot(best_sol, plot_path.replace('.png', '_solution.png')) 139 | 140 | return self.population[np.argmin([indv.get_tour_length() for indv in self.population])] 141 | 142 | def plot_history(self, path): 143 | df = pd.DataFrame(self.history) 144 | df.plot() 145 | plt.xlabel('Generation') 146 | plt.ylabel('Fitness') 147 | plt.title('Convergence trending ({})'.format(self.problem.get_name())) 148 | plt.legend() 149 | plt.grid() 150 | plt.savefig(path) 151 | plt.close() 152 | 153 | def _initial_population(self) -> List[Solution]: 154 | return [self.gs.optimize(self.gs.init_solution()) for _ in range(self.population_size)] 155 | 156 | def _get_elite(self, population: List[Solution]) -> List[Solution]: 157 | return sorted(population)[:self.elite_size] 158 | 159 | def _tournament_selection(self): 160 | return self.population[randint(0, len(self.population) - 1)] 161 | 162 | def sep_mutation(self, solution: Solution) -> Solution: 163 | solution.set_tour_index() 164 | tours = solution.get_basic_tours() 165 | 166 | if len(tours) == 1: 167 | return solution 168 | 169 | tours = solution.get_basic_tours() 170 | rd_tour_idx = choice(range(len(tours))) 171 | if len(tours[rd_tour_idx]) == 0: 172 | return solution 173 | rd_customer_idx = choice(range(len(tours[rd_tour_idx]))) 174 | rd_customer = tours[rd_tour_idx][rd_customer_idx] 175 | 176 | tour_idx = solution.tour_index[rd_customer.get_id()] 177 | mm_customer_list = [] 178 | for customer_id in self.gs.nearest_dist_customer_matrix[rd_customer.get_id()]: 179 | if solution.tour_index[customer_id] != tour_idx: 180 | mm_customer_list.append(self.problem.get_node_from_id(customer_id)) 181 | if len(mm_customer_list) > 5: 182 | break 183 | 184 | probs = [(len(mm_customer_list) - i + 1) ** 2 for i in range(len(mm_customer_list))] 185 | sum_probs = sum(probs) 186 | probs = [p / sum_probs for p in probs] 187 | mm_customer = np.random.choice(mm_customer_list, p=probs) 188 | mm_customer_tour_idx = solution.tour_index[mm_customer.get_id()] 189 | 190 | have = np.zeros(self.problem.get_num_dimensions()) 191 | alens = set() 192 | 193 | for node in tours[rd_tour_idx]: 194 | alens.add(node.get_id()) 195 | have[node.get_id()] = 1 196 | 197 | for node in tours[mm_customer_tour_idx]: 198 | alens.add(node.get_id()) 199 | have[node.get_id()] = 1 200 | 201 | common_set = [] 202 | 203 | alen_list = list(alens) 204 | shuffle(alen_list) 205 | 206 | for node_id in alen_list: 207 | if random() < 0.5 or len(common_set) < 2: 208 | common_set.append(self.problem.get_node_from_id(node_id)) 209 | alens.remove(node_id) 210 | have[node_id] = 0 211 | 212 | distances = [] 213 | depot_node = self.problem.get_depot() 214 | 215 | for node_1 in common_set: 216 | for node_2 in common_set: 217 | if node_1.get_id() != node_2.get_id(): 218 | vec_1 = np.array([node_1.get_x() - depot_node.get_x(), node_1.get_y() - depot_node.get_y()]) 219 | vec_2 = np.array([node_2.get_x() - depot_node.get_x(), node_2.get_y() - depot_node.get_y()]) 220 | dot_product = np.dot(vec_1, vec_2) 221 | norm_product = np.linalg.norm(vec_1) * np.linalg.norm(vec_2) 222 | if norm_product != 0: 223 | cosine = dot_product / norm_product 224 | cosine = np.clip(cosine, -1, 1) # Ensure cosine is within valid range 225 | angle = np.arccos(cosine) 226 | angle = np.abs(angle) 227 | distances.append((node_1, node_2, angle)) 228 | 229 | distances = sorted(distances, key=lambda x: x[2], reverse=True) 230 | center_1, center_2 = distances[0][:2] 231 | set_1 = [] 232 | set_2 = [] 233 | 234 | for node_id in alen_list: 235 | if have[node_id] == 1: 236 | if self.problem.get_distance(self.problem.get_node_from_id(node_id), center_1) < \ 237 | self.problem.get_distance(self.problem.get_node_from_id(node_id), center_2): 238 | set_1.append(self.problem.get_node_from_id(node_id)) 239 | else: 240 | set_2.append(self.problem.get_node_from_id(node_id)) 241 | 242 | for node in tours[rd_tour_idx]: 243 | if have[node.get_id()] == 0: 244 | set_1.append(node) 245 | 246 | for node in tours[mm_customer_tour_idx]: 247 | if have[node.get_id()] == 0: 248 | set_2.append(node) 249 | 250 | tours[rd_tour_idx] = set_1 251 | tours[mm_customer_tour_idx] = set_2 252 | 253 | return Solution(tours) 254 | 255 | def distribute_crossover(self, parent_1: Solution, parent_2: Solution) -> None: 256 | parent_1_tours = parent_1.get_basic_tours() 257 | parent_2_tours = parent_2.get_basic_tours() 258 | 259 | rd_node_id = choice(self.problem.get_all_customers()).get_id() 260 | id1 = parent_1.tour_index[rd_node_id] 261 | id2 = parent_2.tour_index[rd_node_id] 262 | have = np.zeros(self.problem.get_num_dimensions()) 263 | alens = set() 264 | index = 0 265 | 266 | for node in parent_1_tours[id1]: 267 | alens.add(node.get_id()) 268 | have[node.get_id()] = 1 269 | 270 | for node in parent_2_tours[id2]: 271 | alens.add(node.get_id()) 272 | have[node.get_id()] = 1 273 | 274 | index = 0 275 | alens = list(alens) 276 | shuffle(alens) 277 | 278 | child_1_tours = [] 279 | 280 | for idx_tour in range(len(parent_1_tours)): 281 | for idx in range(len(parent_1_tours[idx_tour])): 282 | if have[parent_1_tours[idx_tour][idx].get_id()]: 283 | parent_1_tours[idx_tour][idx] = self.problem.get_node_from_id(alens[index]) 284 | index += 1 285 | 286 | child_1_tours.append(parent_1_tours[idx_tour]) 287 | 288 | index = 0 289 | shuffle(alens) 290 | child_2_tours = [] 291 | 292 | for idx_tour in range(len(parent_2_tours)): 293 | for idx in range(len(parent_2_tours[idx_tour])): 294 | if have[parent_2_tours[idx_tour][idx].get_id()]: 295 | parent_2_tours[idx_tour][idx] = self.problem.get_node_from_id(alens[index]) 296 | index += 1 297 | 298 | child_2_tours.append(parent_2_tours[idx_tour]) 299 | 300 | return Solution(child_1_tours), Solution(child_2_tours) 301 | 302 | 303 | def hmm(self, solution: Solution) -> Solution: 304 | solution.set_tour_index() 305 | tours = solution.get_basic_tours() 306 | 307 | if len(tours) == 1: 308 | return solution 309 | 310 | tours = solution.get_basic_tours() 311 | rd_tour_idx = choice(range(len(tours))) 312 | if len(tours[rd_tour_idx]) == 0: 313 | return solution 314 | rd_customer_idx = choice(range(len(tours[rd_tour_idx]))) 315 | rd_customer = tours[rd_tour_idx][rd_customer_idx] 316 | 317 | tour_idx = solution.tour_index[rd_customer.get_id()] 318 | mm_customer_list = [] 319 | for customer_id in self.gs.nearest_dist_customer_matrix[rd_customer.get_id()]: 320 | if solution.tour_index[customer_id] != tour_idx: 321 | mm_customer_list.append(self.problem.get_node_from_id(customer_id)) 322 | if len(mm_customer_list) > 3: 323 | break 324 | 325 | probs = [(len(mm_customer_list) - i + 1) ** 2 for i in range(len(mm_customer_list))] 326 | sum_probs = sum(probs) 327 | probs = [p / sum_probs for p in probs] 328 | mm_customer = np.random.choice(mm_customer_list, p=probs) 329 | mm_customer_tour_idx = solution.tour_index[mm_customer.get_id()] 330 | 331 | mm_customer_idx = -1 332 | for idx in range(len(tours[mm_customer_tour_idx])): 333 | if tours[mm_customer_tour_idx][idx].get_id() == mm_customer.get_id(): 334 | mm_customer_idx = idx 335 | break 336 | 337 | tours[tour_idx].append(mm_customer) 338 | tours[mm_customer_tour_idx].pop(mm_customer_idx) 339 | 340 | return Solution(tours) 341 | 342 | 343 | def hsm(self, solution: Solution) -> Solution: 344 | solution.set_tour_index() 345 | tours = solution.get_basic_tours() 346 | 347 | if len(tours) == 1: 348 | return solution 349 | 350 | tours = solution.get_basic_tours() 351 | rd_tour_idx = choice(range(len(tours))) 352 | 353 | if len(tours[rd_tour_idx]) == 0: 354 | return solution 355 | 356 | rd_customer_idx = choice(range(len(tours[rd_tour_idx]))) 357 | rd_customer = tours[rd_tour_idx][rd_customer_idx] 358 | 359 | tour_idx = solution.tour_index[rd_customer.get_id()] 360 | mm_customer_list = [] 361 | for customer_id in self.gs.nearest_dist_customer_matrix[rd_customer.get_id()]: 362 | if solution.tour_index[customer_id] != tour_idx: 363 | mm_customer_list.append(self.problem.get_node_from_id(customer_id)) 364 | if len(mm_customer_list) > 3: 365 | break 366 | 367 | probs = [(len(mm_customer_list) - i + 1) ** 2 for i in range(len(mm_customer_list))] 368 | sum_probs = sum(probs) 369 | probs = [p / sum_probs for p in probs] 370 | mm_customer = np.random.choice(mm_customer_list, p=probs) 371 | mm_customer_tour_idx = solution.tour_index[mm_customer.get_id()] 372 | 373 | mm_customer_idx = -1 374 | for idx in range(len(tours[mm_customer_tour_idx])): 375 | if tours[mm_customer_tour_idx][idx].get_id() == mm_customer.get_id(): 376 | mm_customer_idx = idx 377 | break 378 | 379 | tours[tour_idx][rd_customer_idx], tours[mm_customer_tour_idx][mm_customer_idx] = \ 380 | tours[mm_customer_tour_idx][mm_customer_idx], tours[tour_idx][rd_customer_idx] 381 | 382 | return Solution(tours) 383 | 384 | def random_swap_mutation(self, solution: Solution) -> Solution: 385 | tours = solution.get_basic_tours() 386 | 387 | if len(tours) == 1: 388 | return solution 389 | 390 | tours = solution.get_basic_tours() 391 | rd_tour_idx = choice(range(len(tours))) 392 | 393 | if len(tours[rd_tour_idx]) == 0: 394 | return solution 395 | 396 | rd_customer_idx_1 = choice(range(len(tours[rd_tour_idx]))) 397 | rd_customer_idx_2 = choice(range(len(tours[rd_tour_idx]))) 398 | 399 | tours[rd_tour_idx][rd_customer_idx_1], tours[rd_tour_idx][rd_customer_idx_2] = \ 400 | tours[rd_tour_idx][rd_customer_idx_2], tours[rd_tour_idx][rd_customer_idx_1] 401 | 402 | return Solution(tours) 403 | 404 | def compute_rank(self, pop): 405 | _sum = 0 406 | self.ranks = [] 407 | fit_min = min([pop[i].get_tour_length() for i in range(len(pop))]) 408 | fit_max = max([pop[i].get_tour_length() for i in range(len(pop))]) 409 | for i in range(len(pop)): 410 | temp_fit = ((fit_max - pop[i].get_tour_length()) / (fit_max - fit_min + 1e-6)) ** np.e 411 | _sum += temp_fit 412 | self.ranks.append(temp_fit) 413 | 414 | if _sum == 0: 415 | self.ranks = [1 / len(pop) for _ in range(len(pop))] 416 | else: 417 | for i in range(len(pop)): 418 | self.ranks[i] /= _sum 419 | if i > 0: 420 | self.ranks[i] += self.ranks[i - 1] 421 | 422 | def choose_by_rank(self, population: List[Solution]) -> int: 423 | prob = random() 424 | return bisect_right(self.ranks, prob, hi=len(population)) - 1 425 | 426 | def choose_by_probs(self, pop: List[Solution], k: int) -> List[Solution]: 427 | fit_min = min([pop[i].get_tour_length() for i in range(len(pop))]) 428 | fit_max = max([pop[i].get_tour_length() for i in range(len(pop))]) 429 | probs = [] 430 | _sum = 0 431 | 432 | for i in range(len(pop)): 433 | temp_fit = ((fit_max - pop[i].get_tour_length()) / (fit_max - fit_min + 1e-6)) ** np.e 434 | _sum += temp_fit 435 | probs.append(temp_fit) 436 | 437 | if _sum == 0: 438 | probs = [1 / len(pop) for _ in range(len(pop))] 439 | else: 440 | probs /= _sum 441 | 442 | choices = sorted(np.random.choice(pop, k, p=probs, replace=False)) 443 | return choices 444 | 445 | --------------------------------------------------------------------------------