Skip to content

Commit

Permalink
Merge pull request #126 from matsim-scenarios/6.x
Browse files Browse the repository at this point in the history
6.3
  • Loading branch information
rakow authored Jul 9, 2024
2 parents 9287fc3 + fe7b6f1 commit a45361c
Show file tree
Hide file tree
Showing 59 changed files with 2,921 additions and 1,517 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file.

### 6.3 (2024-07)
- Include additional trip analysis and updated dashboard
- Mode share is now analyzed by age, income, employment, economic_status
- Updated population, which now include reference modes for certain persons
- The reference modes represent modes that a person has actually used in reality
- Allows to evaluate the quality of the model in terms of mode choice
- ReplanningAnnealer module is now activated by default

### 6.2 (2024-06)
- Updated network and gtfs schedule
- Network is now based on late 2022 osm data
Expand Down
26 changes: 23 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


JAR := matsim-berlin-*.jar
V := v6.2
V := v6.3
CRS := EPSG:25832

p := input/$V
Expand Down Expand Up @@ -155,9 +155,17 @@ $p/berlin-static-$V-25pct.plans.xml.gz: $p/berlin-only-$V-25pct.plans.xml.gz $p/
$(sc) prepare lookup-regiostar --input $@ --output $@ --xls $(germany)/RegioStaR-Referenzdateien.xlsx


$p/berlin-activities-$V-25pct.plans.xml.gz: $p/berlin-static-$V-25pct.plans.xml.gz
$p/berlin-activities-$V-25pct.plans.xml.gz: $p/berlin-static-$V-25pct.plans.xml.gz $p/berlin-$V-facilities.xml.gz $p/berlin-$V-network.xml.gz
$(sc) prepare activity-sampling --seed 1 --input $< --output $@ --persons src/main/python/table-persons.csv --activities src/main/python/table-activities.csv

$(sc) prepare assign-reference-population --population $@ --output $@\
--persons src/main/python/table-persons.csv\
--activities src/main/python/table-activities.csv\
--shp $(germany)/../matsim-berlin/data/SrV/zones/zones.shp\
--shp-crs $(CRS)\
--facilities $(word 2,$^)\
--network $(word 3,$^)\

$p/berlin-initial-$V-25pct.plans.xml.gz: $p/berlin-activities-$V-25pct.plans.xml.gz $p/berlin-$V-facilities.xml.gz $p/berlin-$V-network.xml.gz
$(sc) prepare init-location-choice\
--input $<\
Expand Down Expand Up @@ -196,7 +204,7 @@ $p/commercialFacilities.xml.gz:
--landuseShapeFileName $(berlin)/input/shp/berlinBrandenburg_landuse_4326.shp\
--shapeFileLanduseTypeColumn "fclass"\
--shapeCRS "EPSG:4326"\
--pathToInvestigationAreaData $p/commercialTraffic/investigationAreaData.csv
--pathToInvestigationAreaData input/commercialTrafficAreaData.csv

$p/berlin-small-scale-commercialTraffic-$V-25pct.plans.xml.gz: $p/berlin-$V-network.xml.gz $p/commercialFacilities.xml.gz
$(sc) prepare generate-small-scale-commercial-traffic\
Expand Down Expand Up @@ -249,6 +257,15 @@ eval-opt: $p/berlin-initial-$V-25pct.experienced_plans.xml.gz
$(sc) run --mode "routeChoice" --iterations 20 --all-car --output "output/eval-$(ERROR_METRIC)" --25pct --population "berlin-$V-25pct.plans_$(ERROR_METRIC).xml.gz"\
--config $p/berlin-$V.config.xml

$p/berlin-$V-25pct.plans_cadyts.xml.gz:
$(sc) prepare extract-plans-idx\
--input output/cadyts/cadyts.output_plans.xml.gz\
--output $p/berlin-$V-25pct.plans_selection_cadyts.csv

