diff --git a/production/application-sfbay/diffusion-and-rh2transit-base.conf b/production/application-sfbay/diffusion-and-rh2transit-base.conf new file mode 100644 index 00000000000..fcc7319eeb1 --- /dev/null +++ b/production/application-sfbay/diffusion-and-rh2transit-base.conf @@ -0,0 +1,535 @@ +# Note: this configuration will use paths relative to the project root (PWD) unless you override with these +# environment variables (use directories ending with slash): +# BEAM_OUTPUTS=/path/to/your/preferred/output/destination/ + +include "../common/akka.conf" +include "../common/metrics.conf" + +################################################################## +# SIMULATION +################################################################## +beam.basePackage = "beam" +beam.agentsim.simulationName = "diffusionBase" +beam.agentsim.numAgents = 413817 +#beam.agentsim.numAgents = 500 +beam.agentsim.schedulerParallelismWindow = 300 +beam.agentsim.thresholdForWalkingInMeters = 100 +# MODE CHOICE OPTIONS: +# ModeChoiceMultinomialLogit ModeChoiceTransitIfAvailable ModeChoiceDriveIfAvailable ModeChoiceRideHailIfAvailable +# ModeChoiceUniformRandom +beam.agentsim.agents.modalBehaviors.modeChoiceClass = "ModeChoiceMultinomialLogit" +beam.agentsim.agents.modalBehaviors.defaultValueOfTime = 18 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.cost = -1.0 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.time = -0.0047 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.transfer = -1.4 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.car_intercept = 1.0 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.walk_transit_intercept = -1.81 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.drive_transit_intercept = -2.11 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.ride_hail_transit_intercept = 2.44 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.ride_hail_intercept = 1.26 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.walk_intercept = -5.39 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.bike_intercept = 0.0 +beam.agentsim.agents.modalBehaviors.lccm.paramFile = ${beam.inputDirectory}"/lccm-long.csv" +#BeamVehicles Params +beam.agentsim.agents.vehicles.beamFuelTypesFile = ${beam.inputDirectory}"/samples/fuelTypes.csv" +beam.agentsim.agents.vehicles.beamVehicleTypesFile = ${beam.inputDirectory}"/samples/vehicleTypes.csv" +beam.agentsim.agents.vehicles.beamVehiclesFile = ${beam.inputDirectory}"/samples/vehicles.csv.gz" +# Use bikes? +beam.agentsim.agents.vehicles.bicycles.useBikes=false +#DrivingCostDefaults Params +beam.agentsim.agents.drivingCost.defaultLitersPerMeter = 0.0001069 +beam.agentsim.agents.drivingCost.defaultPricePerGallon = 3.115 +#TAZ params +beam.agentsim.taz.file=${beam.inputDirectory}"/taz-centers.csv" +beam.agentsim.taz.parking = ${beam.inputDirectory}"/taz-parking.csv" +# Scaling and Tuning Params +beam.agentsim.tuning.transitCapacity = 0.22080797450913886 +beam.agentsim.tuning.transitPrice = 1.0 +beam.agentsim.tuning.tollPrice = 1.0 +beam.agentsim.tuning.rideHailPrice = 1.0 +# Population Adjustmnet +beam.agentsim.populationAdjustment="DEFAULT_ADJUSTMENT" +# PhysSim Scaling Params +beam.physsim.flowCapacityFactor = 1.0 +beam.physsim.storageCapacityFactor = 1.0 +beam.physsim.writeEventsInterval = 0 +beam.physsim.writePlansInterval = 0 +beam.physsim.writeMATSimNetwork = false +beam.physsim.linkstatsWriteInterval = 1 +beam.physsim.linkstatsBinSize = 3600 +beam.physsim.ptSampleSize = 0.03 +beam.physsim.jdeqsim.agentSimPhysSimInterfaceDebugger.enabled = false +beam.physsim.skipPhysSim = false + + +################################################################## +# Warm Mode +################################################################## +beam.warmStart.enabled = false +#PATH TYPE OPTIONS: PARENT_RUN, ABSOLUTE_PATH +#PARENT_RUN: can be a director or zip archive of the output directory (e.g. like what get's stored on S3). We should also be able to specify a URL to an S3 output. +#ABSOLUTE_PATH: a directory that contains required warm stats files (e.g. linkstats and eventually a plans). +beam.warmStart.pathType = "PARENT_RUN" +beam.warmStart.path = "https://s3.us-east-2.amazonaws.com/beam-outputs/run149-base__2018-06-27_20-28-26_2a2e2bd3.zip" + +################################################################## +# RideHail +################################################################## +# Ride Hailing General Params +beam.agentsim.agents.rideHail.numDriversAsFractionOfPopulation=0.0241651 +beam.agentsim.agents.rideHail.defaultCostPerMile=1.25 +beam.agentsim.agents.rideHail.defaultCostPerMinute=0.75 +beam.agentsim.agents.rideHail.vehicleTypeId="BEV" +beam.agentsim.agents.rideHail.refuelThresholdInMeters=20000.0 +beam.agentsim.agents.rideHail.refuelLocationType="AtTAZCenter" +# SurgePricing parameters +beam.agentsim.agents.rideHail.surgePricing.surgeLevelAdaptionStep=0.1 +beam.agentsim.agents.rideHail.surgePricing.minimumSurgeLevel=0.1 + +# priceAdjustmentStrategy(KEEP_PRICE_LEVEL_FIXED_AT_ONE | CONTINUES_DEMAND_SUPPLY_MATCHING) +beam.agentsim.agents.rideHail.surgePricing.priceAdjustmentStrategy="KEEP_PRICE_LEVEL_FIXED_AT_ONE" + +beam.agentsim.agents.rideHail.rideHailManager.radiusInMeters=5000 + +# initialLocation(HOME | UNIFORM_RANDOM | ALL_AT_CENTER | ALL_IN_CORNER) +beam.agentsim.agents.rideHail.initialLocation.name="HOME" +beam.agentsim.agents.rideHail.initialLocation.home.radiusInMeters=10000 + +# allocationManager(DEFAULT_MANAGER | STANFORD_V1 | BUFFERED_IMPL_TEMPLATE | RANDOM_REPOSITIONING | REPOSITIONING_LOW_WAITING_TIMES | DUMMY_DISPATCH_WITH_BUFFERING) +beam.agentsim.agents.rideHail.allocationManager.name="REPOSITIONING_LOW_WAITING_TIMES" +beam.agentsim.agents.rideHail.allocationManager.timeoutInSeconds=300 +beam.agentsim.agents.rideHail.allocationManager.randomRepositioning.repositioningShare=0.2 + +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.repositionCircleRadisInMeters=3000.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minimumNumberOfIdlingVehiclesThreshholdForRepositioning=1 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.percentageOfVehiclesToReposition=0.01 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.timeWindowSizeInSecForDecidingAboutRepositioning=1200 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.allowIncreasingRadiusIfDemandInRadiusLow=true +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minDemandPercentageInRadius=0.1 +# repositioningMethod(TOP_SCORES | KMEANS) +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.repositioningMethod="TOP_SCORES" +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.keepMaxTopNScores=5 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minScoreThresholdForRepositioning=0.00001 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.distanceWeight=0.01 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.waitingTimeWeight=4.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.demandWeight=4.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.produceDebugImages=true + +beam.agentsim.agents.rideHail.iterationStats.timeBinSizeInSec=3600 + +################################################################## +# Calibration +################################################################## +beam.calibration.objectiveFunction = "ModeChoiceObjectiveFunction_AbsolutErrorWithPreferrenceForModeDiversity" +beam.calibration.mode.benchmarkFileLoc=${beam.inputDirectory}"/calibration/benchmark.csv" + +################################################################## +# Debugging +################################################################## +beam.debug.debugEnabled = false +beam.debug.skipOverBadActors = true +beam.debug.secondsToWaitForSkip = 30 + +beam.debug.stuckAgentDetection { + enabled = true + checkIntervalMs = "200ms" + thresholds = [ + { + triggerType = "beam.agentsim.agents.ridehail.RideHailManager$RideHailAllocationManagerTimeout" + markAsStuckAfterMs = "400s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$NotifyLegEndTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$ActivityEndTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.ridehail.RideHailManager$BufferedRideHailRequestsTimeout" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$StartLegTrigger" + markAsStuckAfterMs = "180s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$ActivityStartTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.InitializeTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$PersonDepartureTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$NotifyLegStartTrigger" + markAsStuckAfterMs = "210s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$EndLegTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$StartRefuelTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$EndRefuelTrigger" + markAsStuckAfterMs = "600s" + } + ] +} + +################################################################## +# Metrics +################################################################## +beam.metrics.level = "off" + +kamon { + trace { + level = simple-trace + } + + metric { + #tick-interval = 5 seconds + filters { + trace.includes = [ "**" ] + + akka-actor { + includes = [ "beam-actor-system/user/router/**", "beam-actor-system/user/worker-*" ] + excludes = [ "beam-actor-system/system/**", "beam-actor-system/user/worker-helper" ] + } + + akka-dispatcher { + includes = [ "beam-actor-system/akka.actor.default-dispatcher" ] + } + } + } + #statsd { + # hostname = 192.168.99.100 + # port = 8125 + #} + modules { + #kamon-log-reporter.auto-start = yes + # kamon-statsd.auto-start = yes + } +} + + +################################################################## +# OUTPUTS +################################################################## +# The baseOutputDirectory is the base directory where outputs will be written. The beam.agentsim.simulationName param will +# be used as the name of a sub-directory beneath the baseOutputDirectory for simulation results. +# If addTimestampToOutputDirectory == true, a timestamp will be added, e.g. "beamville_2017-12-18_16-48-57" +beam.outputs.baseOutputDirectory = ${PWD}"/output/application-sfbay" +beam.outputs.baseOutputDirectory = ${?BEAM_OUTPUT} +beam.outputs.addTimestampToOutputDirectory = true + +# To keep all logging params in one place, BEAM overrides MATSim params normally in the controller config module +beam.outputs.writePlansInterval = 1 +beam.outputs.writeEventsInterval = 1 + +# The remaining params customize how events are written to output files +beam.outputs.events.fileOutputFormats = "csv.gz" # valid options: xml(.gz) , csv(.gz), none - DEFAULT: csv.gz + +# Exploding events will break all event writers up into individual files by event type +beam.outputs.events.explodeIntoFiles = false + +# Events Writing Logging Levels: +# Any event types not explicitly listed in overrideWritingLevels take on defaultWritingLevel +beam.outputs.events.defaultWritingLevel = "OFF" # valid options:VERBOSE,REGULAR,SHORT,OFF +beam.outputs.events.overrideWritingLevels = "beam.agentsim.events.ModeChoiceEvent:VERBOSE, beam.agentsim.events.PathTraversalEvent:VERBOSE, org.matsim.api.core.v01.events.PersonEntersVehicleEvent:REGULAR, org.matsim.api.core.v01.events.PersonLeavesVehicleEvent:REGULAR" + +################################################################## +# SPATIAL +################################################################## +beam.spatial = { + localCRS = "epsg:26910" # what crs to use for distance calculations, must be in units of meters + boundingBoxBuffer = 10000 # meters of buffer around network for defining extend of spatial indices +} + +################################################################## +# BEAM ROUTING SERVICE +################################################################## +beam.routing { + routerClass = "beam.router.r5.R5RoutingWorker" + #Base local date in ISO 8061 YYYY-MM-DDTHH:MM:SS+HH:MM + baseDate = "2017-09-22T00:00:00-07:00" + transitOnStreetNetwork = true + r5 { + directory = ${beam.inputDirectory}"/r5-no-local" + # Departure window in min + departureWindow = 1.0167 + osmFile = ${beam.inputDirectory}"/r5-no-local/sf-bay.osm.pbf" + osmMapdbFile = ${beam.inputDirectory}"/r5-no-local/osm.mapdb" + mNetBuilder.fromCRS = "EPSG:4326" # WGS84 + mNetBuilder.toCRS = "EPSG:26910" # UTM10N + } + + # GTFS Downloader Params + gtfs { + operatorsFile = "src/main/resources/GTFSOperators.csv" + outputDir = ${beam.outputs.baseOutputDirectory}"/gtfs" + apiKey = ${?GTFS_API_KEY} + crs = "epsg:26910" + } +} + +################################################################## +# Akka +################################################################## +my-custom-mailbox { + mailbox-type = "akka.dispatch.UnboundedDequeBasedMailbox" +} + +router-dispatcher { + # Dispatcher is the name of the event-based dispatcher + type = Dispatcher + # What kind of ExecutionService to use + executor = "fork-join-executor" + # Configuration for the fork join pool + fork-join-executor { + # Min number of threads to cap factor-based parallelism number to + parallelism-min = 2 + # Parallelism (threads) ... ceil(available processors * factor) + parallelism-factor = 1.0 + # Max number of threads to cap factor-based parallelism number to + parallelism-max = 64 + } + # Throughput defines the maximum number of messages to be + # processed per actor before the thread jumps to the next actor. + # Set to 1 for as fair as possible. + throughput = 100 +} + +akka { + loggers = ["akka.event.slf4j.Slf4jLogger"] + logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" + log-dead-letters = 0 + actor { + serializers { + # java = "akka.serialization.JavaSerializer" + } + serialization-bindings { + # java = "java.lang.String" + } + debug { + # enable DEBUG logging of unhandled messages + unhandled = on + } + } + remote { + # If this is "on", Akka will log all outbound messages at DEBUG level, + # if off then they are not logged + log-sent-messages = on + } + deployment { + /router/router-worker { + dispatcher = router-dispatcher + } + } +} + +################################################################## +# MATSim Modules +################################################################## + +matsim.modules { + global { + randomSeed = 4711 + coordinateSystem = "epsg:26910" + } + counts { + countsScaleFactor = 10.355 + averageCountsOverIterations = 1 + writeCountsInterval = 1 + inputCountsFile = ${beam.inputDirectory}"/counts/fall_2015_tue_wed_thur_production_filtered.xml" + outputformat = "html,txt,xml" + } + network { + inputNetworkFile = ${beam.inputDirectory}"/physsim-network.xml" + } + plans { + inputPlansFile = ${beam.inputDirectory}"/samples/population.xml.gz" + inputPersonAttributesFile = ${beam.inputDirectory}"/samples/populationAttributes.xml.gz" + } + households { + inputFile = ${beam.inputDirectory}"/samples/households.xml.gz" + inputHouseholdAttributesFile = ${beam.inputDirectory}"/samples/householdAttributes.xml.gz" + } + vehicles { + vehiclesFile = ${beam.inputDirectory}"/samples/vehicles.xml.gz" + } + strategy { + maxAgentPlanMemorySize = 6 + planSelectorForRemoval="WorstPlanSelector" + + ModuleProbability_1 = 0.8 + Module_1 = "SelectExpBeta" + + ModuleProbability_3 = 0.1 + Module_3 = "ClearRoutes" + + ModuleProbability_4 = 0.1 + Module_4 = "ClearModes" + } + parallelEventHandling { + #Estimated number of events during mobsim run. An optional optimization hint for the framework. + estimatedNumberOfEvents = 10000 + #Number of threads for parallel events handler. 0 or null means the framework decides by itself. + numberOfThreads= 1 + #If enabled, each event handler is assigned to its own thread. Note that enabling this feature disabled the numberOfThreads option! This feature is still experimental! + oneThreadPerHandler = false + # If enabled, it is ensured that all events that are created during a time step of the mobility simulation are processed before the next time step is simulated. E.g. neccessary when within-day replanning is used. + synchronizeOnSimSteps = false + } + controler { + outputDirectory = ${beam.outputs.baseOutputDirectory}"/pt-tutorial" + firstIteration = 0 + lastIteration = 10 + eventsFileFormat = "xml" + overwriteFiles = "overwriteExistingFiles" + } + qsim { + #"start/endTime" of MobSim (00:00:00 == take earliest activity time/ run as long as active vehicles exist) --> + startTime="00:00:00" + endTime="30:00:00" + #00:00:00 means NO snapshot writing + snapshotperiod = "00:00:00" + } + transit { + useTransit = false + vehiclesFile = ${beam.inputDirectory}/"transitVehicles.xml" + transitModes = "pt" + } + changeMode { + modes="car,pt" + } + planCalcScore { + writeExperiencedPlans = true + learningRate = "1.0" + BrainExpBeta= "2.0" + lateArrival= "-18" + earlyDeparture = "-0" + performing = "6.0" + traveling="-6.0" + waiting="-0" + + parameterset = [ + { + type = "activityParams" + activityType = "Home" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "01:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Work" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "9:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Shopping" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "9:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Social" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "4:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Eatout" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "2:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "School" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "8:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Escort" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "00:30:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "University" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "08:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Other" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "02:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "modeParams" + mode = "car" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "walk" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "bike" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "ride_hailing" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "drive_transit" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "walk_transit" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + } + ] + } +} + + diff --git a/production/application-sfbay/diffusion-base-calib.conf b/production/application-sfbay/diffusion-base-calib.conf index 3a7261e9b94..fcc7319eeb1 100644 --- a/production/application-sfbay/diffusion-base-calib.conf +++ b/production/application-sfbay/diffusion-base-calib.conf @@ -9,7 +9,7 @@ include "../common/metrics.conf" # SIMULATION ################################################################## beam.basePackage = "beam" -beam.agentsim.simulationName = "diffusionAV" +beam.agentsim.simulationName = "diffusionBase" beam.agentsim.numAgents = 413817 #beam.agentsim.numAgents = 500 beam.agentsim.schedulerParallelismWindow = 300 diff --git a/production/application-sfbay/rh2transit-max.conf b/production/application-sfbay/rh2transit-max.conf new file mode 100644 index 00000000000..6ee44033df3 --- /dev/null +++ b/production/application-sfbay/rh2transit-max.conf @@ -0,0 +1,535 @@ +# Note: this configuration will use paths relative to the project root (PWD) unless you override with these +# environment variables (use directories ending with slash): +# BEAM_OUTPUTS=/path/to/your/preferred/output/destination/ + +include "../common/akka.conf" +include "../common/metrics.conf" + +################################################################## +# SIMULATION +################################################################## +beam.basePackage = "beam" +beam.agentsim.simulationName = "RH2Transit_Max" +beam.agentsim.numAgents = 413817 +#beam.agentsim.numAgents = 500 +beam.agentsim.schedulerParallelismWindow = 300 +beam.agentsim.thresholdForWalkingInMeters = 100 +# MODE CHOICE OPTIONS: +# ModeChoiceMultinomialLogit ModeChoiceTransitIfAvailable ModeChoiceDriveIfAvailable ModeChoiceRideHailIfAvailable +# ModeChoiceUniformRandom +beam.agentsim.agents.modalBehaviors.modeChoiceClass = "ModeChoiceMultinomialLogit" +beam.agentsim.agents.modalBehaviors.defaultValueOfTime = 18 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.cost = -1.0 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.time = -0.0047 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.transfer = -1.4 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.car_intercept = 1.0 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.walk_transit_intercept = -1.81 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.drive_transit_intercept = -2.11 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.ride_hail_transit_intercept = 1000 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.ride_hail_intercept = 1.26 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.walk_intercept = -5.39 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.bike_intercept = 0.0 +beam.agentsim.agents.modalBehaviors.lccm.paramFile = ${beam.inputDirectory}"/lccm-long.csv" +#BeamVehicles Params +beam.agentsim.agents.vehicles.beamFuelTypesFile = ${beam.inputDirectory}"/samples/fuelTypes.csv" +beam.agentsim.agents.vehicles.beamVehicleTypesFile = ${beam.inputDirectory}"/samples/vehicleTypes.csv" +beam.agentsim.agents.vehicles.beamVehiclesFile = ${beam.inputDirectory}"/samples/vehicles.csv.gz" +# Use bikes? +beam.agentsim.agents.vehicles.bicycles.useBikes=false +#DrivingCostDefaults Params +beam.agentsim.agents.drivingCost.defaultLitersPerMeter = 0.0001069 +beam.agentsim.agents.drivingCost.defaultPricePerGallon = 3.115 +#TAZ params +beam.agentsim.taz.file=${beam.inputDirectory}"/taz-centers.csv" +beam.agentsim.taz.parking = ${beam.inputDirectory}"/taz-parking.csv" +# Scaling and Tuning Params +beam.agentsim.tuning.transitCapacity = 0.22080797450913886 +beam.agentsim.tuning.transitPrice = 1.0 +beam.agentsim.tuning.tollPrice = 1.0 +beam.agentsim.tuning.rideHailPrice = 1.0 +# Population Adjustmnet +beam.agentsim.populationAdjustment="DEFAULT_ADJUSTMENT" +# PhysSim Scaling Params +beam.physsim.flowCapacityFactor = 1.0 +beam.physsim.storageCapacityFactor = 1.0 +beam.physsim.writeEventsInterval = 0 +beam.physsim.writePlansInterval = 0 +beam.physsim.writeMATSimNetwork = false +beam.physsim.linkstatsWriteInterval = 1 +beam.physsim.linkstatsBinSize = 3600 +beam.physsim.ptSampleSize = 0.03 +beam.physsim.jdeqsim.agentSimPhysSimInterfaceDebugger.enabled = false +beam.physsim.skipPhysSim = false + + +################################################################## +# Warm Mode +################################################################## +beam.warmStart.enabled = false +#PATH TYPE OPTIONS: PARENT_RUN, ABSOLUTE_PATH +#PARENT_RUN: can be a director or zip archive of the output directory (e.g. like what get's stored on S3). We should also be able to specify a URL to an S3 output. +#ABSOLUTE_PATH: a directory that contains required warm stats files (e.g. linkstats and eventually a plans). +beam.warmStart.pathType = "PARENT_RUN" +beam.warmStart.path = "https://s3.us-east-2.amazonaws.com/beam-outputs/run149-base__2018-06-27_20-28-26_2a2e2bd3.zip" + +################################################################## +# RideHail +################################################################## +# Ride Hailing General Params +beam.agentsim.agents.rideHail.numDriversAsFractionOfPopulation=0.0241651 +beam.agentsim.agents.rideHail.defaultCostPerMile=1.25 +beam.agentsim.agents.rideHail.defaultCostPerMinute=0.75 +beam.agentsim.agents.rideHail.vehicleTypeId="BEV" +beam.agentsim.agents.rideHail.refuelThresholdInMeters=20000.0 +beam.agentsim.agents.rideHail.refuelLocationType="AtTAZCenter" +# SurgePricing parameters +beam.agentsim.agents.rideHail.surgePricing.surgeLevelAdaptionStep=0.1 +beam.agentsim.agents.rideHail.surgePricing.minimumSurgeLevel=0.1 + +# priceAdjustmentStrategy(KEEP_PRICE_LEVEL_FIXED_AT_ONE | CONTINUES_DEMAND_SUPPLY_MATCHING) +beam.agentsim.agents.rideHail.surgePricing.priceAdjustmentStrategy="KEEP_PRICE_LEVEL_FIXED_AT_ONE" + +beam.agentsim.agents.rideHail.rideHailManager.radiusInMeters=5000 + +# initialLocation(HOME | UNIFORM_RANDOM | ALL_AT_CENTER | ALL_IN_CORNER) +beam.agentsim.agents.rideHail.initialLocation.name="HOME" +beam.agentsim.agents.rideHail.initialLocation.home.radiusInMeters=10000 + +# allocationManager(DEFAULT_MANAGER | STANFORD_V1 | BUFFERED_IMPL_TEMPLATE | RANDOM_REPOSITIONING | REPOSITIONING_LOW_WAITING_TIMES | DUMMY_DISPATCH_WITH_BUFFERING) +beam.agentsim.agents.rideHail.allocationManager.name="REPOSITIONING_LOW_WAITING_TIMES" +beam.agentsim.agents.rideHail.allocationManager.timeoutInSeconds=300 +beam.agentsim.agents.rideHail.allocationManager.randomRepositioning.repositioningShare=0.2 + +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.repositionCircleRadisInMeters=3000.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minimumNumberOfIdlingVehiclesThreshholdForRepositioning=1 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.percentageOfVehiclesToReposition=0.01 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.timeWindowSizeInSecForDecidingAboutRepositioning=1200 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.allowIncreasingRadiusIfDemandInRadiusLow=true +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minDemandPercentageInRadius=0.1 +# repositioningMethod(TOP_SCORES | KMEANS) +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.repositioningMethod="TOP_SCORES" +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.keepMaxTopNScores=5 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minScoreThresholdForRepositioning=0.00001 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.distanceWeight=0.01 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.waitingTimeWeight=4.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.demandWeight=4.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.produceDebugImages=true + +beam.agentsim.agents.rideHail.iterationStats.timeBinSizeInSec=3600 + +################################################################## +# Calibration +################################################################## +beam.calibration.objectiveFunction = "ModeChoiceObjectiveFunction_AbsolutErrorWithPreferrenceForModeDiversity" +beam.calibration.mode.benchmarkFileLoc=${beam.inputDirectory}"/calibration/benchmark.csv" + +################################################################## +# Debugging +################################################################## +beam.debug.debugEnabled = false +beam.debug.skipOverBadActors = true +beam.debug.secondsToWaitForSkip = 30 + +beam.debug.stuckAgentDetection { + enabled = true + checkIntervalMs = "200ms" + thresholds = [ + { + triggerType = "beam.agentsim.agents.ridehail.RideHailManager$RideHailAllocationManagerTimeout" + markAsStuckAfterMs = "400s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$NotifyLegEndTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$ActivityEndTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.ridehail.RideHailManager$BufferedRideHailRequestsTimeout" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$StartLegTrigger" + markAsStuckAfterMs = "180s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$ActivityStartTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.InitializeTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$PersonDepartureTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$NotifyLegStartTrigger" + markAsStuckAfterMs = "210s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$EndLegTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$StartRefuelTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$EndRefuelTrigger" + markAsStuckAfterMs = "600s" + } + ] +} + +################################################################## +# Metrics +################################################################## +beam.metrics.level = "off" + +kamon { + trace { + level = simple-trace + } + + metric { + #tick-interval = 5 seconds + filters { + trace.includes = [ "**" ] + + akka-actor { + includes = [ "beam-actor-system/user/router/**", "beam-actor-system/user/worker-*" ] + excludes = [ "beam-actor-system/system/**", "beam-actor-system/user/worker-helper" ] + } + + akka-dispatcher { + includes = [ "beam-actor-system/akka.actor.default-dispatcher" ] + } + } + } + #statsd { + # hostname = 192.168.99.100 + # port = 8125 + #} + modules { + #kamon-log-reporter.auto-start = yes + # kamon-statsd.auto-start = yes + } +} + + +################################################################## +# OUTPUTS +################################################################## +# The baseOutputDirectory is the base directory where outputs will be written. The beam.agentsim.simulationName param will +# be used as the name of a sub-directory beneath the baseOutputDirectory for simulation results. +# If addTimestampToOutputDirectory == true, a timestamp will be added, e.g. "beamville_2017-12-18_16-48-57" +beam.outputs.baseOutputDirectory = ${PWD}"/output/application-sfbay" +beam.outputs.baseOutputDirectory = ${?BEAM_OUTPUT} +beam.outputs.addTimestampToOutputDirectory = true + +# To keep all logging params in one place, BEAM overrides MATSim params normally in the controller config module +beam.outputs.writePlansInterval = 1 +beam.outputs.writeEventsInterval = 1 + +# The remaining params customize how events are written to output files +beam.outputs.events.fileOutputFormats = "csv.gz" # valid options: xml(.gz) , csv(.gz), none - DEFAULT: csv.gz + +# Exploding events will break all event writers up into individual files by event type +beam.outputs.events.explodeIntoFiles = false + +# Events Writing Logging Levels: +# Any event types not explicitly listed in overrideWritingLevels take on defaultWritingLevel +beam.outputs.events.defaultWritingLevel = "OFF" # valid options:VERBOSE,REGULAR,SHORT,OFF +beam.outputs.events.overrideWritingLevels = "beam.agentsim.events.ModeChoiceEvent:VERBOSE, beam.agentsim.events.PathTraversalEvent:VERBOSE, org.matsim.api.core.v01.events.PersonEntersVehicleEvent:REGULAR, org.matsim.api.core.v01.events.PersonLeavesVehicleEvent:REGULAR" + +################################################################## +# SPATIAL +################################################################## +beam.spatial = { + localCRS = "epsg:26910" # what crs to use for distance calculations, must be in units of meters + boundingBoxBuffer = 10000 # meters of buffer around network for defining extend of spatial indices +} + +################################################################## +# BEAM ROUTING SERVICE +################################################################## +beam.routing { + routerClass = "beam.router.r5.R5RoutingWorker" + #Base local date in ISO 8061 YYYY-MM-DDTHH:MM:SS+HH:MM + baseDate = "2017-09-22T00:00:00-07:00" + transitOnStreetNetwork = true + r5 { + directory = ${beam.inputDirectory}"/r5-no-local" + # Departure window in min + departureWindow = 1.0167 + osmFile = ${beam.inputDirectory}"/r5-no-local/sf-bay.osm.pbf" + osmMapdbFile = ${beam.inputDirectory}"/r5-no-local/osm.mapdb" + mNetBuilder.fromCRS = "EPSG:4326" # WGS84 + mNetBuilder.toCRS = "EPSG:26910" # UTM10N + } + + # GTFS Downloader Params + gtfs { + operatorsFile = "src/main/resources/GTFSOperators.csv" + outputDir = ${beam.outputs.baseOutputDirectory}"/gtfs" + apiKey = ${?GTFS_API_KEY} + crs = "epsg:26910" + } +} + +################################################################## +# Akka +################################################################## +my-custom-mailbox { + mailbox-type = "akka.dispatch.UnboundedDequeBasedMailbox" +} + +router-dispatcher { + # Dispatcher is the name of the event-based dispatcher + type = Dispatcher + # What kind of ExecutionService to use + executor = "fork-join-executor" + # Configuration for the fork join pool + fork-join-executor { + # Min number of threads to cap factor-based parallelism number to + parallelism-min = 2 + # Parallelism (threads) ... ceil(available processors * factor) + parallelism-factor = 1.0 + # Max number of threads to cap factor-based parallelism number to + parallelism-max = 64 + } + # Throughput defines the maximum number of messages to be + # processed per actor before the thread jumps to the next actor. + # Set to 1 for as fair as possible. + throughput = 100 +} + +akka { + loggers = ["akka.event.slf4j.Slf4jLogger"] + logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" + log-dead-letters = 0 + actor { + serializers { + # java = "akka.serialization.JavaSerializer" + } + serialization-bindings { + # java = "java.lang.String" + } + debug { + # enable DEBUG logging of unhandled messages + unhandled = on + } + } + remote { + # If this is "on", Akka will log all outbound messages at DEBUG level, + # if off then they are not logged + log-sent-messages = on + } + deployment { + /router/router-worker { + dispatcher = router-dispatcher + } + } +} + +################################################################## +# MATSim Modules +################################################################## + +matsim.modules { + global { + randomSeed = 4711 + coordinateSystem = "epsg:26910" + } + counts { + countsScaleFactor = 10.355 + averageCountsOverIterations = 1 + writeCountsInterval = 1 + inputCountsFile = ${beam.inputDirectory}"/counts/fall_2015_tue_wed_thur_production_filtered.xml" + outputformat = "html,txt,xml" + } + network { + inputNetworkFile = ${beam.inputDirectory}"/physsim-network.xml" + } + plans { + inputPlansFile = ${beam.inputDirectory}"/samples/population.xml.gz" + inputPersonAttributesFile = ${beam.inputDirectory}"/samples/populationAttributes.xml.gz" + } + households { + inputFile = ${beam.inputDirectory}"/samples/households.xml.gz" + inputHouseholdAttributesFile = ${beam.inputDirectory}"/samples/householdAttributes.xml.gz" + } + vehicles { + vehiclesFile = ${beam.inputDirectory}"/samples/vehicles.xml.gz" + } + strategy { + maxAgentPlanMemorySize = 6 + planSelectorForRemoval="WorstPlanSelector" + + ModuleProbability_1 = 0.8 + Module_1 = "SelectExpBeta" + + ModuleProbability_3 = 0.1 + Module_3 = "ClearRoutes" + + ModuleProbability_4 = 0.1 + Module_4 = "ClearModes" + } + parallelEventHandling { + #Estimated number of events during mobsim run. An optional optimization hint for the framework. + estimatedNumberOfEvents = 10000 + #Number of threads for parallel events handler. 0 or null means the framework decides by itself. + numberOfThreads= 1 + #If enabled, each event handler is assigned to its own thread. Note that enabling this feature disabled the numberOfThreads option! This feature is still experimental! + oneThreadPerHandler = false + # If enabled, it is ensured that all events that are created during a time step of the mobility simulation are processed before the next time step is simulated. E.g. neccessary when within-day replanning is used. + synchronizeOnSimSteps = false + } + controler { + outputDirectory = ${beam.outputs.baseOutputDirectory}"/pt-tutorial" + firstIteration = 0 + lastIteration = 10 + eventsFileFormat = "xml" + overwriteFiles = "overwriteExistingFiles" + } + qsim { + #"start/endTime" of MobSim (00:00:00 == take earliest activity time/ run as long as active vehicles exist) --> + startTime="00:00:00" + endTime="30:00:00" + #00:00:00 means NO snapshot writing + snapshotperiod = "00:00:00" + } + transit { + useTransit = false + vehiclesFile = ${beam.inputDirectory}/"transitVehicles.xml" + transitModes = "pt" + } + changeMode { + modes="car,pt" + } + planCalcScore { + writeExperiencedPlans = true + learningRate = "1.0" + BrainExpBeta= "2.0" + lateArrival= "-18" + earlyDeparture = "-0" + performing = "6.0" + traveling="-6.0" + waiting="-0" + + parameterset = [ + { + type = "activityParams" + activityType = "Home" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "01:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Work" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "9:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Shopping" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "9:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Social" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "4:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Eatout" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "2:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "School" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "8:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Escort" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "00:30:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "University" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "08:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Other" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "02:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "modeParams" + mode = "car" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "walk" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "bike" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "ride_hailing" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "drive_transit" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "walk_transit" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + } + ] + } +} + + diff --git a/production/application-sfbay/rh2transit-off.conf b/production/application-sfbay/rh2transit-off.conf new file mode 100644 index 00000000000..1844f2e997f --- /dev/null +++ b/production/application-sfbay/rh2transit-off.conf @@ -0,0 +1,535 @@ +# Note: this configuration will use paths relative to the project root (PWD) unless you override with these +# environment variables (use directories ending with slash): +# BEAM_OUTPUTS=/path/to/your/preferred/output/destination/ + +include "../common/akka.conf" +include "../common/metrics.conf" + +################################################################## +# SIMULATION +################################################################## +beam.basePackage = "beam" +beam.agentsim.simulationName = "RH2Transit_Off" +beam.agentsim.numAgents = 413817 +#beam.agentsim.numAgents = 500 +beam.agentsim.schedulerParallelismWindow = 300 +beam.agentsim.thresholdForWalkingInMeters = 100 +# MODE CHOICE OPTIONS: +# ModeChoiceMultinomialLogit ModeChoiceTransitIfAvailable ModeChoiceDriveIfAvailable ModeChoiceRideHailIfAvailable +# ModeChoiceUniformRandom +beam.agentsim.agents.modalBehaviors.modeChoiceClass = "ModeChoiceMultinomialLogit" +beam.agentsim.agents.modalBehaviors.defaultValueOfTime = 18 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.cost = -1.0 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.time = -0.0047 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.transfer = -1.4 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.car_intercept = 1.0 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.walk_transit_intercept = -1.81 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.drive_transit_intercept = -2.11 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.ride_hail_transit_intercept = -1000 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.ride_hail_intercept = 1.26 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.walk_intercept = -5.39 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.bike_intercept = 0.0 +beam.agentsim.agents.modalBehaviors.lccm.paramFile = ${beam.inputDirectory}"/lccm-long.csv" +#BeamVehicles Params +beam.agentsim.agents.vehicles.beamFuelTypesFile = ${beam.inputDirectory}"/samples/fuelTypes.csv" +beam.agentsim.agents.vehicles.beamVehicleTypesFile = ${beam.inputDirectory}"/samples/vehicleTypes.csv" +beam.agentsim.agents.vehicles.beamVehiclesFile = ${beam.inputDirectory}"/samples/vehicles.csv.gz" +# Use bikes? +beam.agentsim.agents.vehicles.bicycles.useBikes=false +#DrivingCostDefaults Params +beam.agentsim.agents.drivingCost.defaultLitersPerMeter = 0.0001069 +beam.agentsim.agents.drivingCost.defaultPricePerGallon = 3.115 +#TAZ params +beam.agentsim.taz.file=${beam.inputDirectory}"/taz-centers.csv" +beam.agentsim.taz.parking = ${beam.inputDirectory}"/taz-parking.csv" +# Scaling and Tuning Params +beam.agentsim.tuning.transitCapacity = 0.22080797450913886 +beam.agentsim.tuning.transitPrice = 1.0 +beam.agentsim.tuning.tollPrice = 1.0 +beam.agentsim.tuning.rideHailPrice = 1.0 +# Population Adjustmnet +beam.agentsim.populationAdjustment="DEFAULT_ADJUSTMENT" +# PhysSim Scaling Params +beam.physsim.flowCapacityFactor = 1.0 +beam.physsim.storageCapacityFactor = 1.0 +beam.physsim.writeEventsInterval = 0 +beam.physsim.writePlansInterval = 0 +beam.physsim.writeMATSimNetwork = false +beam.physsim.linkstatsWriteInterval = 1 +beam.physsim.linkstatsBinSize = 3600 +beam.physsim.ptSampleSize = 0.03 +beam.physsim.jdeqsim.agentSimPhysSimInterfaceDebugger.enabled = false +beam.physsim.skipPhysSim = false + + +################################################################## +# Warm Mode +################################################################## +beam.warmStart.enabled = false +#PATH TYPE OPTIONS: PARENT_RUN, ABSOLUTE_PATH +#PARENT_RUN: can be a director or zip archive of the output directory (e.g. like what get's stored on S3). We should also be able to specify a URL to an S3 output. +#ABSOLUTE_PATH: a directory that contains required warm stats files (e.g. linkstats and eventually a plans). +beam.warmStart.pathType = "PARENT_RUN" +beam.warmStart.path = "https://s3.us-east-2.amazonaws.com/beam-outputs/run149-base__2018-06-27_20-28-26_2a2e2bd3.zip" + +################################################################## +# RideHail +################################################################## +# Ride Hailing General Params +beam.agentsim.agents.rideHail.numDriversAsFractionOfPopulation=0.0241651 +beam.agentsim.agents.rideHail.defaultCostPerMile=1.25 +beam.agentsim.agents.rideHail.defaultCostPerMinute=0.75 +beam.agentsim.agents.rideHail.vehicleTypeId="BEV" +beam.agentsim.agents.rideHail.refuelThresholdInMeters=20000.0 +beam.agentsim.agents.rideHail.refuelLocationType="AtTAZCenter" +# SurgePricing parameters +beam.agentsim.agents.rideHail.surgePricing.surgeLevelAdaptionStep=0.1 +beam.agentsim.agents.rideHail.surgePricing.minimumSurgeLevel=0.1 + +# priceAdjustmentStrategy(KEEP_PRICE_LEVEL_FIXED_AT_ONE | CONTINUES_DEMAND_SUPPLY_MATCHING) +beam.agentsim.agents.rideHail.surgePricing.priceAdjustmentStrategy="KEEP_PRICE_LEVEL_FIXED_AT_ONE" + +beam.agentsim.agents.rideHail.rideHailManager.radiusInMeters=5000 + +# initialLocation(HOME | UNIFORM_RANDOM | ALL_AT_CENTER | ALL_IN_CORNER) +beam.agentsim.agents.rideHail.initialLocation.name="HOME" +beam.agentsim.agents.rideHail.initialLocation.home.radiusInMeters=10000 + +# allocationManager(DEFAULT_MANAGER | STANFORD_V1 | BUFFERED_IMPL_TEMPLATE | RANDOM_REPOSITIONING | REPOSITIONING_LOW_WAITING_TIMES | DUMMY_DISPATCH_WITH_BUFFERING) +beam.agentsim.agents.rideHail.allocationManager.name="REPOSITIONING_LOW_WAITING_TIMES" +beam.agentsim.agents.rideHail.allocationManager.timeoutInSeconds=300 +beam.agentsim.agents.rideHail.allocationManager.randomRepositioning.repositioningShare=0.2 + +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.repositionCircleRadisInMeters=3000.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minimumNumberOfIdlingVehiclesThreshholdForRepositioning=1 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.percentageOfVehiclesToReposition=0.01 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.timeWindowSizeInSecForDecidingAboutRepositioning=1200 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.allowIncreasingRadiusIfDemandInRadiusLow=true +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minDemandPercentageInRadius=0.1 +# repositioningMethod(TOP_SCORES | KMEANS) +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.repositioningMethod="TOP_SCORES" +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.keepMaxTopNScores=5 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minScoreThresholdForRepositioning=0.00001 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.distanceWeight=0.01 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.waitingTimeWeight=4.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.demandWeight=4.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.produceDebugImages=true + +beam.agentsim.agents.rideHail.iterationStats.timeBinSizeInSec=3600 + +################################################################## +# Calibration +################################################################## +beam.calibration.objectiveFunction = "ModeChoiceObjectiveFunction_AbsolutErrorWithPreferrenceForModeDiversity" +beam.calibration.mode.benchmarkFileLoc=${beam.inputDirectory}"/calibration/benchmark.csv" + +################################################################## +# Debugging +################################################################## +beam.debug.debugEnabled = false +beam.debug.skipOverBadActors = true +beam.debug.secondsToWaitForSkip = 30 + +beam.debug.stuckAgentDetection { + enabled = true + checkIntervalMs = "200ms" + thresholds = [ + { + triggerType = "beam.agentsim.agents.ridehail.RideHailManager$RideHailAllocationManagerTimeout" + markAsStuckAfterMs = "400s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$NotifyLegEndTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$ActivityEndTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.ridehail.RideHailManager$BufferedRideHailRequestsTimeout" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$StartLegTrigger" + markAsStuckAfterMs = "180s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$ActivityStartTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.InitializeTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$PersonDepartureTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$NotifyLegStartTrigger" + markAsStuckAfterMs = "210s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$EndLegTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$StartRefuelTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$EndRefuelTrigger" + markAsStuckAfterMs = "600s" + } + ] +} + +################################################################## +# Metrics +################################################################## +beam.metrics.level = "off" + +kamon { + trace { + level = simple-trace + } + + metric { + #tick-interval = 5 seconds + filters { + trace.includes = [ "**" ] + + akka-actor { + includes = [ "beam-actor-system/user/router/**", "beam-actor-system/user/worker-*" ] + excludes = [ "beam-actor-system/system/**", "beam-actor-system/user/worker-helper" ] + } + + akka-dispatcher { + includes = [ "beam-actor-system/akka.actor.default-dispatcher" ] + } + } + } + #statsd { + # hostname = 192.168.99.100 + # port = 8125 + #} + modules { + #kamon-log-reporter.auto-start = yes + # kamon-statsd.auto-start = yes + } +} + + +################################################################## +# OUTPUTS +################################################################## +# The baseOutputDirectory is the base directory where outputs will be written. The beam.agentsim.simulationName param will +# be used as the name of a sub-directory beneath the baseOutputDirectory for simulation results. +# If addTimestampToOutputDirectory == true, a timestamp will be added, e.g. "beamville_2017-12-18_16-48-57" +beam.outputs.baseOutputDirectory = ${PWD}"/output/application-sfbay" +beam.outputs.baseOutputDirectory = ${?BEAM_OUTPUT} +beam.outputs.addTimestampToOutputDirectory = true + +# To keep all logging params in one place, BEAM overrides MATSim params normally in the controller config module +beam.outputs.writePlansInterval = 1 +beam.outputs.writeEventsInterval = 1 + +# The remaining params customize how events are written to output files +beam.outputs.events.fileOutputFormats = "csv.gz" # valid options: xml(.gz) , csv(.gz), none - DEFAULT: csv.gz + +# Exploding events will break all event writers up into individual files by event type +beam.outputs.events.explodeIntoFiles = false + +# Events Writing Logging Levels: +# Any event types not explicitly listed in overrideWritingLevels take on defaultWritingLevel +beam.outputs.events.defaultWritingLevel = "OFF" # valid options:VERBOSE,REGULAR,SHORT,OFF +beam.outputs.events.overrideWritingLevels = "beam.agentsim.events.ModeChoiceEvent:VERBOSE, beam.agentsim.events.PathTraversalEvent:VERBOSE, org.matsim.api.core.v01.events.PersonEntersVehicleEvent:REGULAR, org.matsim.api.core.v01.events.PersonLeavesVehicleEvent:REGULAR" + +################################################################## +# SPATIAL +################################################################## +beam.spatial = { + localCRS = "epsg:26910" # what crs to use for distance calculations, must be in units of meters + boundingBoxBuffer = 10000 # meters of buffer around network for defining extend of spatial indices +} + +################################################################## +# BEAM ROUTING SERVICE +################################################################## +beam.routing { + routerClass = "beam.router.r5.R5RoutingWorker" + #Base local date in ISO 8061 YYYY-MM-DDTHH:MM:SS+HH:MM + baseDate = "2017-09-22T00:00:00-07:00" + transitOnStreetNetwork = true + r5 { + directory = ${beam.inputDirectory}"/r5-no-local" + # Departure window in min + departureWindow = 1.0167 + osmFile = ${beam.inputDirectory}"/r5-no-local/sf-bay.osm.pbf" + osmMapdbFile = ${beam.inputDirectory}"/r5-no-local/osm.mapdb" + mNetBuilder.fromCRS = "EPSG:4326" # WGS84 + mNetBuilder.toCRS = "EPSG:26910" # UTM10N + } + + # GTFS Downloader Params + gtfs { + operatorsFile = "src/main/resources/GTFSOperators.csv" + outputDir = ${beam.outputs.baseOutputDirectory}"/gtfs" + apiKey = ${?GTFS_API_KEY} + crs = "epsg:26910" + } +} + +################################################################## +# Akka +################################################################## +my-custom-mailbox { + mailbox-type = "akka.dispatch.UnboundedDequeBasedMailbox" +} + +router-dispatcher { + # Dispatcher is the name of the event-based dispatcher + type = Dispatcher + # What kind of ExecutionService to use + executor = "fork-join-executor" + # Configuration for the fork join pool + fork-join-executor { + # Min number of threads to cap factor-based parallelism number to + parallelism-min = 2 + # Parallelism (threads) ... ceil(available processors * factor) + parallelism-factor = 1.0 + # Max number of threads to cap factor-based parallelism number to + parallelism-max = 64 + } + # Throughput defines the maximum number of messages to be + # processed per actor before the thread jumps to the next actor. + # Set to 1 for as fair as possible. + throughput = 100 +} + +akka { + loggers = ["akka.event.slf4j.Slf4jLogger"] + logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" + log-dead-letters = 0 + actor { + serializers { + # java = "akka.serialization.JavaSerializer" + } + serialization-bindings { + # java = "java.lang.String" + } + debug { + # enable DEBUG logging of unhandled messages + unhandled = on + } + } + remote { + # If this is "on", Akka will log all outbound messages at DEBUG level, + # if off then they are not logged + log-sent-messages = on + } + deployment { + /router/router-worker { + dispatcher = router-dispatcher + } + } +} + +################################################################## +# MATSim Modules +################################################################## + +matsim.modules { + global { + randomSeed = 4711 + coordinateSystem = "epsg:26910" + } + counts { + countsScaleFactor = 10.355 + averageCountsOverIterations = 1 + writeCountsInterval = 1 + inputCountsFile = ${beam.inputDirectory}"/counts/fall_2015_tue_wed_thur_production_filtered.xml" + outputformat = "html,txt,xml" + } + network { + inputNetworkFile = ${beam.inputDirectory}"/physsim-network.xml" + } + plans { + inputPlansFile = ${beam.inputDirectory}"/samples/population.xml.gz" + inputPersonAttributesFile = ${beam.inputDirectory}"/samples/populationAttributes.xml.gz" + } + households { + inputFile = ${beam.inputDirectory}"/samples/households.xml.gz" + inputHouseholdAttributesFile = ${beam.inputDirectory}"/samples/householdAttributes.xml.gz" + } + vehicles { + vehiclesFile = ${beam.inputDirectory}"/samples/vehicles.xml.gz" + } + strategy { + maxAgentPlanMemorySize = 6 + planSelectorForRemoval="WorstPlanSelector" + + ModuleProbability_1 = 0.8 + Module_1 = "SelectExpBeta" + + ModuleProbability_3 = 0.1 + Module_3 = "ClearRoutes" + + ModuleProbability_4 = 0.1 + Module_4 = "ClearModes" + } + parallelEventHandling { + #Estimated number of events during mobsim run. An optional optimization hint for the framework. + estimatedNumberOfEvents = 10000 + #Number of threads for parallel events handler. 0 or null means the framework decides by itself. + numberOfThreads= 1 + #If enabled, each event handler is assigned to its own thread. Note that enabling this feature disabled the numberOfThreads option! This feature is still experimental! + oneThreadPerHandler = false + # If enabled, it is ensured that all events that are created during a time step of the mobility simulation are processed before the next time step is simulated. E.g. neccessary when within-day replanning is used. + synchronizeOnSimSteps = false + } + controler { + outputDirectory = ${beam.outputs.baseOutputDirectory}"/pt-tutorial" + firstIteration = 0 + lastIteration = 10 + eventsFileFormat = "xml" + overwriteFiles = "overwriteExistingFiles" + } + qsim { + #"start/endTime" of MobSim (00:00:00 == take earliest activity time/ run as long as active vehicles exist) --> + startTime="00:00:00" + endTime="30:00:00" + #00:00:00 means NO snapshot writing + snapshotperiod = "00:00:00" + } + transit { + useTransit = false + vehiclesFile = ${beam.inputDirectory}/"transitVehicles.xml" + transitModes = "pt" + } + changeMode { + modes="car,pt" + } + planCalcScore { + writeExperiencedPlans = true + learningRate = "1.0" + BrainExpBeta= "2.0" + lateArrival= "-18" + earlyDeparture = "-0" + performing = "6.0" + traveling="-6.0" + waiting="-0" + + parameterset = [ + { + type = "activityParams" + activityType = "Home" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "01:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Work" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "9:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Shopping" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "9:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Social" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "4:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Eatout" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "2:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "School" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "8:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Escort" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "00:30:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "University" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "08:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Other" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "02:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "modeParams" + mode = "car" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "walk" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "bike" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "ride_hailing" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "drive_transit" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "walk_transit" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + } + ] + } +} + + diff --git a/production/application-sfbay/rh2transit-plus10.conf b/production/application-sfbay/rh2transit-plus10.conf new file mode 100644 index 00000000000..bbe3d7e25f0 --- /dev/null +++ b/production/application-sfbay/rh2transit-plus10.conf @@ -0,0 +1,535 @@ +# Note: this configuration will use paths relative to the project root (PWD) unless you override with these +# environment variables (use directories ending with slash): +# BEAM_OUTPUTS=/path/to/your/preferred/output/destination/ + +include "../common/akka.conf" +include "../common/metrics.conf" + +################################################################## +# SIMULATION +################################################################## +beam.basePackage = "beam" +beam.agentsim.simulationName = "RH2Transit_Plus10" +beam.agentsim.numAgents = 413817 +#beam.agentsim.numAgents = 500 +beam.agentsim.schedulerParallelismWindow = 300 +beam.agentsim.thresholdForWalkingInMeters = 100 +# MODE CHOICE OPTIONS: +# ModeChoiceMultinomialLogit ModeChoiceTransitIfAvailable ModeChoiceDriveIfAvailable ModeChoiceRideHailIfAvailable +# ModeChoiceUniformRandom +beam.agentsim.agents.modalBehaviors.modeChoiceClass = "ModeChoiceMultinomialLogit" +beam.agentsim.agents.modalBehaviors.defaultValueOfTime = 18 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.cost = -1.0 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.time = -0.0047 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.transfer = -1.4 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.car_intercept = 1.0 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.walk_transit_intercept = -1.81 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.drive_transit_intercept = -2.11 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.ride_hail_transit_intercept = 12.44 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.ride_hail_intercept = 1.26 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.walk_intercept = -5.39 +beam.agentsim.agents.modalBehaviors.mulitnomialLogit.params.bike_intercept = 0.0 +beam.agentsim.agents.modalBehaviors.lccm.paramFile = ${beam.inputDirectory}"/lccm-long.csv" +#BeamVehicles Params +beam.agentsim.agents.vehicles.beamFuelTypesFile = ${beam.inputDirectory}"/samples/fuelTypes.csv" +beam.agentsim.agents.vehicles.beamVehicleTypesFile = ${beam.inputDirectory}"/samples/vehicleTypes.csv" +beam.agentsim.agents.vehicles.beamVehiclesFile = ${beam.inputDirectory}"/samples/vehicles.csv.gz" +# Use bikes? +beam.agentsim.agents.vehicles.bicycles.useBikes=false +#DrivingCostDefaults Params +beam.agentsim.agents.drivingCost.defaultLitersPerMeter = 0.0001069 +beam.agentsim.agents.drivingCost.defaultPricePerGallon = 3.115 +#TAZ params +beam.agentsim.taz.file=${beam.inputDirectory}"/taz-centers.csv" +beam.agentsim.taz.parking = ${beam.inputDirectory}"/taz-parking.csv" +# Scaling and Tuning Params +beam.agentsim.tuning.transitCapacity = 0.22080797450913886 +beam.agentsim.tuning.transitPrice = 1.0 +beam.agentsim.tuning.tollPrice = 1.0 +beam.agentsim.tuning.rideHailPrice = 1.0 +# Population Adjustmnet +beam.agentsim.populationAdjustment="DEFAULT_ADJUSTMENT" +# PhysSim Scaling Params +beam.physsim.flowCapacityFactor = 1.0 +beam.physsim.storageCapacityFactor = 1.0 +beam.physsim.writeEventsInterval = 0 +beam.physsim.writePlansInterval = 0 +beam.physsim.writeMATSimNetwork = false +beam.physsim.linkstatsWriteInterval = 1 +beam.physsim.linkstatsBinSize = 3600 +beam.physsim.ptSampleSize = 0.03 +beam.physsim.jdeqsim.agentSimPhysSimInterfaceDebugger.enabled = false +beam.physsim.skipPhysSim = false + + +################################################################## +# Warm Mode +################################################################## +beam.warmStart.enabled = false +#PATH TYPE OPTIONS: PARENT_RUN, ABSOLUTE_PATH +#PARENT_RUN: can be a director or zip archive of the output directory (e.g. like what get's stored on S3). We should also be able to specify a URL to an S3 output. +#ABSOLUTE_PATH: a directory that contains required warm stats files (e.g. linkstats and eventually a plans). +beam.warmStart.pathType = "PARENT_RUN" +beam.warmStart.path = "https://s3.us-east-2.amazonaws.com/beam-outputs/run149-base__2018-06-27_20-28-26_2a2e2bd3.zip" + +################################################################## +# RideHail +################################################################## +# Ride Hailing General Params +beam.agentsim.agents.rideHail.numDriversAsFractionOfPopulation=0.0241651 +beam.agentsim.agents.rideHail.defaultCostPerMile=1.25 +beam.agentsim.agents.rideHail.defaultCostPerMinute=0.75 +beam.agentsim.agents.rideHail.vehicleTypeId="BEV" +beam.agentsim.agents.rideHail.refuelThresholdInMeters=20000.0 +beam.agentsim.agents.rideHail.refuelLocationType="AtTAZCenter" +# SurgePricing parameters +beam.agentsim.agents.rideHail.surgePricing.surgeLevelAdaptionStep=0.1 +beam.agentsim.agents.rideHail.surgePricing.minimumSurgeLevel=0.1 + +# priceAdjustmentStrategy(KEEP_PRICE_LEVEL_FIXED_AT_ONE | CONTINUES_DEMAND_SUPPLY_MATCHING) +beam.agentsim.agents.rideHail.surgePricing.priceAdjustmentStrategy="KEEP_PRICE_LEVEL_FIXED_AT_ONE" + +beam.agentsim.agents.rideHail.rideHailManager.radiusInMeters=5000 + +# initialLocation(HOME | UNIFORM_RANDOM | ALL_AT_CENTER | ALL_IN_CORNER) +beam.agentsim.agents.rideHail.initialLocation.name="HOME" +beam.agentsim.agents.rideHail.initialLocation.home.radiusInMeters=10000 + +# allocationManager(DEFAULT_MANAGER | STANFORD_V1 | BUFFERED_IMPL_TEMPLATE | RANDOM_REPOSITIONING | REPOSITIONING_LOW_WAITING_TIMES | DUMMY_DISPATCH_WITH_BUFFERING) +beam.agentsim.agents.rideHail.allocationManager.name="REPOSITIONING_LOW_WAITING_TIMES" +beam.agentsim.agents.rideHail.allocationManager.timeoutInSeconds=300 +beam.agentsim.agents.rideHail.allocationManager.randomRepositioning.repositioningShare=0.2 + +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.repositionCircleRadisInMeters=3000.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minimumNumberOfIdlingVehiclesThreshholdForRepositioning=1 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.percentageOfVehiclesToReposition=0.01 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.timeWindowSizeInSecForDecidingAboutRepositioning=1200 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.allowIncreasingRadiusIfDemandInRadiusLow=true +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minDemandPercentageInRadius=0.1 +# repositioningMethod(TOP_SCORES | KMEANS) +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.repositioningMethod="TOP_SCORES" +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.keepMaxTopNScores=5 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.minScoreThresholdForRepositioning=0.00001 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.distanceWeight=0.01 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.waitingTimeWeight=4.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.demandWeight=4.0 +beam.agentsim.agents.rideHail.allocationManager.repositionLowWaitingTimes.produceDebugImages=true + +beam.agentsim.agents.rideHail.iterationStats.timeBinSizeInSec=3600 + +################################################################## +# Calibration +################################################################## +beam.calibration.objectiveFunction = "ModeChoiceObjectiveFunction_AbsolutErrorWithPreferrenceForModeDiversity" +beam.calibration.mode.benchmarkFileLoc=${beam.inputDirectory}"/calibration/benchmark.csv" + +################################################################## +# Debugging +################################################################## +beam.debug.debugEnabled = false +beam.debug.skipOverBadActors = true +beam.debug.secondsToWaitForSkip = 30 + +beam.debug.stuckAgentDetection { + enabled = true + checkIntervalMs = "200ms" + thresholds = [ + { + triggerType = "beam.agentsim.agents.ridehail.RideHailManager$RideHailAllocationManagerTimeout" + markAsStuckAfterMs = "400s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$NotifyLegEndTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$ActivityEndTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.ridehail.RideHailManager$BufferedRideHailRequestsTimeout" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$StartLegTrigger" + markAsStuckAfterMs = "180s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$ActivityStartTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.InitializeTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.PersonAgent$PersonDepartureTrigger" + markAsStuckAfterMs = "200s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$NotifyLegStartTrigger" + markAsStuckAfterMs = "210s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$EndLegTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$StartRefuelTrigger" + markAsStuckAfterMs = "600s" + }, + { + triggerType = "beam.agentsim.agents.modalbehaviors.DrivesVehicle$EndRefuelTrigger" + markAsStuckAfterMs = "600s" + } + ] +} + +################################################################## +# Metrics +################################################################## +beam.metrics.level = "off" + +kamon { + trace { + level = simple-trace + } + + metric { + #tick-interval = 5 seconds + filters { + trace.includes = [ "**" ] + + akka-actor { + includes = [ "beam-actor-system/user/router/**", "beam-actor-system/user/worker-*" ] + excludes = [ "beam-actor-system/system/**", "beam-actor-system/user/worker-helper" ] + } + + akka-dispatcher { + includes = [ "beam-actor-system/akka.actor.default-dispatcher" ] + } + } + } + #statsd { + # hostname = 192.168.99.100 + # port = 8125 + #} + modules { + #kamon-log-reporter.auto-start = yes + # kamon-statsd.auto-start = yes + } +} + + +################################################################## +# OUTPUTS +################################################################## +# The baseOutputDirectory is the base directory where outputs will be written. The beam.agentsim.simulationName param will +# be used as the name of a sub-directory beneath the baseOutputDirectory for simulation results. +# If addTimestampToOutputDirectory == true, a timestamp will be added, e.g. "beamville_2017-12-18_16-48-57" +beam.outputs.baseOutputDirectory = ${PWD}"/output/application-sfbay" +beam.outputs.baseOutputDirectory = ${?BEAM_OUTPUT} +beam.outputs.addTimestampToOutputDirectory = true + +# To keep all logging params in one place, BEAM overrides MATSim params normally in the controller config module +beam.outputs.writePlansInterval = 1 +beam.outputs.writeEventsInterval = 1 + +# The remaining params customize how events are written to output files +beam.outputs.events.fileOutputFormats = "csv.gz" # valid options: xml(.gz) , csv(.gz), none - DEFAULT: csv.gz + +# Exploding events will break all event writers up into individual files by event type +beam.outputs.events.explodeIntoFiles = false + +# Events Writing Logging Levels: +# Any event types not explicitly listed in overrideWritingLevels take on defaultWritingLevel +beam.outputs.events.defaultWritingLevel = "OFF" # valid options:VERBOSE,REGULAR,SHORT,OFF +beam.outputs.events.overrideWritingLevels = "beam.agentsim.events.ModeChoiceEvent:VERBOSE, beam.agentsim.events.PathTraversalEvent:VERBOSE, org.matsim.api.core.v01.events.PersonEntersVehicleEvent:REGULAR, org.matsim.api.core.v01.events.PersonLeavesVehicleEvent:REGULAR" + +################################################################## +# SPATIAL +################################################################## +beam.spatial = { + localCRS = "epsg:26910" # what crs to use for distance calculations, must be in units of meters + boundingBoxBuffer = 10000 # meters of buffer around network for defining extend of spatial indices +} + +################################################################## +# BEAM ROUTING SERVICE +################################################################## +beam.routing { + routerClass = "beam.router.r5.R5RoutingWorker" + #Base local date in ISO 8061 YYYY-MM-DDTHH:MM:SS+HH:MM + baseDate = "2017-09-22T00:00:00-07:00" + transitOnStreetNetwork = true + r5 { + directory = ${beam.inputDirectory}"/r5-no-local" + # Departure window in min + departureWindow = 1.0167 + osmFile = ${beam.inputDirectory}"/r5-no-local/sf-bay.osm.pbf" + osmMapdbFile = ${beam.inputDirectory}"/r5-no-local/osm.mapdb" + mNetBuilder.fromCRS = "EPSG:4326" # WGS84 + mNetBuilder.toCRS = "EPSG:26910" # UTM10N + } + + # GTFS Downloader Params + gtfs { + operatorsFile = "src/main/resources/GTFSOperators.csv" + outputDir = ${beam.outputs.baseOutputDirectory}"/gtfs" + apiKey = ${?GTFS_API_KEY} + crs = "epsg:26910" + } +} + +################################################################## +# Akka +################################################################## +my-custom-mailbox { + mailbox-type = "akka.dispatch.UnboundedDequeBasedMailbox" +} + +router-dispatcher { + # Dispatcher is the name of the event-based dispatcher + type = Dispatcher + # What kind of ExecutionService to use + executor = "fork-join-executor" + # Configuration for the fork join pool + fork-join-executor { + # Min number of threads to cap factor-based parallelism number to + parallelism-min = 2 + # Parallelism (threads) ... ceil(available processors * factor) + parallelism-factor = 1.0 + # Max number of threads to cap factor-based parallelism number to + parallelism-max = 64 + } + # Throughput defines the maximum number of messages to be + # processed per actor before the thread jumps to the next actor. + # Set to 1 for as fair as possible. + throughput = 100 +} + +akka { + loggers = ["akka.event.slf4j.Slf4jLogger"] + logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" + log-dead-letters = 0 + actor { + serializers { + # java = "akka.serialization.JavaSerializer" + } + serialization-bindings { + # java = "java.lang.String" + } + debug { + # enable DEBUG logging of unhandled messages + unhandled = on + } + } + remote { + # If this is "on", Akka will log all outbound messages at DEBUG level, + # if off then they are not logged + log-sent-messages = on + } + deployment { + /router/router-worker { + dispatcher = router-dispatcher + } + } +} + +################################################################## +# MATSim Modules +################################################################## + +matsim.modules { + global { + randomSeed = 4711 + coordinateSystem = "epsg:26910" + } + counts { + countsScaleFactor = 10.355 + averageCountsOverIterations = 1 + writeCountsInterval = 1 + inputCountsFile = ${beam.inputDirectory}"/counts/fall_2015_tue_wed_thur_production_filtered.xml" + outputformat = "html,txt,xml" + } + network { + inputNetworkFile = ${beam.inputDirectory}"/physsim-network.xml" + } + plans { + inputPlansFile = ${beam.inputDirectory}"/samples/population.xml.gz" + inputPersonAttributesFile = ${beam.inputDirectory}"/samples/populationAttributes.xml.gz" + } + households { + inputFile = ${beam.inputDirectory}"/samples/households.xml.gz" + inputHouseholdAttributesFile = ${beam.inputDirectory}"/samples/householdAttributes.xml.gz" + } + vehicles { + vehiclesFile = ${beam.inputDirectory}"/samples/vehicles.xml.gz" + } + strategy { + maxAgentPlanMemorySize = 6 + planSelectorForRemoval="WorstPlanSelector" + + ModuleProbability_1 = 0.8 + Module_1 = "SelectExpBeta" + + ModuleProbability_3 = 0.1 + Module_3 = "ClearRoutes" + + ModuleProbability_4 = 0.1 + Module_4 = "ClearModes" + } + parallelEventHandling { + #Estimated number of events during mobsim run. An optional optimization hint for the framework. + estimatedNumberOfEvents = 10000 + #Number of threads for parallel events handler. 0 or null means the framework decides by itself. + numberOfThreads= 1 + #If enabled, each event handler is assigned to its own thread. Note that enabling this feature disabled the numberOfThreads option! This feature is still experimental! + oneThreadPerHandler = false + # If enabled, it is ensured that all events that are created during a time step of the mobility simulation are processed before the next time step is simulated. E.g. neccessary when within-day replanning is used. + synchronizeOnSimSteps = false + } + controler { + outputDirectory = ${beam.outputs.baseOutputDirectory}"/pt-tutorial" + firstIteration = 0 + lastIteration = 10 + eventsFileFormat = "xml" + overwriteFiles = "overwriteExistingFiles" + } + qsim { + #"start/endTime" of MobSim (00:00:00 == take earliest activity time/ run as long as active vehicles exist) --> + startTime="00:00:00" + endTime="30:00:00" + #00:00:00 means NO snapshot writing + snapshotperiod = "00:00:00" + } + transit { + useTransit = false + vehiclesFile = ${beam.inputDirectory}/"transitVehicles.xml" + transitModes = "pt" + } + changeMode { + modes="car,pt" + } + planCalcScore { + writeExperiencedPlans = true + learningRate = "1.0" + BrainExpBeta= "2.0" + lateArrival= "-18" + earlyDeparture = "-0" + performing = "6.0" + traveling="-6.0" + waiting="-0" + + parameterset = [ + { + type = "activityParams" + activityType = "Home" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "01:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Work" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "9:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Shopping" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "9:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Social" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "4:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Eatout" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "2:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "School" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "8:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Escort" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "00:30:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "University" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "08:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "activityParams" + activityType = "Other" + priority = 1.0 + scoringThisActivityAtAll = true + typicalDuration = "02:00:00" + typicalDurationScoreComputation = "uniform" + }, { + type = "modeParams" + mode = "car" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "walk" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "bike" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "ride_hailing" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "drive_transit" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + }, { + type = "modeParams" + mode = "walk_transit" + constant = 0.0 + marginalUtilityOfDistance_util_m = 0.0 + marginalUtilityOfTraveling_util_hr = -6.0 + monetaryDistanceRate = 0.0 + } + ] + } +} + +