@Override public final void notifyShutdown(ShutdownEvent event) { writeData(event.getServices().getScenario(), event.getServices().getControlerIO()); }
@Override public void notifyShutdown(ShutdownEvent event) { if (event.isUnexpected()) { return; } LOG.info("Initializing accessibility computation..."); accessibilityAggregator = new AccessibilityAggregator(); accessibilityCalculator.addFacilityDataExchangeListener(accessibilityAggregator); if (outputDirectory != null) { File file = new File(outputDirectory); file.mkdirs(); } LOG.info("Start computing accessibilities."); accessibilityCalculator.computeAccessibilities(acg.getTimeOfDay(), opportunities); LOG.info("Finished computing accessibilities."); writeCSVFile(outputDirectory); }
/** * Notifies all ControlerListeners * @param unexpected Whether the shutdown is unexpected or not. */ public void fireControlerShutdownEvent(final boolean unexpected) { ShutdownEvent event = new ShutdownEvent(this.controler, unexpected); ShutdownListener[] listener = this.coreListenerList.getListeners(ShutdownListener.class); for (ShutdownListener aListener : listener) { log.info("calling notifyShutdown on " + aListener.getClass().getName()); aListener.notifyShutdown(event); } listener = this.listenerList.getListeners(ShutdownListener.class); for (ShutdownListener aListener : listener) { log.info("calling notifyShutdown on " + aListener.getClass().getName()); aListener.notifyShutdown(event); } log.info("all ControlerShutdownListeners called."); }
@Override public void notifyShutdown(ShutdownEvent event) { this.writeData(event.getServices().getScenario(), event.getServices().getControlerIO()); }
@Override public void notifyShutdown(ShutdownEvent event) { if ( event.isUnexpected() ) { return ; } dumpPlans(); dumpNetwork(); dumpConfig(); dumpFacilities(); dumpNetworkChangeEvents(); dumpTransitSchedule(); dumpTransitVehicles(); dumpVehicles(); dumpHouseholds(); dumpLanes(); dumpCounts(); if (!event.isUnexpected() && vspConfig.isWritingOutputEvents() && (controlerConfigGroup.getWriteEventsInterval()!=0)) { dumpOutputEvents(); } dumpExperiencedPlans() ; }
for (ControlerListener controlerListener : controlerListenersDeclaredByModules) { if (controlerListener instanceof ShutdownListener) { ((ShutdownListener) controlerListener).notifyShutdown(new ShutdownEvent(null, false));
@Override public void notifyShutdown(ShutdownEvent event) { // call shutdown for all remaining gexf for (SimpleGexfPStat gexf : this.lineId2GexfPStat.values()) { gexf.notifyShutdown(event.getServices().getConfig().controler().getLastIteration()); } log.info("terminated the last " + this.lineId2GexfPStat.values().size() + " gexf handlers..."); } }
@Override public void notifyShutdown(ShutdownEvent event) { if (event.isUnexpected()) { return;
@Override public void notifyShutdown(ShutdownEvent event) { if (this.getWriteGexfStatsInterval > 0) { this.write(event.getServices().getControlerIO().getOutputFilename(GexfPOperatorCount.FILENAME)); } }
@Override public void notifyShutdown(ShutdownEvent event) { if (this.getWriteGexfStatsInterval > 0) { this.write(event.getServices().getControlerIO().getOutputFilename(GexfPStatLight.FILENAME)); } }
@Override public void notifyShutdown(ShutdownEvent event) { if (this.getWriteGexfStatsInterval > 0) { this.write(event.getServices().getControlerIO().getOutputFilename(GexfPPaxCount.FILENAME)); } }
@Override public void notifyShutdown(ShutdownEvent event) { if (this.getWriteGexfStatsInterval > 0) { if (writeOperatorInDetail) { this.write(event.getServices().getControlerIO().getOutputFilename("pStat_detail.gexf.gz")); } else { this.write(event.getServices().getControlerIO().getOutputFilename(GexfPStat.FILENAME)); } } }
@Override public void notifyShutdown(ShutdownEvent event) { log.info("Entering notifyShutdown ..." ); // if(delegate.getIsComputingMode().isEmpty()) { if ( accessibilityCalculator.getModes().isEmpty() ) { log.error("No transport mode for accessibility calculation is activated! For this reason no accessibilities can be calculated!"); return; } // get the controller and scenario MatsimServices controler = event.getServices(); log.info("Computing and writing zone based accessibility measures ..." ); AccessibilityConfigGroup accessibilityConfig = ConfigUtils.addOrGetModule( controler.getScenario().getConfig(), AccessibilityConfigGroup.class); accessibilityCalculator.computeAccessibilities(accessibilityConfig.getTimeOfDay(), opportunities); }