Skip to content

Commit

Permalink
try to reduce cadyts memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Oct 12, 2024
1 parent 4071c94 commit 002ce04
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ input/sumo.net.xml: input/network.osm
--output.original-names --output.street-names\
--osm.lane-access false --osm.bike-access false\
--osm.all-attributes\
--osm.extra-attributes tunnel,highway,traffic_sign,bus:lanes,bus:lanes:forward,bus:lanes:backward,cycleway,cycleway:right,cycleway:left\
--osm.extra-attributes smoothness,surface,crossing,tunnel,traffic_sign,bus:lanes,bus:lanes:forward,bus:lanes:backward,cycleway,cycleway:right,cycleway:left\
--proj "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"\
--osm-files $< -o=$@

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<artifactId>matsim-all</artifactId>

<!-- PR-labelled release -->
<version>2025.0-PR3501</version>
<version>2025.0-PR3508</version>

<!-- snapshot == not recommended: rather use PR-labelled release!-->
<!-- <version>2025.0-SNAPSHOT</version>-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ protected Config prepareConfig(Config config) {

config.vspExperimental().setVspDefaultsCheckingLevel(VspExperimentalConfigGroup.VspDefaultsCheckingLevel.ignore);

// Reduce number of threads, to reduce memory usage
config.global().setNumberOfThreads(Math.max(8, config.global().getNumberOfThreads()));
config.qsim().setNumberOfThreads(Math.max(8, config.qsim().getNumberOfThreads()));

} else if (mode == CalibrationMode.routeChoice) {

// Re-route for all populations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ private ActivityFacility sampleBerlinWorkPlace(STRtree index, double dist, Coord
private boolean checkDistanceBound(double target, Coord refCoord, Coord other, double factor) {

// Constant added to the bounds, needed for trips with low base distance
double constant = (factor - 1) * 100;
double constant = (factor - 0.95) * 1000;

// Percentage based bounds
double lower = target * 0.8 * (2 - factor) - constant;
Expand Down

0 comments on commit 002ce04

Please sign in to comment.