$(sc) prepare select-plans-idx\
--input $p/berlin-cadyts-input-$V-25pct.plans.xml.gz\
--csv $p/berlin-$V-25pct.plans_selection_cadyts.csv\
--output $@

# These depend on the output of optimization runs
$p/berlin-$V-25pct.plans-initial.xml.gz: $p/berlin-$V-facilities.xml.gz $p/berlin-$V-network.xml.gz $p/berlin-longHaulFreight-$V-25pct.plans.xml.gz
Expand Down Expand Up @@ -300,5 +317,8 @@ prepare-calibration: $p/berlin-cadyts-input-$V-25pct.plans.xml.gz $p/berlin-$V-n
prepare-initial: $p/berlin-$V-25pct.plans-initial.xml.gz $p/berlin-$V-network-with-pt.xml.gz
echo "Done"

prepare-drt: $p/berlin-$V.drt-by-rndLocations-10000vehicles-4seats.xml.gz
echo "Done"

prepare: $p/berlin-$V-10pct.plans.xml.gz
echo "Done"
110 changes: 110 additions & 0 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,5 +251,115 @@
<property name="message" value="Trailing whitespace"/>
</module>

<!-- This forbids the var keyword, except for constructor, factory methods and in for loops -->
<module name="MatchXpath">
<property name="query"
value="//VARIABLE_DEF[./TYPE/IDENT[@text='var'] and not((./parent::FOR_INIT) or (./parent::FOR_EACH_CLAUSE) or (./ASSIGN/EXPR/LITERAL_NEW) or (./ASSIGN/EXPR/METHOD_CALL/DOT/IDENT[@text='now' or @text='create' or @text='valueOf' or starts-with(@text, 'of') or starts-with(@text, 'new')]) )]" />
<message key="matchxpath.match"
value="The 'var' keyword for local type inference is not allowed, except when using constructors or factory methods" />
</module>

<!-- Extension modules from sevntu.checkstyle -->

<!-- Coding -->
<module name="com.github.sevntu.checkstyle.checks.coding.CustomDeclarationOrderCheck">
<property name="customDeclarationOrder"
value="Field(public static) ### Field(private static) ### Field(public) ### Field(protected) ### Field(private) ### CTOR(.*) ### Method(public static .*) ### Method(.*) ### InnerEnum(.*) ### InnerInterface(.*) ### InnerClass(.*)" />
<property name="caseSensitive" value="true"/>
<property name="fieldPrefix" value=""/>
</module>
<module name="com.github.sevntu.checkstyle.checks.coding.ForbidReturnInFinallyBlockCheck"/>
<module name="com.github.sevntu.checkstyle.checks.coding.MultipleStringLiteralsExtendedCheck">
<property name="allowedDuplicates" value="7"/>
<property name="ignoreOccurrenceContext" value="ANNOTATION"/>
<property name="ignoreStringsRegexp" value="^&quot;&quot;$"/>
<property name="highlightAllDuplicates" value="false"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.coding.ReturnBooleanFromTernaryCheck"/>
<module name="com.github.sevntu.checkstyle.checks.coding.ForbidCertainImportsCheck"/>
<module name="com.github.sevntu.checkstyle.checks.coding.AvoidDefaultSerializableInInnerClassesCheck">
<property name="allowPartialImplementation" value="false"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.coding.OverridableMethodInConstructorCheck">
<property name="checkCloneMethod" value="false"/>
<property name="checkReadObjectMethod" value="false"/>
<property name="matchMethodsByArgCount" value="false"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.coding.AvoidHidingCauseExceptionCheck"/>
<module name="com.github.sevntu.checkstyle.checks.coding.ReturnCountExtendedCheck">
<property name="maxReturnCount" value="4"/>
<property name="ignoreMethodLinesCount" value="20"/>
<property name="minIgnoreReturnDepth" value="4"/>
<property name="ignoreEmptyReturns" value="true"/>
<property name="topLinesToIgnoreCount" value="10"/>
<property name="ignoreMethodsNames" value="equals"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.coding.SimpleAccessorNameNotationCheck"/>
<module name="com.github.sevntu.checkstyle.checks.coding.UnnecessaryParenthesesExtendedCheck">
<property name="ignoreCalculationOfBooleanVariables" value="false"/>
<property name="ignoreCalculationOfBooleanVariablesWithReturn" value="false"/>
<property name="ignoreCalculationOfBooleanVariablesWithAssert" value="false"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.coding.FinalizeImplementationCheck"/>
<module name="com.github.sevntu.checkstyle.checks.coding.ForbidThrowAnonymousExceptionsCheck">
<property name="exceptionClassNameRegex" value="^.*Exception"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.coding.MapIterationInForEachLoopCheck">
<property name="proposeValuesUsage" value="true"/>
<property name="proposeKeySetUsage" value="false"/>
<property name="proposeEntrySetUsage" value="false"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.coding.TernaryPerExpressionCountCheck">
<property name="maxTernaryPerExpressionCount" value="1"/>
<property name="ignoreTernaryOperatorsInBraces" value="true"/>
<property name="ignoreIsolatedTernaryOnLine" value="true"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.coding.RedundantReturnCheck">
<property name="allowReturnInEmptyMethodsAndConstructors" value="false"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.coding.DiamondOperatorForVariableDefinitionCheck"/>
<module name="com.github.sevntu.checkstyle.checks.coding.PreferMethodReferenceCheck"/>
<module name="com.github.sevntu.checkstyle.checks.coding.EmptyPublicCtorInClassCheck"/>
<module name="com.github.sevntu.checkstyle.checks.coding.UselessSuperCtorCallCheck"/>
<module name="com.github.sevntu.checkstyle.checks.coding.UselessSingleCatchCheck"/>

