Initial Commit

This commit is contained in:
Nabil Ould Hamou 2025-01-26 22:08:49 +01:00
commit 962db98003
24 changed files with 2794 additions and 0 deletions

43
.gitignore vendored Normal file
View File

@ -0,0 +1,43 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
.idea
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

19
build.gradle Normal file
View File

@ -0,0 +1,19 @@
plugins {
id 'java'
}
group = 'fr.nabil'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
test {
useJUnitPlatform()
}

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,6 @@
#Sun Jan 26 20:48:21 CET 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

234
gradlew vendored Normal file
View File

@ -0,0 +1,234 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

89
gradlew.bat vendored Normal file
View File

@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

2
settings.gradle Normal file
View File

@ -0,0 +1,2 @@
rootProject.name = 'CombinatorialOptimization'

View File

@ -0,0 +1,36 @@
package fr.nabil;
import fr.nabil.data.VRP;
import fr.nabil.utils.FileReader;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
public class Main {
public static void main(String[] args) throws URISyntaxException, IOException {
List<VRP> vrps = new ArrayList<>();
ClassLoader classLoader = Main.class.getClassLoader();
Path vrpPath = Paths.get(classLoader.getResource("vrp").toURI());
try (Stream<Path> paths = Files.list(vrpPath)) {
paths.forEach(p -> {
vrps.add(FileReader.readFile(p.toUri()));
});
}
System.out.println(vrps.getFirst().toString());
}
}

View File

@ -0,0 +1,42 @@
package fr.nabil.data;
import fr.nabil.utils.Pair;
import java.util.Map;
public class VRP {
private String name;
private String comment;
private String type;
private int dimension;
private String edgeWeightType;
private int capacity;
private Map<Integer, Pair<Integer, Integer>> nodeCoordSection;
private Map<Integer, Integer> demandeSection;
public VRP(String name, String comment, String type, int dimension, String edgeWeightType, int capacity, Map<Integer, Pair<Integer, Integer>> nodeCoordSection, Map<Integer, Integer> demandeSection) {
this.name = name;
this.comment = comment;
this.type = type;
this.dimension = dimension;
this.edgeWeightType = edgeWeightType;
this.capacity = capacity;
this.nodeCoordSection = nodeCoordSection;
this.demandeSection = demandeSection;
}
@Override
public String toString() {
return "VRP{" +
"name='" + name + '\'' +
", comment='" + comment + '\'' +
", type='" + type + '\'' +
", dimension=" + dimension +
", edgeWeightType='" + edgeWeightType + '\'' +
", capacity=" + capacity +
", nodeCoordSection=" + nodeCoordSection +
", demandeSection=" + demandeSection +
'}';
}
}

View File

