Skip to content

Commit 8f03e4c

Browse files
authored
Merge pull request #366 from msmobility/transportHealthIntegrationModel_jibe
Update to Java 21 + MATSim 2025 + Health Extension + Determinism
2 parents 901d4eb + 084a9c3 commit 8f03e4c

550 files changed

Lines changed: 101447 additions & 74492 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Set up JDK 11
16+
- name: Set up JDK 21
1717
uses: actions/setup-java@v4
1818
with:
19-
distribution: 'adopt' # See 'Supported distributions' for available options
20-
java-version: '11'
19+
distribution: 'temurin' # See 'Supported distributions' for available options
20+
java-version: '21'
2121
- name: Build with Maven
2222
run: mvn test --fail-at-end --batch-mode -Dmatsim.preferLocalDtds=true

.github/workflows/deployment.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,36 @@ name: Cloudsmith Deployment
22

33
on:
44
schedule:
5-
- cron: '0 1 * * 1'
6-
7-
5+
- cron: '0 1 * * 1'
86

97
jobs:
108
build:
119
runs-on: ubuntu-latest
1210

1311
steps:
1412
- uses: actions/checkout@v3
15-
- name: Set up JDK 11
16-
uses: actions/setup-java@v3
13+
14+
- name: Set up JDK 21 for build
15+
uses: actions/setup-java@v4
1716
with:
18-
distribution: 'adopt' # See 'Supported distributions' for available options
19-
java-version: '11'
17+
distribution: 'temurin'
18+
java-version: '21'
2019
cache: 'maven'
20+
2121
- name: Build with Maven
2222
run: mvn test -DforkMode=always --fail-at-end --batch-mode -Dmatsim.preferLocalDtds=true
23-
24-
- name: Set up Cloudsmith
25-
uses: actions/setup-java@v2
26-
with: # running setup-java again overwrites the settings.xml
27-
distribution: 'adopt' # See 'Supported distributions' for available options
28-
java-version: '11'
29-
server-id: msm # Value of the distributionManagement/repository/id field of the pom.xml
30-
server-username: CLOUDSMITH_USERNAME # env variable for username in deploy
31-
server-password: CLOUDSMITH_TOKEN # env variable for token in deploy
23+
24+
- name: Set up JDK 21 for Cloudsmith (and configure server credentials)
25+
uses: actions/setup-java@v4
26+
with:
27+
distribution: 'temurin'
28+
java-version: '21'
29+
server-id: msm
30+
server-username: CLOUDSMITH_USERNAME
31+
server-password: CLOUDSMITH_TOKEN
3232

