Skip to content

Commit e0b5cfe

Browse files
authored
Merge pull request #69 from moia-oss/master
update matsim libs
2 parents 3511e28 + 6ca890e commit e0b5cfe

File tree

1,998 files changed

+86730
-35765
lines changed

Some content is hidden

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

1,998 files changed

+86730
-35765
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "daily"
7+
78
- package-ecosystem: "github-actions"
89
directory: "/"
910
schedule:
1011
interval: "daily"
12+
groups:
13+
github-actions:
14+
patterns: ["*"]

.github/workflows/code-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout git repo
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616

1717
- name: Setup Java
1818
uses: actions/setup-java@v3

.github/workflows/codeql.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: 'master'
6+
7+
jobs:
8+
analyze:
9+
name: Analyze
10+
runs-on: 'ubuntu-latest'
11+
timeout-minutes: 360
12+
permissions:
13+
actions: read
14+
contents: read
15+
security-events: write
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Java
22+
uses: actions/setup-java@v3
23+
with:
24+
java-version: 17
25+
distribution: 'zulu'
26+
cache: 'maven'
27+
28+
# Initializes the CodeQL tools for scanning.
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: 'java'
33+
# If you wish to specify custom queries, you can do so here or in a config file.
34+
# By default, queries listed here will override any specified in a config file.
35+
# Prefix the list here with "+" to use these queries and those in the config file.
36+
37+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
38+
# queries: security-extended,security-and-quality
39+
40+
41+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
42+
# If this step fails, then you should remove it and run the build manually (see below)
43+
- name: Autobuild
44+
uses: github/codeql-action/autobuild@v2
45+
46+
- name: Perform CodeQL Analysis
47+
uses: github/codeql-action/analyze@v2
48+
with:
49+
category: "/language:java"

.github/workflows/deploy-on-pr-merge.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ on:
1010
jobs:
1111
deploy-snapshot:
1212
name: deploy PR-labelled version
13-
# for PR-labelled deployment -- only if closed by merging
14-
if: github.event_name == 'push' || github.event.pull_request.merged == true
13+
# only if PR closed by merging
14+
if: github.event.pull_request.merged == true
1515

1616
runs-on: ubuntu-latest
1717

1818
steps:
1919
- name: Checkout git repo
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Setup Java
2323
uses: actions/setup-java@v3
2424
with:
2525
java-version: 17
2626
distribution: 'zulu'
2727
cache: 'maven'
28-
server-id: ${{ github.event_name == 'push' && 'matsim-snapshots' || 'matsim-releases' }} #choose mvn repo
28+
server-id: 'matsim-releases'
2929
server-username: MAVEN_USERNAME
3030
server-password: MAVEN_PASSWORD
3131

@@ -43,5 +43,10 @@ jobs:
4343
MAVEN_USERNAME: ${{ secrets.REPOMATSIM_USERNAME }}
4444
MAVEN_PASSWORD: ${{ secrets.REPOMATSIM_TOKEN }}
4545

46+
- name: Submit Dependency Graph
47+
# Generate a complete dependency graph and submit the graph to the GitHub repository.
48+
# The goal is to improve security alerts from dependabot, because dependabot is not able to compute the complete dependency graph.
49+
uses: advanced-security/maven-dependency-submission-action@v3
50+
4651
env:
4752
MAVEN_OPTS: -Xmx2g

.github/workflows/deploy-on-release-created.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Checkout git repo
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: Setup Java
1717
uses: actions/setup-java@v3

.github/workflows/deploy-weekly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout git repo
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616

1717
- name: Setup Java
1818
uses: actions/setup-java@v3

.github/workflows/full-integration.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: full-integration
22

33
on:
4+
workflow_dispatch:
45
schedule:
56
- cron: '30 0 * * *' # daily at 0:30 UTC
67

@@ -13,15 +14,15 @@ jobs:
1314
strategy:
1415
fail-fast: false
1516
matrix:
16-
os: [ubuntu-latest, windows-latest]
17+
os: [ubuntu-latest, windows-latest, macos-latest]
1718

1819
steps:
1920
- name: Prepare git
2021
# turn off CRLF conversion (necessary on Windows)
2122
run: git config --global core.autocrlf false
2223

2324
- name: Checkout git repo
24-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2526

2627
- name: Setup Java
2728
uses: actions/setup-java@v3