@ -0,0 +1,80 @@
package fr.nabil.utils;
import fr.nabil.data.VRP;
import java.io.IOException;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FileReader {
public static VRP readFile(URI fileUri) {
try {
List<String> lines = Files.readAllLines(Path.of(fileUri), StandardCharsets.UTF_8);
return parseFile(lines);
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
private static VRP parseFile(List<String> lines) {
String name = "";
String comment = "";
String type = "";
int dimension = 0;
String weightType = "";
int capacity = 0;
Map<Integer, Pair<Integer, Integer>> nodeCoordSection = new HashMap<>();
Map<Integer, Integer> demandeSection = new HashMap<>();
for (String line : lines) {
String[] words = line.split(" : ");
switch (words[0].toLowerCase()) {
case "name":
name = words[1];
break;
case "comment":
comment = words[1];
break;
case "type":
type = words[1];
break;
case "dimension":
dimension = Integer.parseInt(words[1].trim());
break;
case "edge_weight_type":
weightType = words[1];
break;
case "capacity":
capacity = Integer.parseInt(words[1].trim());
break;
default:
String[] reParsed = words[0].split(" ");
if (reParsed.length == 3) {
nodeCoordSection.put(Integer.parseInt(reParsed[0]), new Pair<>(Integer.parseInt(reParsed[1]), Integer.parseInt(reParsed[2])));
} else if (reParsed.length == 2) {
if (reParsed[0].equalsIgnoreCase("")) break;
demandeSection.put(Integer.parseInt(reParsed[0]), Integer.parseInt(reParsed[1]));
}
break;
}
}
return new VRP(name, comment, type, dimension, weightType, capacity, nodeCoordSection, demandeSection);
}
}

View File

@ -0,0 +1,33 @@
package fr.nabil.utils;
public class Pair<T, U> {
private T first;
private U second;
public Pair(T first, U second) {
this.first = first;
this.second = second;
}
public T getFirst() {
return first;
}
public U getSecond() {
return second;
}
public void setPair(T first, U second) {
this.first = first;
this.second = second;
}
public void setFirst(T first) {
this.first = first;
}
public void setSecond(U second) {
this.second = second;
}
}

View File

@ -0,0 +1,9 @@
NAME : Nom de l'instance
COMMENT : Commentaires
TYPE : Type de problème
DIMENSION : Nombre de sites (incluant le dépôt)
EDGE_WEIGHT_TYPE : Représentation des distances (ici toutes sont en distances euclidiennes)
CAPACITY : capacité des vehicules
NODE_COORD_SECTION : Coordonnées des sites
DEMAND_SECTION : Demande par site
DEPOT SECTION : Numéro des dépôts

View File

@ -0,0 +1,15 @@
Route #1: 92 37 100 85 93 99 96
Route #2: 13 87 97 95 94
Route #3: 18 8 46 36 49 64 11 62 88
Route #4: 52 7 19 47 48 82
Route #5: 53 27
Route #6: 61 16 86 38 44 91 98
Route #7: 69 70 30 32 90 63 10 31
Route #8: 23 67 39 25 55 54
Route #9: 28 76 77 3 68 12
Route #10: 80 24 29 78 34 35 71 65 66 20
Route #11: 50 79 33 81 9 51 1
Route #12: 26 4 56 75 72 21 40
Route #13: 58 2 57 42 14 43 15 41 22 74 73
Route #14: 89 60 83 45 17 84 5 59 6
Cost 1067

View File

@ -0,0 +1,5 @@
Route #1: 17 20 18 15 12
Route #2: 16 19 21 14
Route #3: 13 11 4 3 8 10
Route #4: 9 7 5 2 1 6
Cost 375

View File

@ -0,0 +1,5 @@
Route #1: 1 15 26 27 16 28 29
Route #2: 30 14 31
Route #3: 3 5 6 10 18 19 22 21 20 23 24 25 17 13
Route #4: 2 12 11 32 8 9 7 4
Cost 835

View File

@ -0,0 +1,6 @@
Route #1: 5 49 10 39 33 45 15 44 37 17 12
Route #2: 47 4 42 19 40 41 13 18
Route #3: 46 32 1 22 20 35 36 3 28 31 26 8
Route #4: 6 14 25 24 43 7 23 48 27
Route #5: 11 16 2 29 21 50 34 30 9 38
Cost 521

View File

@ -0,0 +1,24 @@
Route #1: 129 227 140 27 184 176 118 106 42
Route #2: 155 28 26 192 218
Route #3: 69 124 114 51 32 104 173 133 74 158 62 146 222 80 170 156
Route #4: 90 35 58 2 103 29 142
Route #5: 193 191 207 18 189 186 78 128 86 70
Route #6: 101 225 77 30 202 68 44 195 38
Route #7: 220 61 1 40 57 100 83 159 172 206 110 76 47 203
Route #8: 117 151 212 137 36 14 4 148
Route #9: 182 72 167 50 88 208 20 13 177 67 145 98
Route #10: 52 116 82 92 144 162 33 39 112 164 171
Route #11: 217 12 37 65 75 134 15
Route #12: 181 201 190 152 64 6 108 139 165 97 122 196
Route #13: 71 194 200 213 25 59 109 141 198 91 205
Route #14: 119 56 5 163 138 99 221 136 111 121 127 79 224
Route #15: 16 19
Route #16: 216 84 126 169 48 214 3 54 149
Route #17: 160 153 161 10 180 46 188 199 63 130 135 94 209 95 166 34 178 41
Route #18: 24 9 107 89 123
Route #19: 113 174 143 210 215 96 147 7 105 226 23
Route #20: 60 157 73 115 49 43 31 21 93 120
Route #21: 183 223 132 102 168 87 11 53 179 197 150 187
Route #22: 66 81 22 17 175
Route #23: 204 219 85 45 131 154 8 55 185 125 211
Cost 25742

View File

@ -0,0 +1,156 @@
Route #1: 373 431 129
Route #2: 375 215 160 248
Route #3: 98
Route #4: 305 243 462 209 460 303 71 297 513 241
Route #5: 374 74 151
Route #6: 186 341
Route #7: 6 319
Route #8: 202
Route #9: 354 176 358 482 469 357
Route #10: 114
Route #11: 229 355 309 279 415 149 516 276 326
Route #12: 288 225 39 269 497 308
Route #13: 522 121
Route #14: 100
Route #15: 44
Route #16: 277 281 165
Route #17: 204 404
Route #18: 37 435 394 385 444 233
Route #19: 139
Route #20: 67
Route #21: 272 317 211 239 10 451 274 517 463
Route #22: 376 286 443 226 260 38 224
Route #23: 302 414 383 135 395 323 212
Route #24: 118 101 468
Route #25: 452 339 514 289 465 210 515 112 270 471
Route #26: 24 93
Route #27: 1 454 330
Route #28: 196 434
Route #29: 91 477
Route #30: 116
Route #31: 493 426 273 190
Route #32: 331 498 236 208 324 389 170 467 363
Route #33: 500 409 18 437 315
Route #34: 109
Route #35: 486 197 282
Route #36: 285 185 155
Route #37: 325 9 474 257
Route #38: 180 30
Route #39: 510 263 349 284 347 96
Route #40: 413 207 480 299 50
Route #41: 133 92
Route #42: 4 54
Route #43: 26
Route #44: 169 68 366
Route #45: 12 45
Route #46: 102 138
Route #47: 356 69
Route #48: 107
Route #49: 367 450 7 459
Route #50: 455 94
Route #51: 194 123 457
Route #52: 90 127
Route #53: 72
Route #54: 173
Route #55: 327 316 418 193
Route #56: 506 80 488
Route #57: 247 14 509 178
Route #58: 110
Route #59: 300 421 377 73 217 301 221 365
Route #60: 144 76
Route #61: 62
Route #62: 244 41 448
Route #63: 65 344 268
Route #64: 17 25 253
Route #65: 322 115 255 214 494 521
Route #66: 290 31 81
Route #67: 447 386 53
Route #68: 131 163 495
Route #69: 27 117
Route #70: 508 446 449 378 106 381 306
Route #71: 439 353 313 19 346 382
Route #72: 34 66
Route #73: 154 87
Route #74: 407 390 77 399 405 312 364 483
Route #75: 146 492 256 453
Route #76: 320 36 223
Route #77: 438 388 15 343 296
Route #78: 183 472
Route #79: 266 369 402 362 481 105 491 441
Route #80: 417 162 294 232
Route #81: 179
Route #82: 63
Route #83: 283 249 424 152 512 304 523 420
Route #84: 189 295 456 168 252
Route #85: 350 479 425 275 222 398 380 228 181
Route #86: 470 174 428 337
Route #87: 171 505 182
Route #88: 75 137
Route #89: 48
Route #90: 33 40
Route #91: 32
Route #92: 242 103 52
Route #93: 145 201
Route #94: 164 84
Route #95: 372 430 203 445
Route #96: 360 58 55
Route #97: 403 267 216 293 195 287 476
Route #98: 205 8 291
Route #99: 86 432 387
Route #100: 89 51
Route #101: 199 42
Route #102: 200 132
Route #103: 466 240 11 501
Route #104: 79 3
Route #105: 412 238 340 489 192 442
Route #106: 153 88
Route #107: 113 321
Route #108: 427 410 35
Route #109: 156
Route #110: 147 251 333 406 351
Route #111: 416 411 503 99 280 261 264 487
Route #112: 392 46 436 334 336
Route #113: 478 141 142
Route #114: 397 328 43 473 332
Route #115: 97 219
Route #116: 345 485 23 423 258 396
Route #117: 28 167
Route #118: 177
Route #119: 128
Route #120: 29
Route #121: 314 143 490 250 220 262
Route #122: 218 187 384
Route #123: 318 371 259 22 245 507 329
Route #124: 298 20
Route #125: 148 184 504
Route #126: 502 518 119 400 475
Route #127: 59 78
Route #128: 21
Route #129: 60 408
Route #130: 120 157
Route #131: 499 158 461 433 311
Route #132: 16
Route #133: 278 519 166 292 235
Route #134: 130 159
Route #135: 108
Route #136: 370 213 134
Route #137: 310 359 429 150
Route #138: 47 122 520
Route #139: 484 271 422 234 56 348 361 391
Route #140: 61
Route #141: 237 140 335 231
Route #142: 57 125
Route #143: 2 49
Route #144: 246 175 126
Route #145: 230 338 440 227 254 419 83 458 265 368
Route #146: 85 191
Route #147: 82 64 379 496
Route #148: 161
Route #149: 5 111
Route #150: 124 307 104
Route #151: 511 352 95 464
Route #152: 188 70
Route #153: 198 136
Route #154: 206 401 13 342 393
Route #155: 172
Cost 154593

View File

@ -0,0 +1,214 @@
NAME : E-n101-k14
COMMENT : (Christophides and Eilon, Min no of trucks: 14, Best value: 1071)
TYPE : CVRP
DIMENSION : 101
EDGE_WEIGHT_TYPE : EUC_2D
CAPACITY : 112
NODE_COORD_SECTION
1 35 35
2 41 49
3 35 17
4 55 45
5 55 20
6 15 30
7 25 30
8 20 50
9 10 43
10 55 60
11 30 60
12 20 65
13 50 35
14 30 25
15 15 10
16 30 5
17 10 20
18 5 30
19 20 40
20 15 60
21 45 65
22 45 20
23 45 10
24 55 5
25 65 35
26 65 20
27 45 30
28 35 40
29 41 37
30 64 42
31 40 60
32 31 52
33 35 69
34 53 52
35 65 55
36 63 65
37 2 60
38 20 20
39 5 5
40 60 12
41 40 25
42 42 7
43 24 12
44 23 3
45 11 14
46 6 38
47 2 48
48 8 56
49 13 52
50 6 68
51 47 47
52 49 58
53 27 43
54 37 31
55 57 29
56 63 23
57 53 12
58 32 12
59 36 26
60 21 24
61 17 34
62 12 24
63 24 58
64 27 69
65 15 77
66 62 77
67 49 73
68 67 5
69 56 39
70 37 47
71 37 56
72 57 68
73 47 16
74 44 17
75 46 13
76 49 11
77 49 42
78 53 43
79 61 52
80 57 48
81 56 37
82 55 54
83 15 47
84 14 37
85 11 31
86 16 22
87 4 18
88 28 18
89 26 52
90 26 35
91 31 67
92 15 19
93 22 22
94 18 24
95 26 27
96 25 24
97 22 27
98 25 21
99 19 21
100 20 26
101 18 18
DEMAND_SECTION
1 0
2 10
3 7
4 13
5 19
6 26
7 3
8 5
9 9
10 16
11 16
12 12
13 19
14 23
15 20
16 8
17 19
18 2
19 12
20 17
21 9
22 11
23 18
24 29
25 3
26 6
27 17
28 16
29 16
30 9
31 21
32 27
33 23
34 11
35 14
36 8
37 5
38 8
39 16
40 31
41 9
42 5
43 5
44 7
45 18
46 16
47 1
48 27
49 36
50 30
51 13
52 10
53 9
54 14
55 18
56 2
57 6
58 7
59 18
60 28
61 3
62 13
63 19
64 10
65 9
66 20
67 25
68 25
69 36
70 6
71 5
72 15
73 25
74 9
75 8
76 18
77 13
78 14
79 3
80 23
81 6
82 26
83 16
84 11
85 7
86 41
87 35
88 26
89 9
90 15
91 3
92 1
93 2
94 22
95 27
96 20
97 11
98 12
99 10
100 9
101 17
DEPOT_SECTION
1
-1
EOF

View File

@ -0,0 +1,56 @@
NAME : E-n22-k4
COMMENT : (Christophides and Eilon, Min no of trucks: 4, Optimal value: 375)
TYPE : CVRP
DIMENSION : 22
EDGE_WEIGHT_TYPE : EUC_2D
CAPACITY : 6000
NODE_COORD_SECTION
1 145 215
2 151 264
3 159 261
4 130 254
5 128 252
6 163 247
7 146 246
8 161 242
9 142 239
10 163 236
11 148 232
12 128 231
13 156 217
14 129 214
15 146 208
16 164 208
17 141 206
18 147 193
19 164 193
20 129 189
21 155 185
22 139 182
DEMAND_SECTION
1 0
2 1100
3 700
4 800
5 1400
6 2100
7 400
8 800
9 100
10 500
11 600
12 1200
13 1300
14 1300
15 300
16 900
17 2100
18 1000
19 900
20 2500
21 1800
22 700
DEPOT_SECTION
1
-1
EOF

View File

@ -0,0 +1,78 @@
NAME : E-n33-k4
COMMENT : (Christophides and Eilon, Min no of trucks: 4, Optimal value: 835)
TYPE : CVRP
DIMENSION : 33
EDGE_WEIGHT_TYPE : EUC_2D
CAPACITY : 8000
NODE_COORD_SECTION
1 292 495
2 298 427
3 309 445
4 307 464
5 336 475
6 320 439
7 321 437
8 322 437
9 323 433
10 324 433
11 323 429
12 314 435
13 311 442
14 304 427
15 293 421
16 296 418
17 261 384
18 297 410
19 315 407
20 314 406
21 321 391
22 321 398
23 314 394
24 313 378
25 304 382
26 295 402
27 283 406
28 279 399
29 271 401
30 264 414
31 277 439
32 290 434
33 319 433
DEMAND_SECTION
1 0
2 700
3 400
4 400
5 1200
6 40
7 80
8 2000
9 900
10 600
11 750
12 1500
13 150
14 250
15 1600
16 450
17 700
18 550
19 650
20 200
21 400
22 300
23 1300
24 700
25 750
26 1400
27 4000
28 600
29 1000
30 500
31 2500
32 1700
33 1100
DEPOT_SECTION
1
-1
EOF

View File

@ -0,0 +1,114 @@
NAME : E-n51-k5
COMMENT : (Christophides and Eilon, Min no of trucks: 5, Optimal value: 521)
TYPE : CVRP
DIMENSION : 51
EDGE_WEIGHT_TYPE : EUC_2D
CAPACITY : 160
NODE_COORD_SECTION
1 30 40
2 37 52
3 49 49
4 52 64
5 20 26
6 40 30
7 21 47
8 17 63
9 31 62
10 52 33
11 51 21
12 42 41
13 31 32
14 5 25
15 12 42
16 36 16
17 52 41
18 27 23
19 17 33
20 13 13
21 57 58
22 62 42
23 42 57
24 16 57
25 8 52
26 7 38
27 27 68
28 30 48
29 43 67
30 58 48
31 58 27
32 37 69
33 38 46
34 46 10
35 61 33
36 62 63
37 63 69
38 32 22
39 45 35
40 59 15
41 5 6
42 10 17
43 21 10
44 5 64
45 30 15
46 39 10
47 32 39
48 25 32
49 25 55
50 48 28
51 56 37
DEMAND_SECTION
1 0
2 7
3 30
4 16
5 9
6 21
7 15
8 19
9 23
10 11
11 5
12 19
13 29
14 23
15 21
16 10
17 15
18 3
19 41
20 9
21 28
22 8
23 8
24 16
25 10
26 28
27 7
28 15
29 14
30 6
31 19
32 11
33 12
34 23
35 26
36 17
37 6
38 9
39 15
40 14
41 7
42 27
43 13
44 11
45 16
46 10
47 5
48 25
49 17
50 18
51 10
DEPOT_SECTION
1
-1
EOF

View File

@ -0,0 +1,468 @@
NAME : X-n228-k23
COMMENT : "Generated by Uchoa, Pecin, Pessoa, Poggi, Subramanian, and Vidal (2013)"
TYPE : CVRP
DIMENSION : 228
EDGE_WEIGHT_TYPE : EUC_2D
CAPACITY : 154
NODE_COORD_SECTION
1 550 574
2 177 24
3 448 476
4 934 619
5 323 122
6 430 76
7 364 9
8 988 994
9 91 636
10 938 641
11 979 764
12 4 748
13 420 164
14 294 15
15 304 89
16 362 207
17 770 344
18 67 634
19 90 44
20 712 418
21 299 6
22 997 871
23 38 695
24 830 1000
25 916 622
26 445 107
27 314 222
28 292 519
29 183 344
30 520 434
31 262 283
32 996 902
33 115 158
34 371 61
35 971 352
36 448 484
37 299 89
38 402 147
39 537 431
40 389 48
41 186 22
42 658 505
43 459 528
44 956 900
45 486 383
46 36 651
47 994 713
48 270 100
49 944 606
50 813 917
51 318 42
52 17 369
53 398 280
54 74 760
55 910 623
56 96 604
57 432 96
58 188 17
59 441 480
60 458 124
61 557 620
62 196 51
63 253 137
64 953 658
65 389 0
66 386 127
67 140 683
68 293 75
69 475 386
70 224 487
71 299 157
72 556 346
73 366 110
74 681 864
75 220 97
76 382 140
77 266 88
78 440 423
79 168 19
80 616 244
81 270 177
82 126 666
83 332 85
84 234 26
85 834 571
86 49 602
87 248 74
88 81 696
89 308 43
90 915 675
91 500 518
92 510 353
93 329 86
94 830 724
95 993 634
96 959 600
97 991 973
98 411 25
99 382 303
100 477 58
101 225 31
102 439 456
103 120 710
104 462 471
105 107 134
106 970 995
107 427 501
108 938 650
109 370 16
110 460 140
111 263 59
112 524 19
113 411 89
114 953 944
115 79 357
116 757 867
117 343 121
118 361 316
119 407 508
120 414 117
121 576 591
122 544 44
123 418 27
124 837 660
125 174 487
126 168 601
127 854 575
128 615 52
129 193 51
130 458 659
131 957 641
132 51 647
133 137 714
134 203 140
135 386 146
136 976 649
137 522 26
138 281 121
139 453 69
140 393 25
141 341 532
142 466 153
143 507 472
144 946 963
145 327 78
146 301 135
147 256 139
148 997 980
149 343 173
150 860 622
151 151 798
152 317 211
153 418 6
154 833 694
155 83 641
156 229 449
157 283 204
158 513 697
159 232 96
160 247 22
161 651 664
162 857 701
163 337 72
164 439 65
165 398 106
166 409 24
167 931 476
168 368 92
169 97 676
170 880 606
171 281 199
172 410 110
173 252 22
174 181 147
175 945 948
176 135 618
177 348 443
178 296 39
179 953 368
180 81 826
181 997 734
182 533 134
183 372 134
184 231 681
185 317 479
186 143 603
187 122 38
188 220 898
189 946 690
190 95 37
191 429 9
192 137 64
193 361 258
194 153 65
195 536 296
196 509 404
197 423 59
198 162 759
199 525 342
200 943 678
201 522 195
202 463 29
203 371 335
204 289 136
205 191 568
206 505 381
207 265 55
208 125 62
209 304 44
210 958 610
211 975 966
212 277 631
213 285 169
214 486 111
215 940 621
216 993 964
217 771 548
218 484 276
219 440 455
220 104 561
221 200 61
222 491 62
223 277 169
224 177 695
225 628 312
226 430 429
227 945 994
228 461 608
DEMAND_SECTION
1 0
2 79
3 57
4 88
5 54
6 92
7 84
8 61
9 100
10 61
11 69
12 78
13 54
14 59
15 60
16 61
17 85
18 67
19 96
20 57
21 57
22 52
23 80
24 60
25 71
26 93
27 59
28 88
29 77
30 50
31 98
32 53
33 54
34 99
35 10
36 9
37 8
38 9
39 7
40 10
41 9
42 2
43 3
44 3
45 7
46 8
47 3
48 2
49 2
50 10
51 2
52 10
53 3
54 9
55 7
56 4
57 6
58 6
59 3
60 3
61 9
62 9
63 9
64 5
65 2
66 10
67 2
68 5
69 9
70 6
71 3
72 7
73 10
74 7
75 10
76 6
77 3
78 10
79 6
80 2
81 4
82 4
83 9
84 5
85 9
86 5
87 5
88 7
89 1
90 10
91 4
92 4
93 2
94 6
95 1
96 2
97 1
98 8
99 1
100 9
101 7
102 1
103 9
104 6
105 4
106 2
107 10
108 7
109 10
110 2
111 3
112 5
113 6
114 7
115 4
116 8
117 4
118 1
119 3
120 4
121 2
122 5
123 8
124 5
125 9
126 3
127 10
128 2
129 1
130 7
131 8
132 2
133 3
134 8
135 6
136 1
137 6
138 8
139 5
140 8
141 2
142 6
143 8
144 4
145 10
146 3
147 10
148 2
149 8
150 9
151 5
152 7
153 10
154 3
155 8
156 7
157 2
158 4
159 7
160 10
161 5
162 10
163 7
164 8
165 1
166 9
167 8
168 4
169 7
170 8
171 6
172 3
173 2
174 4
175 3
176 1
177 10
178 4
179 8
180 10
181 5
182 2
183 2
184 10
185 9
186 7
187 6
188 4
189 4
190 10
191 5
192 8
193 6
194 9
195 10
196 9
197 3
198 5
199 6
200 6
201 10
202 5
203 7
204 3
205 1
206 9
207 10
208 10
209 6
210 1
211 1
212 5
213 8
214 3
215 7
216 4
217 2
218 8
219 5
220 8
221 6
222 5
223 7
224 7
225 5
226 6
227 8
228 7
DEPOT_SECTION
1
-1
EOF

File diff suppressed because it is too large Load Diff