3333
- name: Publish to Cloudsmith
3434
run: mvn deploy -DskipTests=true --fail-at-end --batch-mode -Dmatsim.preferLocalDtds=true
3535
env:
3636
CLOUDSMITH_USERNAME: carlos-llorca
3737
CLOUDSMITH_TOKEN: ${{ secrets.cloudsmithToken }}
38-

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ out
66
*.project
77
/bin/
88
*.settings/
9-
/target/
9+
**/target/
1010
.idea/
1111
*.iml
1212
/Makefile
@@ -16,7 +16,8 @@ out
1616
/timeTracker.csv
1717
scenOutput
1818
status.csv
19-
test/output/*
19+
**/test/output/*
20+
**/test/scenarios/*
2021
test/scenarios/annapolis/null_t.csv
2122
*.DS_Store
2223

analysis/pom.xml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<parent>
66
<artifactId>silo-parent</artifactId>
7-
<groupId>de.tum.bgu.msm</groupId>
7+
<groupId>de.tum.bgu.msm.silo</groupId>
88
<version>0.1.0-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
@@ -17,26 +17,25 @@
1717

1818
<dependencies>
1919
<dependency>
20-
<groupId>junit</groupId>
21-
<artifactId>junit</artifactId>
22-
<version>4.13.1</version>
23-
<type>jar</type>
24-
<scope>provided</scope>
20+
<groupId>org.junit.jupiter</groupId>
21+
<artifactId>junit-jupiter</artifactId>
22+
<version>${junit.version}</version>
23+
<scope>test</scope>
2524
</dependency>
2625
<dependency>
27-
<groupId>de.tum.bgu.msm</groupId>
26+
<groupId>de.tum.bgu.msm.silo</groupId>
2827
<artifactId>siloCore</artifactId>
2928
<version>0.1.0-SNAPSHOT</version>
3029
<scope>compile</scope>
3130
</dependency>
3231
<dependency>
33-
<groupId>de.tum.bgu.msm</groupId>
32+
<groupId>de.tum.bgu.msm.silo</groupId>
3433
<artifactId>munich</artifactId>
3534
<version>0.1.0-SNAPSHOT</version>
3635
<scope>compile</scope>
3736
</dependency>
3837
<dependency>
39-
<groupId>de.tum.bgu.msm</groupId>
38+
<groupId>de.tum.bgu.msm.silo</groupId>
4039
<artifactId>kagawa</artifactId>
4140
<version>0.1.0-SNAPSHOT</version>
4241
<scope>compile</scope>

analysis/src/main/java/sdg/SDGCalculator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
import de.tum.bgu.msm.data.person.*;
1313
import de.tum.bgu.msm.properties.Properties;
1414
import de.tum.bgu.msm.util.MitoUtil;
15-
import org.apache.log4j.Logger;
15+
import org.apache.logging.log4j.LogManager;
16+
import org.apache.logging.log4j.Logger;
1617
import org.locationtech.jts.geom.Coordinate;
1718
import sdg.data.AnalyzedPerson;
1819
import sdg.data.DataContainerSdg;
@@ -25,7 +26,7 @@
2526

2627
public class SDGCalculator {
2728

28-
private static Logger logger = Logger.getLogger(SDGCalculator.class);
29+
private static Logger logger = LogManager.getLogger(SDGCalculator.class);
2930
private Collection<Household> households = new ArrayList<>();
3031
private Collection<Dwelling> dwellings = new ArrayList<>();
3132
private Collection<Person> persons = new ArrayList<>();

analysis/src/main/java/sdg/TransitStopBufferTak.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
import de.tum.bgu.msm.data.geo.DefaultGeoData;
66
import de.tum.bgu.msm.io.DwellingReaderTak;
77
import de.tum.bgu.msm.io.GeoDataReaderTak;
8+
import org.geotools.api.feature.simple.SimpleFeature;
9+
import org.geotools.api.referencing.FactoryException;
10+
import org.geotools.api.referencing.crs.CoordinateReferenceSystem;
11+
import org.geotools.api.referencing.operation.MathTransform;
12+
import org.geotools.api.referencing.operation.TransformException;
813
import org.geotools.geometry.jts.JTS;
914
import org.geotools.referencing.CRS;
1015
import org.locationtech.jts.geom.Coordinate;
@@ -18,11 +23,6 @@
1823
import org.matsim.core.utils.gis.ShapeFileReader;
1924
import org.matsim.pt.transitSchedule.TransitScheduleFactoryImpl;
2025
import org.matsim.pt.transitSchedule.api.TransitStopFacility;
21-
import org.opengis.feature.simple.SimpleFeature;
22-
import org.opengis.referencing.FactoryException;
23-
import org.opengis.referencing.crs.CoordinateReferenceSystem;
24-
import org.opengis.referencing.operation.MathTransform;
25-
import org.opengis.referencing.operation.TransformException;
2626

2727
import java.util.HashSet;
2828
import java.util.Set;

analysis/src/main/java/sdg/reader/EventAnalysis.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public Map<Integer, AnalyzedPerson> runEventAnalysis(String networkFileName, Str
2424
CongestionEventHandler congestionEventHandler = new CongestionEventHandler(scenario.getNetwork());
2525
eventsManager.addHandler(congestionEventHandler);
2626
EventsUtils.readEvents(eventsManager,eventFileName);
27-
System.out.println("1");
2827
//new MatsimEventsReader(eventsManager).readFile(eventFileName);
2928
return congestionEventHandler.getPersons();
3029
}

analysis/src/main/java/sdg/reader/TripReader.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import de.tum.bgu.msm.data.Purpose;
66
import de.tum.bgu.msm.data.person.Person;
77
import de.tum.bgu.msm.utils.SiloUtil;
8-
import org.apache.log4j.Logger;
8+
import org.apache.logging.log4j.LogManager;
9+
import org.apache.logging.log4j.Logger;
910
import sdg.SDGCalculator;
1011
import sdg.data.Trip;
1112

@@ -17,7 +18,7 @@
1718

1819
public class TripReader {
1920

20-
private final static Logger logger = Logger.getLogger(TripReader.class);
21+
private final static Logger logger = LogManager.getLogger(TripReader.class);
2122

2223
public void readData(String path, DataContainer dataContainer) {
2324
logger.info("Reading trip data from mito trip csv");

extensions/health/pom.xml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>de.tum.bgu.msm.silo</groupId>
8+
<artifactId>extensions</artifactId>
9+
<version>0.1.0-SNAPSHOT</version>
10+
</parent>
11+
12+
<artifactId>health</artifactId>
13+
<dependencies>
14+
<dependency>
15+
<groupId>org.matsim.contrib</groupId>
16+
<artifactId>accidents</artifactId>
17+
<version>${matsimVersion}</version>
18+
<exclusions>
19+
<exclusion>
20+
<groupId>javax.media</groupId>
21+
<artifactId>jai_core</artifactId>
22+
</exclusion>
23+
<exclusion>
24+
<groupId>jgridshift</groupId>
25+
<artifactId>jgridshift</artifactId>
26+
</exclusion>
27+
<exclusion>
28+
<groupId>log4j</groupId>
29+
<artifactId>log4j</artifactId>
30+
</exclusion>
31+
</exclusions>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.matsim.contrib</groupId>
35+
<artifactId>analysis</artifactId>
36+
<version>${matsimVersion}</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>org.matsim.contrib</groupId>
40+
<artifactId>emissions</artifactId>
41+
<version>${matsimVersion}</version>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.matsim.contrib</groupId>
45+
<artifactId>noise</artifactId>
46+
<version>${matsimVersion}</version>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.matsim.contrib</groupId>
50+
<artifactId>dvrp</artifactId>
51+
<version>${matsimVersion}</version>
52+
<scope>compile</scope>
53+
</dependency>
54+
<dependency>
55+
<groupId>de.tum.bgu.msm.silo</groupId>
56+
<artifactId>schools</artifactId>
57+
<version>0.1.0-SNAPSHOT</version>
58+
<scope>compile</scope>
59+
</dependency>
60+
<dependency>
61+
<groupId>de.tum.bgu.msm.silo</groupId>
62+
<artifactId>matsim2silo</artifactId>
63+
<version>0.1.0-SNAPSHOT</version>
64+
<scope>compile</scope>
65+
</dependency>
66+
</dependencies>
67+
68+
</project>

0 commit comments

Comments
 (0)