Skip to content

Commit

Permalink
Merge branch 'master' into Dont-use-person-id-missing-veh
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbischoff authored Nov 1, 2024
2 parents 4f38ac3 + 58ed0fd commit 1e6cc86
Show file tree
Hide file tree
Showing 2,566 changed files with 152,357 additions and 49,128 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/code-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'

Expand All @@ -26,7 +26,7 @@ jobs:
run: mvn verify -P jacoco --batch-mode --also-make --projects matsim -Dmaven.test.redirectTestOutputToFile -Dmatsim.preferLocalDtds=true

- name: Push coverage to CodeCov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./matsim/target/site/jacoco/jacoco.xml

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: 'java'
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -41,9 +41,9 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:java"
24 changes: 24 additions & 0 deletions .github/workflows/deploy-dtds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: deploy-dtds-on-website

on:
push:
branches:
- master
paths:
- matsim/src/main/resources/dtd

jobs:
rsync-dtds:
name: sync DTDs to website
runs-on: ubuntu-latest

steps:
- name: rsync dtds
uses: burnett01/[email protected]
with:
switches: -avz
path: matsim/src/main/resources/dtd/
remote_path: ~/httpdocs/files/dtd/
remote_host: ${{ secrets.WEBSITE_DEPLOY_HOST }}
remote_user: ${{ secrets.WEBSITE_DEPLOY_USER }}
remote_key: ${{ secrets.WEBSITE_SSH_PRIVATE_KEY }}
6 changes: 3 additions & 3 deletions .github/workflows/deploy-on-pr-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'
server-id: 'matsim-releases'
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Submit Dependency Graph
# Generate a complete dependency graph and submit the graph to the GitHub repository.
# The goal is to improve security alerts from dependabot, because dependabot is not able to compute the complete dependency graph.
uses: advanced-security/maven-dependency-submission-action@v3
uses: advanced-security/maven-dependency-submission-action@v4

env:
MAVEN_OPTS: -Xmx2g
4 changes: 2 additions & 2 deletions .github/workflows/deploy-on-release-created.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'
server-id: matsim-releases
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'
server-id: 'matsim-releases'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/full-integration.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: full-integration

on:
workflow_dispatch:
schedule:
- cron: '30 0 * * *' # daily at 0:30 UTC

Expand All @@ -13,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Prepare git
Expand All @@ -24,9 +25,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/verify-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
- contribs/simwrapper
- contribs/sbb-extensions
- contribs/simulatedannealing
- contribs/small-scale-traffic-generation
- benchmark

steps:
Expand All @@ -75,7 +76,7 @@ jobs:
- name: Detect changes against master
# we only want to build matsim (module) if changes are not limited to contribs
id: detect-changes
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v3
if: ${{matrix.module == 'matsim'}}
with:
filters: |
Expand All @@ -84,9 +85,9 @@ jobs:
- name: Setup Java
if: ${{matrix.module != 'matsim' || steps.detect-changes.outputs.outside-contribs == 'true'}}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'zulu'
cache: 'maven'

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ matsimExamples
matsim/docs/doxygen/html
matsim/src/main/java/Doxyfile

# VS Code files
.vscode

# ignore output directories:
output/
14 changes: 9 additions & 5 deletions benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.matsim</groupId>
<artifactId>matsim-all</artifactId>
<version>16.0-SNAPSHOT</version>
<version>2025.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
Expand Down Expand Up @@ -33,16 +33,20 @@
<dependency>
<groupId>org.matsim</groupId>
<artifactId>matsim</artifactId>
<version>16.0-SNAPSHOT</version>
<version>2025.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.matsim</groupId>
<artifactId>matsim-examples</artifactId>
<version>16.0-SNAPSHOT</version>
<version>2025.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
</dependency>
</dependencies>

