From 7a8ee0fcd1d041bfd81594c5841d9d58060554b6 Mon Sep 17 00:00:00 2001 From: rakow Date: Wed, 16 Oct 2024 10:10:55 +0200 Subject: [PATCH] use the new scenario cutout class --- Makefile | 11 +++++++---- .../java/org/matsim/prepare/FilterRelevantAgents.java | 1 + .../org/matsim/prepare/RunOpenBerlinCalibration.java | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8dc68683..fbc095c6 100644 --- a/Makefile +++ b/Makefile @@ -288,11 +288,14 @@ $p/berlin-$V-25pct.plans_cadyts.xml.gz: # 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 - $(sc) prepare filter-relevant-agents\ - --input $p/berlin-$V-25pct.plans_cadyts.xml.gz --output $@\ - --shp input/$V/area/area.shp\ + $(sc) prepare scenario-cutout\ + --population $p/berlin-$V-25pct.plans_cadyts.xml.gz\ --facilities $<\ - --network $(word 2,$^) + --network $(word 2,$^)\ + --output-population $@\ + --output-network $p/network-cutout.xml.gz\ + --output-facilities $p/facilities-cutout.xml.gz\ + --shp input/$V/area/area.shp\ $(sc) prepare split-activity-types-duration\ --exclude commercial_start,commercial_end,freight_start,freight_end\ diff --git a/src/main/java/org/matsim/prepare/FilterRelevantAgents.java b/src/main/java/org/matsim/prepare/FilterRelevantAgents.java index 42de3fb0..baa3bb05 100644 --- a/src/main/java/org/matsim/prepare/FilterRelevantAgents.java +++ b/src/main/java/org/matsim/prepare/FilterRelevantAgents.java @@ -45,6 +45,7 @@ name = "filter-relevant-agents", description = "Filter agents that have any activities or routes within the shp file." ) +@Deprecated public class FilterRelevantAgents implements MATSimAppCommand, PersonAlgorithm { private static final Logger log = LogManager.getLogger(FilterRelevantAgents.class); diff --git a/src/main/java/org/matsim/prepare/RunOpenBerlinCalibration.java b/src/main/java/org/matsim/prepare/RunOpenBerlinCalibration.java index 185d3d61..d68e4a84 100644 --- a/src/main/java/org/matsim/prepare/RunOpenBerlinCalibration.java +++ b/src/main/java/org/matsim/prepare/RunOpenBerlinCalibration.java @@ -19,6 +19,7 @@ import org.matsim.application.prepare.network.params.ApplyNetworkParams; import org.matsim.application.prepare.population.*; import org.matsim.application.prepare.pt.CreateTransitScheduleFromGtfs; +import org.matsim.application.prepare.scenario.CreateScenarioCutOut; import org.matsim.contrib.cadyts.car.CadytsCarModule; import org.matsim.contrib.cadyts.car.CadytsContext; import org.matsim.contrib.cadyts.general.CadytsScoring; @@ -86,7 +87,7 @@ CreateLandUseShp.class, CreateBerlinPopulation.class, CreateBrandenburgPopulation.class, MergePopulations.class, LookupRegioStaR.class, ExtractFacilityGeoPkg.class, DownSamplePopulation.class, DownloadCommuterStatistic.class, RunActitopp.class, CreateNetworkFromSumo.class, CreateTransitScheduleFromGtfs.class, - CleanNetwork.class, CreateMATSimFacilities.class, InitLocationChoice.class, FilterRelevantAgents.class, + CleanNetwork.class, CreateMATSimFacilities.class, InitLocationChoice.class, CreateScenarioCutOut.class, CreateCountsFromGeoPortalBerlin.class, CreateCountsFromVMZOld.class, CreateCountsFromVMZ.class, ReprojectNetwork.class, RunActivitySampling.class, MergePlans.class, SplitActivityTypesDuration.class, CleanPopulation.class, CleanAttributes.class, GenerateSmallScaleCommercialTrafficDemand.class, CreateDataDistributionOfStructureData.class,