Skip to content

Commit

Permalink
Merge branch 'main' into 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Feb 20, 2024
2 parents f8e49ac + 28e97bf commit 10edf0c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 30 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Build Status](https://github.com/matsim-scenarios/matsim-berlin/workflows/build/badge.svg?branch=main)
[![Build Status](https://github.com/matsim-scenarios/matsim-berlin/actions/workflows/build.yaml/badge.svg?branch=main)](https://github.com/matsim-scenarios/matsim-berlin/actions/workflows/build.yaml)
![license](https://img.shields.io/github/license/matsim-scenarios/matsim-berlin.svg)
![JDK](https://img.shields.io/badge/JDK-17+-green.svg)

Expand All @@ -15,7 +15,7 @@ Currently, there are multiple versions of the MATSim Open Berlin model:

### 10pct scenario (`input/v6.0`)

This scenario contains a 25pct sample of the Greater Berlin population; road capacities are accordingly reduced. The scenario is calibrated taking into consideration the traffic counts, modal split and mode-specific trip distance distributions.
This scenario contains both 10pct and 1pct sample of the Greater Berlin population; road capacities are accordingly reduced. The scenario is calibrated taking into consideration the traffic counts, modal split and mode-specific trip distance distributions.


## Licenses
Expand Down Expand Up @@ -125,4 +125,4 @@ For more information about MATSim, see here: https://www.matsim.org/
## Internal documentation

Internal documentation can be found here:
https://docs.google.com/document/d/133CuXaMuWL0NcstyFHodk4y7J5yFLy9nrLtbBVpNWzM/edit?usp=drive_link
https://docs.google.com/document/d/133CuXaMuWL0NcstyFHodk4y7J5yFLy9nrLtbBVpNWzM/edit?usp=drive_link
32 changes: 15 additions & 17 deletions input/v6.0/berlin-v6.0.config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE config SYSTEM "http://www.matsim.org/files/dtd/config_v2.dtd">
<config>
<module name="TimeAllocationMutator">
<param name="mutationRange" value="1800.0"/>
<param name="mutationRange" value="900.0"/>
</module>
<module name="controler">
<param name="lastIteration" value="500"/>
Expand All @@ -19,24 +19,24 @@
<param name="numberOfThreads" value="16"/>
</module>
<module name="network">
<param name="inputNetworkFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0-pre/input/berlin-v6.0-network-with-pt.xml.gz"/>
<param name="inputNetworkFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-network-with-pt.xml.gz"/>
</module>
<module name="plans">
<param name="inputPlansFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0-pre/input/berlin-v6.0-25pct.plans.xml.gz"/>
<param name="inputPlansFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-10pct.plans.xml.gz"/>
<param name="removingUnnecessaryPlanAttributes" value="true"/>
</module>
<module name="vehicles">
<param name="vehiclesFile"
value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v5.5-10pct/input/berlin-v5-mode-vehicle-types.xml"/>
</module>
<module name="transit">
<param name="transitScheduleFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0-pre/input/berlin-v6.0-transitSchedule.xml.gz"/>
<param name="transitScheduleFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-transitSchedule.xml.gz"/>
<param name="useTransit" value="true"/>
<param name="vehiclesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0-pre/input/berlin-v6.0-transitVehicles.xml.gz"/>
<param name="vehiclesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-transitVehicles.xml.gz"/>
</module>
<module name="facilities">
<param name="facilitiesSource" value="fromFile"/>
<param name="inputFacilitiesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0-pre/input/berlin-v6.0-facilities.xml.gz"/>
<param name="inputFacilitiesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-facilities.xml.gz"/>
</module>
<module name="planscalcroute">
<param name="networkModes" value="car,freight,ride"/>
Expand Down Expand Up @@ -108,25 +108,23 @@
<parameterset type="scoringParameters">
<param name="marginalUtilityOfMoney" value="1.0"/>
<!-- car prices 2012->2022: inflation (110.2-91.7)/91.7 = 0.2017448
Euro/day: 11.76*(1+0.2017448) = 14.13252
Euro/m: 0.000124*(1+0.2017448) = 0.00014901635 -->

<!-- 6 -> inflation adjusted -->
<!-- 6.0 -> inflation adjusted (2017->2022) -->
<param name="performing" value="6.88"/>

<parameterset type="modeParams">
<param name="constant" value="-0.0755500887608388" />
<!-- TODO: comment -->
<param name="constant" value="-0.6269580844054548" />
<!-- result of the calibration, lower than full vehicle ownership cost which gave too unattractive car mode in calibration -->
<param name="dailyMonetaryConstant" value="-3.0" />
<param name="dailyUtilityConstant" value="0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="0.0" />
<!-- TODO comment -->
<!-- only petrol price 2022, other cost components were excluded -->
<param name="monetaryDistanceRate" value="-1.49E-4" />
<param name="mode" value="car" />
</parameterset>
<parameterset type="modeParams">
<param name="constant" value="-1.9859492397945049" />
<param name="constant" value="-1.3788242711735" />
<param name="dailyMonetaryConstant" value="0.0" />
<param name="dailyUtilityConstant" value="0.0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
Expand All @@ -138,8 +136,8 @@
<param name="mode" value="ride" />
</parameterset>
<parameterset type="modeParams">
<param name="constant" value="-0.4241511885826721" />
<!-- 4-trips AB 10Euro -> 2.5 Eu/trip. yearly 761 Eu / 250 days = 3.04 Eu/day -->
<param name="constant" value="-0.24909103628514367" />
<!-- 2022: 4-trips AB 10Euro -> 2.5 Eu/trip. yearly 761 Eu / 250 days = 3.04 Eu/day -->
<param name="dailyMonetaryConstant" value="-3.0" />
<param name="dailyUtilityConstant" value="0.0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
Expand All @@ -148,7 +146,7 @@
<param name="mode" value="pt" />
</parameterset>
<parameterset type="modeParams">
<param name="constant" value="-2.3715451400624588" />
<param name="constant" value="-2.2321797854695955" />
<param name="dailyMonetaryConstant" value="0.0" />
<param name="dailyUtilityConstant" value="0.0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
Expand Down Expand Up @@ -178,7 +176,7 @@
</module>

<module name="counts">
<param name="inputCountsFile" value="./berlin-v6.0-counts-car-vmz.xml.gz"/>
<param name="inputCountsFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-counts-car-vmz.xml.gz"/>
</module>

<module name="ReplanningAnnealer" >
Expand Down
19 changes: 9 additions & 10 deletions src/main/java/org/matsim/prepare/population/AssignIncome.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,16 @@ public void run(Person person) {
double rndDouble = rnd.nextDouble();

if (rndDouble <= 0.1) income = 826.;
else if (rndDouble > 0.1 && rndDouble <= 0.2) income = 1142.;
else if (rndDouble > 0.2 && rndDouble <= 0.3) income = 1399.;
else if (rndDouble > 0.3 && rndDouble <= 0.4) income = 1630.;
else if (rndDouble > 0.4 && rndDouble <= 0.5) income = 1847.;
else if (rndDouble > 0.5 && rndDouble <= 0.6) income = 2070.;
else if (rndDouble > 0.6 && rndDouble <= 0.7) income = 2332.;
else if (rndDouble > 0.7 && rndDouble <= 0.8) income = 2659.;
else if (rndDouble > 0.8 && rndDouble <= 0.9) income = 3156.;
else if (rndDouble > 0.9) income = 4329.;
else if (rndDouble <= 0.2) income = 1142.;
else if (rndDouble <= 0.3) income = 1399.;
else if (rndDouble <= 0.4) income = 1630.;
else if (rndDouble <= 0.5) income = 1847.;
else if (rndDouble <= 0.6) income = 2070.;
else if (rndDouble <= 0.7) income = 2332.;
else if (rndDouble <= 0.8) income = 2659.;
else if (rndDouble <= 0.9) income = 3156.;
else {
throw new RuntimeException("Aborting..." + rndDouble);
income = 4329.;
}

PersonUtils.setIncome(person, income);
Expand Down

0 comments on commit 10edf0c

Please sign in to comment.