Expand Down
1 change: 1 addition & 0 deletions contribs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ The MATSim core development team cannot make any guarantee that these extensions
| [shared_mobility](shared_mobility/README.md) | Simulate human-driven shared mobility (i.e., micromobility)
| [signals](signals/README.md) | Simulate traffic lights microscopically
| [simwrapper](simwrapper/README.md) | Creates dashboards automatically with [SimWrapper](https://simwrapper.github.io/)
| [small-scale-traffic-generation](small-scale-traffic-generation/README.md) | Tool to generate small-scale commercial traffic
| [socnetsim](socnetsim/README.md) | Social network simulation
| [sumo](sumo/README.md) | Converter and integrations for [SUMO](https://sumo.dlr.de/])
| [taxi](taxi/README.md) | Taxi service functionality
Expand Down
12 changes: 6 additions & 6 deletions contribs/accessibility/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.matsim</groupId>
<artifactId>contrib</artifactId>
<version>16.0-SNAPSHOT</version>
<version>2025.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.matsim.contrib</groupId>
Expand Down Expand Up @@ -37,12 +37,12 @@
<dependency>
<groupId>org.matsim.contrib</groupId>
<artifactId>matrixbasedptrouter</artifactId>
<version>16.0-SNAPSHOT</version>
<version>2025.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.matsim.contrib</groupId>
<artifactId>roadpricing</artifactId>
<version>16.0-SNAPSHOT</version>
<version>2025.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.sf.trove4j</groupId>
Expand All @@ -52,7 +52,7 @@
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-core</artifactId>
<version>0.48.3</version>
<version>${osmosis.version}</version>
<exclusions>
<!-- needed to compile in IntelliJ with Eclipse compiler -->
<!-- see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=536928 -->
Expand All @@ -65,12 +65,12 @@
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-xml</artifactId>
<version>0.48.3</version>
<version>${osmosis.version}</version>
</dependency>
<dependency>
<groupId>org.matsim.contrib</groupId>
<artifactId>analysis</artifactId>
<version>16.0-SNAPSHOT</version>
<version>2025.0-SNAPSHOT</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.matsim.contrib</groupId>-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.geotools.api.feature.simple.SimpleFeature;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
Expand All @@ -39,9 +40,8 @@
import org.matsim.core.network.NetworkUtils;
import org.matsim.core.network.algorithms.TransportModeNetworkFilter;
import org.matsim.core.utils.geometry.CoordUtils;
import org.matsim.core.utils.gis.ShapeFileReader;
import org.matsim.core.utils.gis.GeoFileReader;
import org.matsim.facilities.*;
import org.opengis.feature.simple.SimpleFeature;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
Expand Down Expand Up @@ -225,7 +225,7 @@ public static final ActivityFacilities createFacilityForEachLink(String facility


public static final ActivityFacilities createFacilityFromBuildingShapefile(String shapeFileName, String identifierCaption, String numberOfHouseholdsCaption) {
ShapeFileReader shapeFileReader = new ShapeFileReader();
GeoFileReader shapeFileReader = new GeoFileReader();
Collection<SimpleFeature> features = shapeFileReader.readFileAndInitialize(shapeFileName);

ActivityFacilities facilities = FacilitiesUtils.createActivityFacilities("DensitiyFacilities");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
import java.util.HashSet;
import java.util.Set;

import org.geotools.data.DataStore;
import org.geotools.data.FileDataStoreFinder;
import org.geotools.api.data.DataStore;
import org.geotools.api.data.FileDataStoreFinder;
import org.geotools.api.data.SimpleFeatureSource;
import org.geotools.api.feature.simple.SimpleFeature;
import org.geotools.data.simple.SimpleFeatureIterator;
import org.geotools.data.simple.SimpleFeatureSource;
import org.opengis.feature.simple.SimpleFeature;

/**
* Utility class for reading shape (.shp) files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.matsim.facilities.ActivityFacility;
import org.matsim.facilities.FacilitiesUtils;
import org.matsim.utils.gis.shp2matsim.ShpGeometryUtils;
import org.opengis.feature.simple.SimpleFeature;

public final class GridUtils {
// used from outside, e.g. in vsp playgrounds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@
import java.util.Collection;
import java.util.List;

import org.geotools.api.feature.simple.SimpleFeature;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.Polygon;
import org.locationtech.jts.triangulate.VoronoiDiagramBuilder;
import org.matsim.contrib.matrixbasedptrouter.utils.BoundingBox;
import org.matsim.core.utils.gis.ShapeFileWriter;
import org.opengis.feature.simple.SimpleFeature;
import org.matsim.core.utils.gis.GeoFileWriter;

/**
* @author dziemke
*/
class VoronoiExample {

public static void main(String[] args) {
GeometryFactory geometryFactory = new GeometryFactory();

Collection<Coordinate> sites = new ArrayList<>();
sites.add(new Coordinate(70, 70));
sites.add(new Coordinate(50, 150));
Expand All @@ -48,16 +48,16 @@ public static void main(String[] args) {
sites.add(new Coordinate(250, 150));
sites.add(new Coordinate(350, 50));
sites.add(new Coordinate(370, 170));

VoronoiDiagramBuilder voronoiDiagramBuilder = new VoronoiDiagramBuilder();
voronoiDiagramBuilder.setSites(sites);
voronoiDiagramBuilder.setSites(sites);

List<Polygon> polygons = voronoiDiagramBuilder.getSubdivision().getVoronoiCellPolygons(geometryFactory);

BoundingBox boundingBox = BoundingBox.createBoundingBox(0, 0, 400, 200);
Polygon boundingPolygon = VoronoiGeometryUtils.createBoundingPolygon(boundingBox);
Collection<Geometry> cutGeometries = VoronoiGeometryUtils.cutPolygonsByBoundary(polygons, boundingPolygon);
Collection<SimpleFeature> features = VoronoiGeometryUtils.createFeaturesFromPolygons(cutGeometries);
ShapeFileWriter.writeGeometries(features, "/Users/dominik/voronoi_test.shp");
GeoFileWriter.writeGeometries(features, "/Users/dominik/voronoi_test.shp");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.geotools.api.feature.simple.SimpleFeature;
import org.geotools.api.feature.simple.SimpleFeatureType;
import org.geotools.feature.simple.SimpleFeatureBuilder;
import org.geotools.feature.simple.SimpleFeatureTypeBuilder;
import org.locationtech.jts.geom.Coordinate;
Expand All @@ -40,8 +42,6 @@
import org.matsim.core.utils.geometry.CoordUtils;
import org.matsim.facilities.ActivityFacilities;
import org.matsim.facilities.ActivityFacility;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.simple.SimpleFeatureType;

/**
* @author dziemke
Expand Down
Loading

0 comments on commit 1e6cc86

Please sign in to comment.