storageCapacity = this.length * this.effectiveNumberOfLanes / context.effectiveCellSize * context.qsimConfig.getStorageCapFactor() ;
public SnapshotGenerator(final Network network, final double snapshotPeriod, final QSimConfigGroup config) { this.network = network; int initialCapacity = (int)(network.getLinks().size()*1.1); this.eventLinks = new HashMap<>(initialCapacity, 0.95f); this.linkList = new ArrayList<>(initialCapacity); this.eventAgents = new HashMap<>(1000, 0.95f); this.snapshotPeriod = snapshotPeriod; this.capCorrectionFactor = config.getFlowCapFactor() / network.getCapacityPeriod(); this.storageCapFactor = config.getStorageCapFactor(); this.snapshotStyle = config.getSnapshotStyle(); if (! Double.isNaN( config.getLinkWidthForVis() )){ this.linkWidthCalculator.setLinkWidthForVis( config.getLinkWidthForVis() ); } if (! Double.isNaN(network.getEffectiveLaneWidth())){ this.linkWidthCalculator.setLaneWidth(network.getEffectiveLaneWidth()); } reset(-1); }
@Inject public DownstreamSensor(LinkSensorManager sensorManager, Scenario scenario) { this.sensorManager = sensorManager; this.network = scenario.getNetwork(); this.lanes = scenario.getLanes(); this.carSize = scenario.getConfig().jdeqSim().getCarSize(); this.storageCapacityFactor = scenario.getConfig().qsim().getStorageCapFactor(); this.signalsData = (SignalsData) scenario.getScenarioElement(SignalsData.ELEMENT_NAME); init(); }
@Override public void checkConsistency(Config config) { new DvrpConfigConsistencyChecker().checkConsistency(config); if (config.network().isTimeVariantNetwork() && config.network().getChangeEventsInputFile() == null) { log.warn("No change events provided for the time variant network"); } if (!config.network().isTimeVariantNetwork() && config.network().getChangeEventsInputFile() != null) { log.warn("Change events ignored, because the network is not time variant"); } if (config.qsim().getFlowCapFactor() < 100) { log.warn("FlowCapFactor should be large enough (e.g. 100) to obtain deterministic (fixed) travel times"); } if (config.qsim().getStorageCapFactor() < 100) { log.warn("StorageCapFactor should be large enough (e.g. 100) to obtain deterministic (fixed) travel times"); } if (config.network().isTimeVariantNetwork() && DvrpConfigGroup.get(config).getNetworkMode() != null) { throw new RuntimeException("The current version of RunTaxiBenchmark does not support this case: " + "@Named(DvrpModule.DVRP_ROUTING) Network would consist of links having " + "VariableIntervalTimeVariantAttributes instead of FixedIntervalTimeVariantAttributes."); } } }