<!-- Design -->
<module name="com.github.sevntu.checkstyle.checks.design.ForbidWildcardAsReturnTypeCheck">
<property name="checkPublicMethods" value="true"/>
<property name="checkPackageMethods" value="true"/>
<property name="checkProtectedMethods" value="true"/>
<property name="checkPrivateMethods" value="false"/>
<property name="checkOverrideMethods" value="false"/>
<property name="checkDeprecatedMethods" value="false"/>
<property name="allowReturnWildcardWithSuper" value="false"/>
<property name="allowReturnWildcardWithExtends" value="false"/>
<property name="returnTypeClassNamesIgnoreRegex" value="^(Comparator|Comparable)$"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.design.NoMainMethodInAbstractClassCheck"/>
<module name="com.github.sevntu.checkstyle.checks.design.PublicReferenceToPrivateTypeCheck"/>
<module name="com.github.sevntu.checkstyle.checks.design.StaticMethodCandidateCheck">
<property name="skippedMethods"
value="readObject, writeObject, readObjectNoData, readResolve, writeReplace"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.design.ConstructorWithoutParamsCheck">
<property name="classNameFormat" value=".*Exception$"/>
<property name="ignoredClassNameFormat" value="UnsupportedOperationException"/>
</module>
<module name="com.github.sevntu.checkstyle.checks.design.InnerClassCheck"/>
<module name="com.github.sevntu.checkstyle.checks.design.HideUtilityClassConstructorCheck"/>
<module name="com.github.sevntu.checkstyle.checks.design.NestedSwitchCheck"/>
<module name="com.github.sevntu.checkstyle.checks.design.AvoidConditionInversionCheck"/>
<module name="com.github.sevntu.checkstyle.checks.design.CauseParameterInExceptionCheck"/>
<module name="com.github.sevntu.checkstyle.checks.design.CheckstyleTestMakeupCheck"/>

<module name="ForbidCertainMethodCheck">
<property name="methodName" value="assert(True|False)"/>
<property name="argumentCount" value="1"/>
</module>
<module name="ForbidCertainMethodCheck">
<property name="methodName" value="assertEquals"/>
<property name="argumentCount" value="2"/>
</module>

</module>
</module>
Loading

0 comments on commit a45361c

Please sign in to comment.