.github/workflows/verify-push.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,22 @@ jobs:
5555
- contribs/socnetsim
5656
- contribs/sumo
5757
- contribs/pseudosimulation
58+
- contribs/railsim
5859
- contribs/roadpricing
5960
- contribs/analysis
60-
- contribs/eventsBasedPTRouter
6161
- contribs/hybridsim
6262
- contribs/informed-mode-choice
6363
- contribs/otfvis
6464
- contribs/osm
6565
- contribs/application
66+
- contribs/simwrapper
6667
- contribs/sbb-extensions
6768
- contribs/simulatedannealing
6869
- benchmark
6970

7071
steps:
7172
- name: Checkout git repo
72-
uses: actions/checkout@v3
73+
uses: actions/checkout@v4
7374

7475
- name: Detect changes against master
7576
# we only want to build matsim (module) if changes are not limited to contribs

benchmark/src/main/java/org/matsim/benchmark/Benchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class Benchmark {
3232
public static void main(String[] args) throws IOException {
3333
Config config = ConfigUtils.loadConfig(IOUtils.extendUrl(ExamplesUtils.getTestScenarioURL("benchmark"), "config.xml"));
3434
Controler ctl = new Controler(config);
35-
ctl.getConfig().controler().setCreateGraphs(false);
35+
ctl.getConfig().controller().setCreateGraphs(false);
3636
ctl.run();
3737
}
3838

contribs/README.md

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,46 @@ Please note that these extensions are usually maintained and provided by single
77
The MATSim core development team cannot make any guarantee that these extensions will be kept up-to-date and compatible with future releases, instead the maintainers themselves are responsible for this task.
88

99

10-
| Contrib | Short description |
11-
|---------------------------------------------------------|-------------------------------------------------|
12-
| [accessibility](accessibility/README.md) | Measuring accessibility in policy evaluation
13-
| accidents |
14-
| [analysis](analysis/README.md) | Collection of matsim analysis tools
15-
| [application](application/README.md) | Build MATSim scenarios with preparation and analysis pipelines
16-
| [av](av/README.md) | Automated (autonomous) vehicle contrib
17-
| bicycle |
18-
| [cadytsIntegration](cadytsIntegration/README.md) | Calibration of dynamics traffic simulations
19-
| [carsharing](carsharing/README.md) | Simulate carsharing modes like station based or freefloatin
10+
| Contrib | Short description |
11+
|--------------------------------------------------------------------------|-------------------------------------------------|
12+
| [accessibility](accessibility/README.md) | Measuring accessibility in policy evaluation
13+
| accidents |
14+
| [analysis](analysis/README.md) | Collection of matsim analysis tools
15+
| [application](application/README.md) | Build MATSim scenarios with preparation and analysis pipelines
16+
| [av](av/README.md) | Automated (autonomous) vehicle contrib
17+
| bicycle |
18+
| [cadytsIntegration](cadytsIntegration/README.md) | Calibration of dynamics traffic simulations
19+
| [carsharing](carsharing/README.md) | Simulate carsharing modes like station based or freefloatin
2020
| [commercialTrafficApplications](commercialTrafficApplications/README.md) | Collection of applications of the freight contrib in combination with one or more other contribs
21-
| common |
22-
| [decongestion](decongestion/README.md) | Compute tolls accordingly in order to reduce delays
23-
| [discrete_mode_choice](discrete_mode_choice/README.md) | Fine-grained and custom mode choice behaviour
24-
| [drt](drt/README.md) | Demand-responsive transport simulation
25-
| [drt-extensions](drt-extensions/README.md) | Extensions for demand-responsive transport simulation
26-
| [dvrp](dvrp/README.md) | Tool for solving (dynamic) vehicle routing problem
27-
| [emissions](emissions/README.md) | Tool for exhaust emission calculation
28-
| [ev](ev/README.md) | Electric Vehicle functionality
29-
| eventsBasedPTRouter |
30-
| [freight](freight/README.md) | Package that plugs freight algorithms
31-
| [hybridsim](hybridsim/README.md) |
32-
| integration |
21+
| common |
22+
| [decongestion](decongestion/README.md) | Compute tolls accordingly in order to reduce delays
23+
| [discrete_mode_choice](discrete_mode_choice/README.md) | Fine-grained and custom mode choice behaviour
24+
| [drt](drt/README.md) | Demand-responsive transport simulation
25+
| [drt-extensions](drt-extensions/README.md) | Extensions for demand-responsive transport simulation
26+
| [dvrp](dvrp/README.md) | Tool for solving (dynamic) vehicle routing problem
27+
| [emissions](emissions/README.md) | Tool for exhaust emission calculation
28+
| [ev](ev/README.md) | Electric Vehicle functionality
29+
| eventsBasedPTRouter |
30+
| [freight](freight/README.md) | Package that plugs freight algorithms
31+
| [hybridsim](hybridsim/README.md) |
32+
| integration |
3333
| [informed-mode-choice](informed-mode-choice/README.md) | Mode choice algorithms based on trip utility estimation
34-
| [locationchoice](locationchoice/README.md) | Location choice for discretionary activities
35-
| [matrixbasedptrouter](matrixbasedptrouter/README.md) | Calculate PT travel times using a set of stops and a pre-calculated travel time
36-
| [minibus](minibus/README.md) | Runs an adaptive "minibus" model to serve given demand
37-
| [multimodal](multimodal/README.md) | Enables multi-modal simulation
38-
| [noise](noise/README.md) | Tools to compute various noise metrics (emissions, imission, exposure costs)
39-
| osm |
40-
| [otfvis](otfvis/README.md) | Visualiser for Matsim scenarios
41-
| [parking](parking/README.md) | Parking infrastructure and supply constraints
42-
| [protobuf](protobuf/README.md) | Protocol buffer implementation and converter for the MATSim event infrastructure
43-
| [pseudosimulation](pseudosimulation/README.md) | Pseudo-simulation to speed-up simulation times
44-
| [roadpricing](roadpricing/README.md) | Functionality to simulate different road-pricing scenarios in MATSim
45-
| [shared_mobility](shared_mobility/README.md) | Simulate human-driven shared mobility (i.e., micromobility)
46-
| [signals](signals/README.md) | Simulate traffic lights microscopically
47-
| [socnetsim](socnetsim/README.md) | Social network simulation
48-
| [sumo](sumo/README.md) | Converter and integrations for [SUMO](https://sumo.dlr.de/])
49-
| [taxi](taxi/README.md) | Taxi service functionality
50-
| vsp |
34+
| [locationchoice](locationchoice/README.md) | Location choice for discretionary activities
35+
| [matrixbasedptrouter](matrixbasedptrouter/README.md) | Calculate PT travel times using a set of stops and a pre-calculated travel time
36+
| [minibus](minibus/README.md) | Runs an adaptive "minibus" model to serve given demand
37+
| [multimodal](multimodal/README.md) | Enables multi-modal simulation
38+
| [noise](noise/README.md) | Tools to compute various noise metrics (emissions, imission, exposure costs)
39+
| osm |
40+
| [otfvis](otfvis/README.md) | Visualiser for Matsim scenarios
41+
| [parking](parking/README.md) | Parking infrastructure and supply constraints
42+
| [protobuf](protobuf/README.md) | Protocol buffer implementation and converter for the MATSim event infrastructure
43+
| [pseudosimulation](pseudosimulation/README.md) | Pseudo-simulation to speed-up simulation times
44+
| [railsim](railsim/README.md) | A large-scale hybrid micro- and mesoscopic simulation approach for railway operation
45+
| [roadpricing](roadpricing/README.md) | Functionality to simulate different road-pricing scenarios in MATSim
46+
| [shared_mobility](shared_mobility/README.md) | Simulate human-driven shared mobility (i.e., micromobility)
47+
| [signals](signals/README.md) | Simulate traffic lights microscopically
48+
| [simwrapper](simwrapper/README.md) | Creates dashboards automatically with [SimWrapper](https://simwrapper.github.io/)
49+
| [socnetsim](socnetsim/README.md) | Social network simulation
50+
| [sumo](sumo/README.md) | Converter and integrations for [SUMO](https://sumo.dlr.de/])
51+
| [taxi](taxi/README.md) | Taxi service functionality
52+
| vsp |

contribs/accessibility/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<dependency>
5353
<groupId>org.openstreetmap.osmosis</groupId>
5454
<artifactId>osmosis-core</artifactId>
55-
<version>0.48.3</version>
55+
<version>${osmosis.version}</version>
5656
<exclusions>
5757
<!-- needed to compile in IntelliJ with Eclipse compiler -->
5858
<!-- see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=536928 -->
@@ -65,7 +65,7 @@
6565
<dependency>
6666
<groupId>org.openstreetmap.osmosis</groupId>
6767
<artifactId>osmosis-xml</artifactId>
68-
<version>0.48.3</version>
68+
<version>${osmosis.version}</version>
6969
</dependency>
7070
<dependency>
7171
<groupId>org.matsim.contrib</groupId>

contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/AccessibilityComputationNairobiLandUseLocalCopy.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,26 @@
3939
*/
4040
class AccessibilityComputationNairobiLandUseLocalCopy {
4141
public static final Logger LOG = LogManager.getLogger(AccessibilityComputationNairobiLandUseLocalCopy.class);
42-
42+
4343
public static void main(String[] args) {
4444
int tileSize_m = 500;
4545
boolean push2Geoserver = false; // Set true for run on server
4646
boolean createQGisOutput = true; // Set false for run on server
47-
47+
4848
final Config config = ConfigUtils.createConfig(new AccessibilityConfigGroup());
49-
49+
5050
Envelope envelope = new Envelope(246000, 271000, 9853000, 9863000); // Central part of Nairobi
5151
String scenarioCRS = "EPSG:21037"; // EPSG:21037 = Arc 1960 / UTM zone 37S, for Nairobi, Kenya
52-
52+
5353
config.network().setInputFile("../nairobi/data/nairobi/input/2015-10-15_network.xml");
5454
config.facilities().setInputFile("../nairobi/data/land_use/Nairobi_LU_2010/facilities.xml");
5555
String runId = "ke_nairobi_landuse_hexagons_" + tileSize_m;
56-
config.controler().setOutputDirectory("../nairobi/data/nairobi/output/" + runId + "_lcpt_par4_car_tr-7_500/");
57-
config.controler().setRunId(runId);
58-
59-
config.controler().setOverwriteFileSetting(OverwriteFileSetting.deleteDirectoryIfExists);
60-
config.controler().setLastIteration(0);
61-
56+
config.controller().setOutputDirectory("../nairobi/data/nairobi/output/" + runId + "_lcpt_par4_car_tr-7_500/");
57+
config.controller().setRunId(runId);
58+
59+
config.controller().setOverwriteFileSetting(OverwriteFileSetting.deleteDirectoryIfExists);
60+
config.controller().setLastIteration(0);
61+
6262
AccessibilityConfigGroup acg = ConfigUtils.addOrGetModule(config, AccessibilityConfigGroup.class);
6363
acg.setAreaOfAccessibilityComputation(AreaOfAccesssibilityComputation.fromBoundingBoxHexagons);
6464
acg.setEnvelope(envelope);
@@ -69,17 +69,17 @@ public static void main(String[] args) {
6969
acg.setOutputCrs(scenarioCRS);
7070

7171
//acg.setUseParallelization(false);
72-
72+
7373
ConfigUtils.setVspDefaults(config);
74-
74+
7575
final Scenario scenario = ScenarioUtils.loadScenario(config);
76-
76+
7777
// final List<String> activityTypes = Arrays.asList(new String[]{"educational", "commercial", "industrial", "recreational", "water_body"});
7878
final List<String> activityTypes = Arrays.asList(new String[]{"educational"});
7979
final ActivityFacilities densityFacilities = AccessibilityUtils.createFacilityForEachLink(Labels.DENSITIY, scenario.getNetwork());
80-
80+
8181
final Controler controler = new Controler(scenario);
82-
82+
8383
for (String activityType : activityTypes) {
8484
AccessibilityModule module = new AccessibilityModule();
8585
module.setConsideredActivityType(activityType);
@@ -88,17 +88,17 @@ public static void main(String[] args) {
8888
module.setCreateQGisOutput(createQGisOutput);
8989
controler.addOverridingModule(module);
9090
}
91-
91+
9292
controler.run();
93-
93+
9494
if (createQGisOutput) {
9595
final Integer range = 9; // In the current implementation, this must always be 9
9696
final Double lowerBound = -3.5; // (upperBound - lowerBound) ideally nicely divisible by (range - 2)
9797
final Double upperBound = 3.5;
9898
final int populationThreshold = (int) (10 / (1000/tileSize_m * 1000/tileSize_m)); // People per km^2 or roads (?)
99-
99+
100100
String osName = System.getProperty("os.name");
101-
String workingDirectory = config.controler().getOutputDirectory();
101+
String workingDirectory = config.controller().getOutputDirectory();
102102
for (String actType : activityTypes) {
103103
String actSpecificWorkingDirectory = workingDirectory + actType + "/";
104104
for (Modes4Accessibility mode : acg.getIsComputingMode()) {

0 commit comments

Comments
 (0)