diff --git a/Jenkinsfile b/Jenkinsfile
index f2553b398..9fc50778f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -8,7 +8,7 @@ kind: Pod
spec:
containers:
- name: maven-sumo
- image: eclipsemosaic/mosaic-ci:jdk17-sumo-1.20.0
+ image: eclipsemosaic/mosaic-ci:jdk17-sumo-1.21.0
command:
- cat
tty: true
diff --git a/README.md b/README.md
index 5e1516830..1f57caf57 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,7 @@ Additional simulators and assessment features are provided by [Fraunhofer FOKUS]
## Related Repositories
-* [Eclipse SUMO](https://github.com/eclipse/sumo) is coupled directly using the TraCI interface. We recommend using the SUMO release `1.20.0`.
+* [Eclipse SUMO](https://github.com/eclipse/sumo) is coupled directly using the TraCI interface. We recommend using the SUMO release `1.21.0`.
* The coupling to [ns-3](https://www.nsnam.org) is realized by a federate implementation which can be found [in our MOSAIC Addons repository](https://github.com/mosaic-addons/ns3-federate).
We currently support ns-3 version `3.36.1`.
* The coupling to [OMNeT++](https://omnetpp.org) is implemented in a very similar manner. The corresponding federate implementation can be found [in our MOSAIC Addons repository](https://github.com/mosaic-addons/omnetpp-federate).
@@ -73,7 +73,7 @@ For a successful build you need the following software to be installed:
* **Maven 3.1.x** or higher.
* **Java 17**, or 21 - We recommend using the [Adoptium OpenJDK (aka Eclipse Temurin)](https://adoptium.net/?variant=openjdk17).
-* **SUMO 1.20.0** - Older versions > 1.2.0 are most probably supported, but not tested. The environment variable `SUMO_HOME` should be configured properly.
+* **SUMO 1.21.0** - Older versions > 1.2.0 are most probably supported, but not tested. The environment variable `SUMO_HOME` should be configured properly.
## Build
diff --git a/fed/mosaic-sumo/src/main/java/org/eclipse/mosaic/fed/sumo/ambassador/LibSumoAmbassador.java b/fed/mosaic-sumo/src/main/java/org/eclipse/mosaic/fed/sumo/ambassador/LibSumoAmbassador.java
index 2f9983c50..e23c09334 100644
--- a/fed/mosaic-sumo/src/main/java/org/eclipse/mosaic/fed/sumo/ambassador/LibSumoAmbassador.java
+++ b/fed/mosaic-sumo/src/main/java/org/eclipse/mosaic/fed/sumo/ambassador/LibSumoAmbassador.java
@@ -34,7 +34,7 @@
*/
public class LibSumoAmbassador extends SumoAmbassador {
- private static final String VALID_LIBSUMO_VERSIONS = "1\\.(19|20)\\.";
+ private static final String VALID_LIBSUMO_VERSIONS = "1\\.(19|20|21)\\.";
public LibSumoAmbassador(AmbassadorParameter ambassadorParameter) {
super(ambassadorParameter);
@@ -71,34 +71,30 @@ protected void initSumoConnection() throws InternalFederateException {
}
if (new File(libsumoLibrary).exists()) {
- // Workaround based on suggestions made in https://github.com/eclipse/sumo/issues/12605
- if (operatingSystem == CLocalHost.OperatingSystem.WINDOWS) {
- loadQuiet(getFromSumoHome("iconv-2.dll"));
- loadQuiet(getFromSumoHome("intl-8.dll"));
- loadQuiet(getFromSumoHome("proj_9_0.dll"));
+ try {
+ System.load(libsumoLibrary);
+ } catch (UnsatisfiedLinkError e) {
+ throw new InternalFederateException("""
+ The required libsumojni library could be found, but not loaded due to missing dependencies.
+ Make sure your PATH variable contains the entry "$SUMO_HOME/bin".
+ """);
}
- System.load(libsumoLibrary);
-
if (incorrectLibSumoVersion()) {
- throw new InternalFederateException(
- "The loaded Libsumo library at " + libsumoLibrary + " is not compatible with this ambassador. "
- + "Valid versions are: " + VALID_LIBSUMO_VERSIONS);
+ throw new InternalFederateException("""
+ The loaded libsumojni library at %s is not compatible with this ambassador. Valid versions are: %s
+ """.formatted(libsumoLibrary, VALID_LIBSUMO_VERSIONS));
}
} else {
try {
- // Workaround based on suggestions made in https://github.com/eclipse/sumo/issues/12605
- if (operatingSystem == CLocalHost.OperatingSystem.WINDOWS) {
- loadLibraryQuiet("iconv-2");
- loadLibraryQuiet("intl-8");
- loadLibraryQuiet("proj_9_0");
- }
-
// if no file found, try to load libsumo it directly from java.library.path
System.loadLibrary("libsumojni");
} catch (Throwable e) {
- throw new InternalFederateException("The required libsumojni library could not be found in " + libsumoLibrary + ". "
- + "Make sure SUMO_HOME is set properly and that your SUMO installation contains the libsumojni library.");
+ throw new InternalFederateException("""
+ The required libsumojni library could not be found in %s.
+ Make sure SUMO_HOME is set properly and that your SUMO installation contains the libsumojni library.
+ Furthermore, your PATH variable should contain the entry $SUMO_HOME/bin.
+ """.formatted(libsumoLibrary));
}
}
diff --git a/fed/mosaic-sumo/src/main/java/org/eclipse/mosaic/fed/sumo/bridge/SumoVersion.java b/fed/mosaic-sumo/src/main/java/org/eclipse/mosaic/fed/sumo/bridge/SumoVersion.java
index c96ce5666..f5952f9b1 100644
--- a/fed/mosaic-sumo/src/main/java/org/eclipse/mosaic/fed/sumo/bridge/SumoVersion.java
+++ b/fed/mosaic-sumo/src/main/java/org/eclipse/mosaic/fed/sumo/bridge/SumoVersion.java
@@ -45,6 +45,7 @@ public enum SumoVersion {
SUMO_1_18_x("1.18.*", TraciVersion.API_20),
SUMO_1_19_x("1.19.*", TraciVersion.API_21),
SUMO_1_20_x("1.20.*", TraciVersion.API_21),
+ SUMO_1_21_x("1.21.*", TraciVersion.API_21),
/**
* the lowest version supported by this client.
@@ -54,7 +55,7 @@ public enum SumoVersion {
/**
* the highest version supported by this client.
*/
- HIGHEST(SUMO_1_20_x.sumoVersion, SUMO_1_20_x.traciVersion);
+ HIGHEST(SUMO_1_21_x.sumoVersion, SUMO_1_21_x.traciVersion);
private final String sumoVersion;
private final TraciVersion traciVersion;
diff --git a/pom.xml b/pom.xml
index ec6b35882..710d30706 100644
--- a/pom.xml
+++ b/pom.xml
@@ -116,7 +116,7 @@
2.0.12
3.42.0.0
- 1.20.0
+ 1.21.0
diff --git a/test/ci/ci-image-mvn-sumo/Dockerfile b/test/ci/ci-image-mvn-sumo/Dockerfile
index 3ab423666..c77cf0a79 100644
--- a/test/ci/ci-image-mvn-sumo/Dockerfile
+++ b/test/ci/ci-image-mvn-sumo/Dockerfile
@@ -9,6 +9,6 @@ WORKDIR /home/jenkins
RUN apt-get update && \
apt-get install -y --allow-unauthenticated software-properties-common && \
# adjust this output string to bypass potential caches
- echo "Installing SUMO 1.20.0" && \
+ echo "Installing SUMO 1.21.0" && \
add-apt-repository ppa:sumo/stable && \
apt-get install -y sumo
\ No newline at end of file
diff --git a/test/ci/ci-image-mvn-sumo/README.md b/test/ci/ci-image-mvn-sumo/README.md
index fec594112..5e4c1d40b 100644
--- a/test/ci/ci-image-mvn-sumo/README.md
+++ b/test/ci/ci-image-mvn-sumo/README.md
@@ -10,9 +10,9 @@ build and tag the docker image with the latest SUMO version. This image should b
and available in the PPA.
```shell script
-docker build . -t eclipsemosaic/mosaic-ci:jdk17-sumo-1.20.0
+docker build . -t eclipsemosaic/mosaic-ci:jdk17-sumo-1.21.0
docker login
-docker push eclipsemosaic/mosaic-ci:jdk17-sumo-1.20.0
+docker push eclipsemosaic/mosaic-ci:jdk17-sumo-1.21.0
```
Afterwards, the image should be available here: https://hub.docker.com/r/eclipsemosaic/mosaic-ci/tags