Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MATSim CW33 #109

Merged
merged 298 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
298 commits
Select commit Hold shift + click to select a range
ddd6914
make drt shifts multi mode drt comatible
nkuehnel Jun 23, 2024
b739633
adjust shift efficiency tracker as well
nkuehnel Jun 23, 2024
1663f22
Merge pull request #3331 from moia-oss/multimodeDrtShifts
nkuehnel Jun 23, 2024
4fcb5f3
Extended Trip analysis and dashboard (#3332)
rakow Jun 24, 2024
f1f54c3
Merge branch 'master' into dependabot/maven/org.apache.maven.plugins-…
jfbischoff Jun 24, 2024
4ef1c05
Merge pull request #3320 from matsim-org/dependabot/maven/org.apache.…
jfbischoff Jun 24, 2024
69169b5
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.5 to 3.3.0
dependabot[bot] Jun 24, 2024
7966b6b
Merge pull request #3321 from matsim-org/dependabot/maven/org.apache.…
jfbischoff Jun 24, 2024
3097f6d
Bump org.apache.maven.plugins:maven-surefire-report-plugin
dependabot[bot] Jun 24, 2024
59b30d0
Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.1 to 3.4.2
dependabot[bot] Jun 24, 2024
f0c58c3
Merge pull request #3322 from matsim-org/dependabot/maven/org.apache.…
jfbischoff Jun 24, 2024
d6e0399
Merge branch 'master' into dependabot/maven/org.apache.maven.plugins-…
jfbischoff Jun 24, 2024
b971cd6
Merge pull request #3327 from matsim-org/dependabot/maven/org.apache.…
jfbischoff Jun 24, 2024
bae8902
Bump com.fasterxml.woodstox:woodstox-core from 6.6.2 to 7.0.0
dependabot[bot] Jun 24, 2024
b3f4252
Bump org.jfree:jfreechart from 1.5.4 to 1.5.5
dependabot[bot] Jun 24, 2024
8396454
Merge pull request #3335 from matsim-org/dependabot/maven/org.jfree-j…
jfbischoff Jun 25, 2024
187541c
Merge branch 'master' into dependabot/maven/com.fasterxml.woodstox-wo…
jfbischoff Jun 25, 2024
05e5285
Merge branch 'master' into score-explanation
jfbischoff Jun 25, 2024
67ee3bc
Merge pull request #3334 from matsim-org/dependabot/maven/com.fasterx…
jfbischoff Jun 25, 2024
c722dcd
Merge branch 'master' into score-explanation
jfbischoff Jun 25, 2024
12335a8
Merge pull request #3175 from matsim-org/score-explanation
jfbischoff Jun 25, 2024
3194e9d
Merge branch 'master' into drtMaintenance
jfbischoff Jun 25, 2024
abbab85
Merge pull request #3099 from matsim-org/drtMaintenance
kainagel Jun 25, 2024
a9949d5
make drt work with only custom constraints sets
nkuehnel Jun 25, 2024
63208e9
add some logging to NetworkChangeEventsWriter
nkuehnel Jun 25, 2024
38d54d6
Merge branch 'master' into custom-constraints-update
nkuehnel Jun 25, 2024
2d72078
Merge branch 'master' into add-logging-to-network-change-events-writer
nkuehnel Jun 25, 2024
7f245e6
correct logging statement
nkuehnel Jun 25, 2024
47ebec6
Merge pull request #3337 from moia-oss/add-logging-to-network-change-…
nkuehnel Jun 25, 2024
5b1aa87
Merge branch 'master' into custom-constraints-update
nkuehnel Jun 25, 2024
0ec23f8
Merge pull request #3336 from moia-oss/custom-constraints-update
nkuehnel Jun 25, 2024
0282b8a
add router binding for complex request unscheduling
nkuehnel Jun 27, 2024
4c57821
use time as disutility
nkuehnel Jun 27, 2024
2054bba
Bump junit.version from 5.10.2 to 5.10.3
dependabot[bot] Jun 27, 2024
de64f77
* repair wrong positioning of vehicles if linkSpeedCalculator returns…
kainagel Jun 27, 2024
d7d1e47
Merge branch 'master' into bicycleContrib
kainagel Jun 27, 2024
ca7746a
Merge branch 'master' into parkingChoiceMaintenance
kainagel Jun 27, 2024
06e654f
Merge pull request #3345 from matsim-org/parkingChoiceMaintenance
kainagel Jun 27, 2024
126ffcd
norm subgroups to 1 (#3346)
rakow Jun 27, 2024
f05ec2d
Merge branch 'master' into dependabot/maven/junit.version-5.10.3
jfbischoff Jun 28, 2024
bd9e865
Merge pull request #3343 from matsim-org/dependabot/maven/junit.versi…
jfbischoff Jun 28, 2024
28e33d2
add tests for mode restriction
paulheinr Jun 28, 2024
b49541f
add test integration test case for complex unscheduler
nkuehnel Jun 28, 2024
b4b9429
Merge branch 'master' into addROuterToPrebooking
nkuehnel Jun 28, 2024
e388016
Bump io.grpc:grpc-all from 1.64.0 to 1.65.0
dependabot[bot] Jun 28, 2024
276a46f
add tests that depict the current behaviour
paulheinr Jun 28, 2024
5220b13
Merge pull request #3347 from matsim-org/dependabot/maven/io.grpc-grp…
jfbischoff Jun 28, 2024
3702bb5
Bump com.google.protobuf:protobuf-java from 4.27.1 to 4.27.2
dependabot[bot] Jun 30, 2024
88acd6c
Merge pull request #3338 from matsim-org/dependabot/maven/com.google.…
michalmac Jun 30, 2024
a497cc1
Merge branch 'master' into addROuterToPrebooking
nkuehnel Jun 30, 2024
02d389f
implement multiple mode test
paulheinr Jul 1, 2024
1dd4d60
Merge pull request #3340 from moia-oss/addROuterToPrebooking
nkuehnel Jul 2, 2024
d6c43d9
Split CalculateSkimMatrices.prepareAndCalculateNetworkMatrices() to a…
marecabo Jul 2, 2024
3671fe6
implement option for network inconsistency check; no test adaptation …
paulheinr Jul 2, 2024
8dfc8c3
Bump org.checkerframework:checker-qual from 3.44.0 to 3.45.0
dependabot[bot] Jul 2, 2024
08729b0
implemented network changer
paulheinr Jul 3, 2024
a527e84
implement functionality in Util classes and moved config
paulheinr Jul 3, 2024
bd6a5fc
implement test using the new functionality for mode restriction
paulheinr Jul 3, 2024
40ef8a2
revert changing the default access egress type
paulheinr Jul 3, 2024
8313a4d
Switch to DrtWithExtensionsConfigGroup
steffenaxer Jul 3, 2024
7fc08d6
Merge pull request #3355 from steffenaxer/DrtWithExtensionsConfigGroup
steffenaxer Jul 4, 2024
eba4326
Merge branch 'master' into skim-matrices-with-custom-travel-time-object
steffenaxer Jul 4, 2024
cb853ee
Merge pull request #3351 from matsim-org/skim-matrices-with-custom-tr…
steffenaxer Jul 4, 2024
f79f0bf
Merge branch 'master' into dependabot/maven/org.checkerframework-chec…
jfbischoff Jul 4, 2024
12160b2
Merge pull request #3352 from matsim-org/dependabot/maven/org.checker…
jfbischoff Jul 4, 2024
64c4bd5
Bump org.apache.poi:poi-ooxml from 5.2.5 to 5.3.0
dependabot[bot] Jul 4, 2024
3200fe1
explicitly set access egress type
paulheinr Jul 4, 2024
d647a6b
fix test failures in contribs
paulheinr Jul 4, 2024
f1b39c5
Merge pull request #3353 from matsim-org/dependabot/maven/org.apache.…
jfbischoff Jul 4, 2024
79f0f23
fix test failures in contribs and add config parameter so relevant fu…
paulheinr Jul 4, 2024
56f5868
reworked CreatePseudoNetwork with loop-links to avoid duplicating stops
davibicudo Jul 4, 2024
5d278aa
Merge branch 'master' of github.com:matsim-org/matsim-libs into featu…
davibicudo Jul 4, 2024
f8c417a
Merge pull request #3357 from davibicudo/feature/pseudonet-looplinks
jfbischoff Jul 4, 2024
7b0e554
repair test failures
kainagel Jul 4, 2024
8ddacdf
Trip facet dashboard (#3350)
frievoe97 Jul 4, 2024
041381a
adjust rounding
rewertvsp Jul 8, 2024
c52cbed
exclude case
rewertvsp Jul 8, 2024
a745c95
Merge pull request #3361 from matsim-org/fixLinkSelectionForFreightGe…
rewertvsp Jul 8, 2024
cdc625d
Drt dashboard typo fix (#3360)
frievoe97 Jul 8, 2024
e07615e
Bump com.fasterxml.jackson:jackson-bom from 2.17.1 to 2.17.2
dependabot[bot] Jul 8, 2024
c2d4592
Merge pull request #3362 from matsim-org/dependabot/maven/com.fasterx…
jfbischoff Jul 8, 2024
5c3b825
Merge branch 'master' into mode-restriction
paulheinr Jul 9, 2024
613c039
Bump net.bytebuddy:byte-buddy from 1.14.17 to 1.14.18
dependabot[bot] Jul 9, 2024
a639335
set networkMode based on vehicleTypes
rewertvsp Jul 9, 2024
3c72fcb
pass lambda function as parameter
paulheinr Jul 10, 2024
cd4a870
Bump org.assertj:assertj-core from 3.26.0 to 3.26.3
dependabot[bot] Jul 10, 2024
5359c73
Merge pull request #3363 from matsim-org/dependabot/maven/net.bytebud…
jfbischoff Jul 10, 2024
2c849ea
Merge branch 'master' into dependabot/maven/org.assertj-assertj-core-…
jfbischoff Jul 10, 2024
ae137e3
Merge pull request #3364 from matsim-org/dependabot/maven/org.assertj…
jfbischoff Jul 10, 2024
61b02bc
chore: clean up MinimalTransferTimes (#3365)
sebhoerl Jul 11, 2024
79c9523
chore: cleanup adaptive transfers (#3366)
sebhoerl Jul 11, 2024
d0f310a
Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.3.0 to 3.3.1
dependabot[bot] Jul 11, 2024
678ef0f
Merge pull request #3367 from matsim-org/dependabot/maven/org.apache.…
jfbischoff Jul 11, 2024
bad4be0
add missing case of enum
rewertvsp Jul 12, 2024
9cf945d
add functionality to split jobs
rewertvsp Jul 12, 2024
c157c29
use new methods
rewertvsp Jul 12, 2024
346b6e7
update activity creation
rewertvsp Jul 12, 2024
0137ffc
Merge pull request #3370 from matsim-org/changesForFreightDemandGener…
rewertvsp Jul 12, 2024
5fd7bb2
set activity time correctly
rewertvsp Jul 12, 2024
b98e04a
Merge branch 'refs/heads/master' into adjustModeSelectionForSmallScal…
rewertvsp Jul 12, 2024
d485262
Merge branch 'master' into adjustModeSelectionForSmallScaleCommercial
rewertvsp Jul 12, 2024
683b731
remove unneeded exception
rewertvsp Jul 13, 2024
f8119af
Merge pull request #3371 from matsim-org/adjustModeSelectionForSmallS…
rewertvsp Jul 13, 2024
6f0721e
change to parameterized log message
kt86 Jul 16, 2024
af5098e
delete empty test methods
kt86 Jul 16, 2024
6d14b25
remove unused import
kt86 Jul 16, 2024
edda343
fix unchecked assignment
kt86 Jul 16, 2024
a1c3a77
remove redundant local variables
kt86 Jul 16, 2024
720a2d0
minor code style update
kt86 Jul 16, 2024
7e45620
remove not needed throw information
kt86 Jul 16, 2024
8d310b4
make things final
kt86 Jul 16, 2024
295ef5f
remove redundant final declaration
kt86 Jul 16, 2024
e57b138
remove unnecessary 'throws' declarations
kt86 Jul 16, 2024
72aa7ca
simplify assertions
kt86 Jul 16, 2024
154f91b
cleanup Strings
kt86 Jul 16, 2024
bbb1919
remove redundant casts
kt86 Jul 16, 2024
bc5fda2
code style update
kt86 Jul 16, 2024
2814bc9
cleanup imports
kt86 Jul 16, 2024
00beceb
Java language: Replace explicit type with <>
kt86 Jul 16, 2024
93e6294
Java language: use computeIfAbsent
kt86 Jul 16, 2024
b5d767f
Java language: use Double.hashCode(...)
kt86 Jul 16, 2024
3c964b0
Java language: replace if by switch
kt86 Jul 16, 2024
967e0e8
Java language: avoid raw use
kt86 Jul 16, 2024
87e7f99
Java language: use text block
kt86 Jul 16, 2024
6a1cc65
Java language: use pattern variable
kt86 Jul 16, 2024
128b9aa
Java language: use add/getFirst()
kt86 Jul 16, 2024
ac78f5b
Access to TestUtils.EPSILION
kt86 Jul 16, 2024
f59e4d6
add not null assertion
kt86 Jul 16, 2024
31d2c0d
Merge pull request #3374 from matsim-org/kmt_freightCleanupCode
kt86 Jul 17, 2024
af740e6
remove one layer of "LSPs"
kt86 Jul 17, 2024
0da2db8
Merge pull request #3375 from matsim-org/kmt_updateLspDefinition
kt86 Jul 17, 2024
60368d2
add prebooking support for drt shifts
nkuehnel Jul 19, 2024
4a5ad3f
cancel assigned shifts
nkuehnel Jul 19, 2024
e5bf4d9
Bump com.google.errorprone:error_prone_annotations from 2.28.0 to 2.29.2
dependabot[bot] Jul 19, 2024
7c2f4d2
add some documentation
nkuehnel Jul 19, 2024
106766a
shift drt maintenance
nkuehnel Jul 19, 2024
c7a9904
some more drt shift maintenance
nkuehnel Jul 19, 2024
6dc0421
consider break corridors for (pre)bookings
nkuehnel Jul 19, 2024
6f8d841
consider break corridors for (pre)bookings
nkuehnel Jul 19, 2024
ef5de17
clean up obsolete method
nkuehnel Jul 19, 2024
2d4f1d7
update FISS test, reduce iterations to reduce runtime
nkuehnel Jul 23, 2024
f55bf93
avoid abandoning prebooked requests twice in the same time step
nkuehnel Jul 23, 2024
9e934d4
Merge pull request #3379 from moia-oss/drtShiftsWithPrebooking
nkuehnel Jul 23, 2024
aea22bd
Merge branch 'master' into fix_prebooking_abandonment
nkuehnel Jul 23, 2024
2a40907
Merge pull request #3380 from moia-oss/fix_prebooking_abandonment
nkuehnel Jul 23, 2024
a09c238
Merge branch 'master' into mode-restriction
paulheinr Jul 24, 2024
1b9041f
fix tests by disabling net consistency check
paulheinr Jul 25, 2024
ad6f17e
adapt error messages
paulheinr Jul 25, 2024
f684d07
remove redundant suppression
kt86 Jul 25, 2024
95af125
remove unused field
kt86 Jul 25, 2024
f754070
internal renaming
kt86 Jul 25, 2024
50daf7d
remove unnecessary toString() calls
kt86 Jul 25, 2024
db06b2b
remove unnecessary semicolon
kt86 Jul 25, 2024
53a9a1f
inline and remove method
kt86 Jul 25, 2024
f2eee3f
cleanup imports
kt86 Jul 25, 2024
c104df2
simplification
kt86 Jul 25, 2024
fdadeca
make final, internal renaming
kt86 Jul 25, 2024
26cbfd4
replace 'if' by 'switch'
kt86 Jul 25, 2024
41af9a2
simplification
kt86 Jul 25, 2024
a3c5c2b
use enhanced 'switch'
kt86 Jul 25, 2024
71c8509
simplification
kt86 Jul 25, 2024
174009f
use 'getFirst()'
kt86 Jul 25, 2024
ad74210
javadoc: replace blank lines with '<p>'
kt86 Jul 25, 2024
fcd62ef
javadoc: set link as a link
kt86 Jul 25, 2024
8de79dc
logging: use parameterized logging
kt86 Jul 25, 2024
f9ccc49
add casting
kt86 Jul 25, 2024
268f609
simplification
kt86 Jul 25, 2024
44713d9
use 'append()' calls
kt86 Jul 25, 2024
8fd0955
simplification by removing inaccessibly parts of if statements.
kt86 Jul 25, 2024
1a8510d
remove duplicated setting of variable
kt86 Jul 25, 2024
3fa72e9
Simplify assertions
kt86 Jul 25, 2024
04ad679
Simplify stream
kt86 Jul 25, 2024
ebec885
avoid casting
kt86 Jul 25, 2024
0319bab
suppress warning
kt86 Jul 25, 2024
597faae
fix some (language) grammar
kt86 Jul 25, 2024
d08aec1
fix some typos
kt86 Jul 25, 2024
adcb9f8
more simplifications
kt86 Jul 25, 2024
2d5c06f
cleanup: remove commented out code
kt86 Jul 25, 2024
dac7488
small cleanups
kt86 Jul 25, 2024
ed26933
Merge pull request #3383 from matsim-org/kmt_emissions-maintenance
kt86 Jul 25, 2024
96b14ee
fix test failures by disable net consistency check
paulheinr Jul 25, 2024
65ec814
Merge branch 'master' into mode-restriction
paulheinr Jul 25, 2024
213fae0
optimize h3 zone system initialization; move h3 test to common module
nkuehnel Jul 27, 2024
8091cab
Merge branch 'master' into optimizeH3ZoneSystem
nkuehnel Jul 27, 2024
0730d0b
Merge pull request #3384 from moia-oss/optimizeH3ZoneSystem
nkuehnel Jul 28, 2024
8caaa37
shift drt maintenance; fix bug for prebooked e-drt scenarios that nee…
nkuehnel Jul 29, 2024
3af17e5
make FISS integration test less sensible to smaller changes in link e…
nkuehnel Jul 29, 2024
84ee758
Merge pull request #3385 from moia-oss/drtShiftMaintenance
nkuehnel Jul 29, 2024
4fa6530
set level of some logging's back from WARN to DEBUG
kt86 Jul 29, 2024
e1783db
Merge pull request #3386 from matsim-org/kmt_reduceLoggingLevel
kt86 Jul 29, 2024
33d857b
SimWrapper Dashboard features (#3381)
rakow Jul 30, 2024
d5df451
Merge branch 'master' into bicycleContrib
tschlenther Aug 1, 2024
8f8bb17
Merge branch 'master' into populationAnalysis
tschlenther Aug 1, 2024
84948be
Merge pull request #3344 from matsim-org/bicycleContrib
kainagel Aug 1, 2024
e2b5f17
Merge branch 'master' into mode-restriction
paulheinr Aug 1, 2024
ec12c86
Update GenerateFreightPlans.java (#3387)
luchengqi7 Aug 1, 2024
8dc0f73
add events files comparison
paulheinr Aug 1, 2024
43287db
Merge branch 'master' into mode-restriction
paulheinr Aug 1, 2024
ad2da0c
Merge pull request #3348 from matsim-org/mode-restriction
paulheinr Aug 1, 2024
86d8b5d
Merge branch 'master' into populationAnalysis
tschlenther Aug 2, 2024
92019b7
Merge pull request #2830 from matsim-org/populationAnalysis
tschlenther Aug 2, 2024
7dd60f1
more (javadoc) comments
kainagel Aug 2, 2024
0b68451
Merge branch 'master' into comments
kainagel Aug 2, 2024
893b8fc
Merge pull request #3388 from matsim-org/comments
kainagel Aug 2, 2024
d4a2962
add test which includes tolling.
kt86 Aug 4, 2024
3b7896d
WIP: Prepare test for tolling with factor. Not implemented to the end…
kt86 Aug 4, 2024
4024046
replace self-build RoadPricingCalculator with official RoadPricingScheme
kainagel Aug 4, 2024
ae8aa5a
adapt test: use tollFactor
kt86 Aug 5, 2024
3bc9b18
add option if person==null
kt86 Aug 5, 2024
f051660
more tests
kt86 Aug 6, 2024
99f008a
more steps forward
kainagel Aug 6, 2024
9b3f818
fix one test: Use MATSim's vehicles
kt86 Aug 6, 2024
8a3cd45
fix the last test: Building the netbased costs without MATSim's vehic…
kt86 Aug 6, 2024
883f2d3
some cleanup and javadoc
kt86 Aug 6, 2024
307c602
fix typos, internal renaming
kt86 Aug 6, 2024
f7f5629
Merge pull request #3390 from matsim-org/kmt_roadpricingInFreight
kt86 Aug 6, 2024
e307db4
Merge branch 'master' into dependabot/maven/com.google.errorprone-err…
tschlenther Aug 6, 2024
0212861
Merge pull request #3378 from matsim-org/dependabot/maven/com.google.…
tschlenther Aug 6, 2024
71c63db
Bump org.apache.maven.plugins:maven-surefire-report-plugin
dependabot[bot] Aug 6, 2024
8297af9
Merge pull request #3368 from matsim-org/dependabot/maven/org.apache.…
jfbischoff Aug 6, 2024
79c687f
Bump io.grpc:grpc-all from 1.65.0 to 1.65.1
dependabot[bot] Aug 6, 2024
b0a5f3d
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.3.0 to 3.3.1
dependabot[bot] Aug 6, 2024
ced295a
Merge pull request #3369 from matsim-org/dependabot/maven/org.apache.…
jfbischoff Aug 6, 2024
45c9201
Merge branch 'master' into dependabot/maven/io.grpc-grpc-all-1.65.1
jfbischoff Aug 6, 2024
5c91b59
Merge pull request #3372 from matsim-org/dependabot/maven/io.grpc-grp…
jfbischoff Aug 6, 2024
0ab2647
Bump commons-codec:commons-codec from 1.17.0 to 1.17.1
dependabot[bot] Aug 6, 2024
d6b1a57
Merge pull request #3373 from matsim-org/dependabot/maven/commons-cod…
jfbischoff Aug 6, 2024
5bf784e
Preserve the working directory when gui is run from cli (#3391)
rakow Aug 6, 2024
4e4afdc
use asterisk for act type default
tschlenther Aug 7, 2024
a382078
Merge pull request #3397 from matsim-org/noiseAnalysis
tschlenther Aug 7, 2024
6a30c28
NoiseAnalysis: set the scale factor for according to sample size
tschlenther Aug 7, 2024
63713ba
Merge branch 'master' into noiseAnalysis
tschlenther Aug 7, 2024
12b08e1
Merge pull request #3398 from matsim-org/noiseAnalysis
tschlenther Aug 7, 2024
ea1f72c
add fare zone based pt pricing (#3382)
simei94 Aug 8, 2024
e981bde
better defaults for NoiseDashboard
tschlenther Aug 8, 2024
cdfe0bc
remove the static
rewertvsp Aug 8, 2024
90c72f3
Merge pull request #3400 from matsim-org/removeStaticParameterForSmal…
rewertvsp Aug 8, 2024
624ca13
NoiseAnalysis: more explicit parameter settings + bug fix in MergeNoi…
tschlenther Aug 8, 2024
a455df3
Update DRT estimate and teleport module (#3333)
luchengqi7 Aug 9, 2024
1730ac8
NoiseAnalysis: merge damages files
tschlenther Aug 9, 2024
6ba2578
NoiseDashboard: include stats and damage plots
tschlenther Aug 9, 2024
cda5767
only perform net consistency check once
paulheinr Aug 9, 2024
4c42086
Merge pull request #3401 from matsim-org/mode-restriction-update
paulheinr Aug 9, 2024
e2f7c36
CreateSingleSimWrapperDashboard
tschlenther Aug 9, 2024
9175ec8
fix noise tests: explicitly set activity types for rp grid, when sett…
tschlenther Aug 9, 2024
2d8aece
Merge branch 'master' into noiseAnalysis
tschlenther Aug 9, 2024
9948285
Merge pull request #3402 from matsim-org/noiseAnalysis
tschlenther Aug 9, 2024
c316aa5
fix nasty insertion scheduler bug
nkuehnel Aug 11, 2024
b705f05
Merge pull request #3405 from moia-oss/fixDrtInsertionBug
nkuehnel Aug 12, 2024
0e5e93e
Merge branch 'moia-deployment' into cw33
nkuehnel Aug 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,14 @@ public Integer call() throws Exception {

// load config if not present yet.
if (config == null) {
config = loadConfig(Objects.requireNonNull( configPath, "No default scenario location given" ).getAbsoluteFile().toString() );
String path = Objects.requireNonNull( configPath, "No default scenario location given" ).getAbsoluteFile().toString();
List<ConfigGroup> customModules = getCustomModules();

final Config config1 = ConfigUtils.loadConfig(path, customModules.toArray(new ConfigGroup[0] ) );
Config prepared = prepareConfig( config1 );

config = prepared != null ? prepared : config1;
// (The above lines of code come from inlining so maybe it happened there: I cannot see how prepared could be null but config1 not except if user code returns null which I would consider a bug. kai, aug'24)
} else {
Config tmp = prepareConfig(config);
config = tmp != null ? tmp : config;
Expand Down Expand Up @@ -306,15 +313,6 @@ protected final void addRunOption(Config config, String option) {
addRunOption(config, option, "");
}

private Config loadConfig(String path) {
List<ConfigGroup> customModules = getCustomModules();

final Config config = ConfigUtils.loadConfig(path, customModules.toArray(new ConfigGroup[0]));
Config prepared = prepareConfig(config);

return prepared != null ? prepared : config;
}

@Override
public String defaultValue(CommandLine.Model.ArgSpec argSpec) throws Exception {
Object obj = argSpec.userObject();
Expand Down Expand Up @@ -374,8 +372,39 @@ public static void run(Class<? extends MATSimApplication> clazz, String... args)
}

/**
* Convenience method to run a scenario from code or automatically with gui when desktop application is detected.
* This method may also be used to predefine some default arguments.
* <p>Convenience method to run a scenario from code or automatically with gui when desktop application is detected.
* This method may also be used to predefine some default arguments.</p>
*
* <p>With respect to args it looks like arguments are treated in the following sequence (programmed in the run method):
* <ul>
* <li>ConfigUtils.loadConfig without args</li>
* <li>prepareConfig which is usually overwritten</li>
* <li>config options from some yaml file which can be provided as a command line option</li>
* <li>config options on command line </li>
* </ul></p>
*
* <p>defaultArgs could be used to provide defaults when calling this method here; they would go in addition to what is coming in from "upstream" which is typically the command line.</p>
*
* <p>There are many execution paths that can be reached from this class, but a typical one for matsim-scenarios seems to be:<ul>
* <li> This method runs MATSimApplication.run( TheScenarioClass.class , args ).</li>
* <li> That run class will instantiate an instance of TheScenarioClass (*), then do some args consistenty checking, then call the piccoli execute method. </li>
* <li> The piccoli execute method will essentially call the "call" method of MATSimApplication. </li>
* <li> I think that in the described execution path, this.config in that call method will initially be null. (The ctor of MATSimApplication was called via reflection at (*); I think that it was called there without a config argument.) </li>
* <li> This call method then will do: <ul>
* <li> getCustomModules() (which is empty by default but can be overriden) </li>
* <li>ConfigUtils.loadConfig(...) _without_ passing on the args</li>
* <li>prepareConfig(...) (which is empty by default but is typically overridden, in this case in OpenBerlinScenario). In our case, this sets the typical scoring params and the typical replanning strategies.
* <li>next one can override the config from some yaml file provided as a commandline option
* <li> next args is parsed and set
* <li>then some standard CL options are detected and set
* <li>then createScenario(config) is called (which can be overwritten but is not)
* <li>then prepareScenario(scenario) is called (which can be overwritten but is not)
* <li>then a standard controler is created from scenario
* <li>then prepareControler is called which can be overwritten
* </ul>
* </ul>
* </p>
*
* @param clazz class of the scenario to run
* @param args pass arguments from the main method
* @param defaultArgs predefined default arguments that will always be present
Expand All @@ -384,6 +413,8 @@ public static void runWithDefaults(Class<? extends MATSimApplication> clazz, Str

if (ApplicationUtils.isRunFromDesktop() && args.length == 0) {

System.setProperty("MATSIM_GUI_DESKTOP", "true");

if (defaultArgs.length > 0) {
String value = String.join(ARGS_DELIMITER, defaultArgs);
System.setProperty("MATSIM_GUI_ARGS", value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ public Integer call() throws Exception {

Gui gui = f.get();

// Set the current working directory to be used in the gui, when run from the command line
// If the gui is run from desktop, the working directory is not overwritten

// Assumption is that starting something from command line, the user expects that the working directory remains the same
if (!System.getProperty("MATSIM_GUI_DESKTOP", "false").equals("true"))
gui.setWorkingDirectory(new File(""));

while (gui.isShowing())
Thread.sleep(250);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
import org.apache.avro.file.DataFileWriter;
import org.apache.avro.io.DatumWriter;
import org.apache.avro.specific.SpecificDatumWriter;
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.matsim.api.core.v01.Coord;
import org.matsim.application.avro.XYTData;
import org.matsim.core.config.Config;
import org.matsim.core.utils.io.IOUtils;
import org.matsim.core.utils.misc.Time;
import tech.tablesaw.api.*;
import tech.tablesaw.io.csv.CsvReadOptions;

Expand All @@ -29,7 +32,8 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import java.util.stream.Collectors;

import static org.geotools.gml3.v3_2.GML.coordinateSystem;

/**
* Merges noise data from multiple files into one file.
Expand All @@ -44,17 +48,16 @@ final class MergeNoiseOutput {
*/
private static final boolean CREATE_CSV_FILES = false;

private final String[] inputPath;
private final Path outputDirectory;
private final String crs;
private final String[] labels = {"immission", "emission"};
private final int minTime = 3600;
private int maxTime = 24 * 3600;

MergeNoiseOutput(String[] inputPath, Path outputDirectory, String crs) {
this.inputPath = inputPath;
this.outputDirectory = outputDirectory;
this.crs = crs;
private final Map<String,Float> totalReceiverPointValues = new HashMap<>();

MergeNoiseOutput(Path path, String coordinateSystem ) {
this.outputDirectory = path;
this.crs = coordinateSystem;
}

/**
Expand Down Expand Up @@ -90,25 +93,9 @@ public void setMaxTime(int maxTime) {
* Merges noise data from multiple files into one file.
*/
public void run() {

// Loop over all paths
for (int i = 0; i < labels.length; i++) {

// Select the correct method based on the label
switch (labels[i]) {
case "immission" -> {
if (CREATE_CSV_FILES) {
mergeImmissionsCSV(inputPath[i], labels[i]);
} else {
mergeImissions(inputPath[i], labels[i]);
}

}
case "emission" -> mergeEmissions(inputPath[i], labels[i]);
default -> log.warn("Unknown path: " + inputPath[i]);
}

}
mergeReceiverPointData(outputDirectory + "/immissions/", "immission");
mergeReceiverPointData(outputDirectory + "/damages_receiverPoint/", "damages_receiverPoint");
mergeLinkData(outputDirectory.toString() + "/emissions/", "emission");
}

/**
Expand All @@ -118,6 +105,7 @@ public void run() {
* @param output
*/
private void writeAvro(XYTData xytData, File output) {
log.info(String.format("Start writing avro file to %s", output.toString() ));
DatumWriter<XYTData> datumWriter = new SpecificDatumWriter<>(XYTData.class);
try (DataFileWriter<XYTData> dataFileWriter = new DataFileWriter<>(datumWriter)) {
dataFileWriter.setCodec(CodecFactory.deflateCodec(9));
Expand All @@ -128,7 +116,7 @@ private void writeAvro(XYTData xytData, File output) {
}
}

private void mergeEmissions(String pathParameter, String label) {
private void mergeLinkData(String pathParameter, String label) {
log.info("Merging emissions data for label {}", label);
Object2DoubleMap<String> mergedData = new Object2DoubleOpenHashMap<>();
Table csvOutputMerged = Table.create(TextColumn.create("Link Id"), DoubleColumn.create("value"));
Expand All @@ -143,9 +131,8 @@ private void mergeEmissions(String pathParameter, String label) {
.separator(';').build());

for (Row row : table) {
// index for Noise Emission xx:xx:xx -> 7
String linkId = row.getString("Link Id");
double value = row.getDouble(7);
double value = row.getDouble(row.columnCount() - 1);
mergedData.mergeDouble(linkId, value, Double::max);

}
Expand All @@ -165,38 +152,49 @@ private void mergeEmissions(String pathParameter, String label) {
}

/**
* Merges the immissions data
* Merges receiverPoint data (written by {@link org.matsim.contrib.noise.NoiseWriter}
*
* @param pathParameter path to the immissions data
* @param label label for the immissions data
* @param outputDir path to the receiverPoint data
* @param label label for the receiverPoint data (which kind of data)
*/
private void mergeImissions(String pathParameter, String label) {
private void mergeReceiverPointData(String outputDir, String label) {

// data per time step, maps coord to value
Int2ObjectMap<Object2FloatMap<FloatFloatPair>> data = new Int2ObjectOpenHashMap<>();

// Loop over all files
//TODO could be adjusted to time bin size from noise config group
String substrToCapitalize = null;
for (int time = minTime; time <= maxTime; time += 3600) {

String path = pathParameter + label + "_" + round(time, 1) + ".csv";
String timeDataFile = outputDir + label + "_" + round(time, 1) + ".csv";

Object2FloatOpenHashMap<FloatFloatPair> values = new Object2FloatOpenHashMap<>();

if (!Files.exists(Path.of(path))) {
log.warn("File {} does not exist", path);
if (!Files.exists(Path.of(timeDataFile))) {
log.warn("File {} does not exist", timeDataFile);
continue;
}

// Read the file
Table table = Table.read().csv(CsvReadOptions.builder(IOUtils.getBufferedReader(path))
.columnTypesPartial(Map.of("x", ColumnType.FLOAT, "y", ColumnType.FLOAT, "Receiver Point Id", ColumnType.INTEGER, "t", ColumnType.DOUBLE))
//we need "damages_receiverPoint" -> "Damages 01:00:00" and "immission" -> "Immision 01:00:00"
substrToCapitalize = label.contains("_") ? label.substring(0, label.lastIndexOf("_")) : label;
String valueHeader = StringUtils.capitalize(substrToCapitalize) + " " + Time.writeTime(time, Time.TIMEFORMAT_HHMMSS);

// Read the data file
Table dataTable = Table.read().csv(CsvReadOptions.builder(IOUtils.getBufferedReader(timeDataFile))
.columnTypesPartial(Map.of("x", ColumnType.FLOAT,
"y", ColumnType.FLOAT,
"Receiver Point Id", ColumnType.INTEGER,
"t", ColumnType.DOUBLE,
valueHeader, ColumnType.DOUBLE))
.sample(false)
.separator(';').build());

// Loop over all rows in the file
for (Row row : table) {
// Loop over all rows in the data file
for (Row row : dataTable) {
float x = row.getFloat("x");
float y = row.getFloat("y");
float value = (float) row.getDouble(1); // 1
float value = (float) row.getDouble(valueHeader);
FloatFloatPair coord = FloatFloatPair.of(x, y);
values.put(coord, value);
}
Expand Down Expand Up @@ -232,7 +230,7 @@ private void mergeImissions(String pathParameter, String label) {
}
}

xytHourData.setData(Map.of("imissions", raw));
xytHourData.setData(Map.of(label, raw));
xytHourData.setCrs(crs);

File out = outputDirectory.getParent().resolve(label + "_per_hour.avro").toFile();
Expand All @@ -254,15 +252,18 @@ private void mergeImissions(String pathParameter, String label) {
xytDayData.setTimestamps(List.of(0));
xytDayData.setXCoords(xCoords);
xytDayData.setYCoords(yCoords);
xytDayData.setData(Map.of("imissions", raw));
xytDayData.setData(Map.of(label, raw));
xytDayData.setCrs(crs);

File outDay = outputDirectory.getParent().resolve(label + "_per_day.avro").toFile();

writeAvro(xytDayData, outDay);
//cache the overall sum
this.totalReceiverPointValues.put(substrToCapitalize, raw.stream().reduce(0f, Float::sum));
}

// Merges the immissions data

@Deprecated
private void mergeImmissionsCSV(String pathParameter, String label) {
log.info("Merging immissions data for label {}", label);
Expand All @@ -278,7 +279,10 @@ private void mergeImmissionsCSV(String pathParameter, String label) {

// Read the file
Table table = Table.read().csv(CsvReadOptions.builder(IOUtils.getBufferedReader(path))
.columnTypesPartial(Map.of("x", ColumnType.DOUBLE, "y", ColumnType.DOUBLE, "Receiver Point Id", ColumnType.INTEGER, "t", ColumnType.DOUBLE))
.columnTypesPartial(Map.of("x", ColumnType.DOUBLE,
"y", ColumnType.DOUBLE,
"Receiver Point Id", ColumnType.INTEGER,
"t", ColumnType.DOUBLE))
.sample(false)
.separator(';').build());

Expand Down Expand Up @@ -319,4 +323,7 @@ private void mergeImmissionsCSV(String pathParameter, String label) {
log.info("Merged noise data written to {} ", outPerDay);

}
public Map<String, Float> getTotalReceiverPointValues() {
return totalReceiverPointValues;
}
}
Loading