public SignalsScenarioWriter(final OutputDirectoryHierarchy controlerIo){ this.pathToSignalSystemsOutputFilename = controlerIo.getOutputFilename(FILENAME_SIGNAL_SYSTEMS); this.pathToSignalGroupsOutputFilename = controlerIo.getOutputFilename(FILENAME_SIGNAL_GROUPS); this.pathToSignalControlOutputFilename = controlerIo.getOutputFilename(FILENAME_SIGNAL_CONTROL); this.pathToAmberTimesOutputFilename = controlerIo.getOutputFilename(FILENAME_AMBER_TIMES); this.pathToIntergreenTimesOutputFilename = controlerIo.getOutputFilename(FILENAME_INTERGREEN_TIMES); this.pathToSignalCSVOutputFilename = controlerIo.getOutputFilename(FILENAME_SIGNAL_CSV); this.pathToConflictingDirectionsOutputFilename = controlerIo.getOutputFilename(FILENAME_CONFLICTING_DIRECTIONS); }
@Inject TravelDistanceStats(ControlerConfigGroup controlerConfigGroup, GlobalConfigGroup globalConfigGroup, OutputDirectoryHierarchy controlerIO) { this(controlerConfigGroup, globalConfigGroup, controlerIO.getOutputFilename(Controler.FILENAME_TRAVELDISTANCESTATS), controlerConfigGroup.isCreateGraphs()); }
private void dumpOutputEvents() { try { File toFile = new File( controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_EVENTS_XML)); File fromFile = new File(controlerIO.getIterationFilename(controlerConfigGroup.getLastIteration(), Controler.FILENAME_EVENTS_XML)); try { Files.copy(fromFile.toPath(), toFile.toPath(),StandardCopyOption.REPLACE_EXISTING,StandardCopyOption.COPY_ATTRIBUTES); } catch (IOException e) { throw new UncheckedIOException(e); } } catch ( Exception ee ) { Logger.getLogger(this.getClass()).error("writing output events did not work; probably parameters were such that no events were " + "generated in the final iteration" ); } }
private void dumpHouseholds() { try { new HouseholdsWriterV10(households).writeFile(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_HOUSEHOLDS)); } catch ( Exception ee ) { log.error("Exception writing households.", ee); } }
private void dumpLanes() { try { new LanesWriter(lanes).write(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_LANES)); } catch ( Exception ee ) { log.error("Exception writing lanes.", ee); } }
private void dumpVehicles() { try { new VehicleWriterV1(vehicles).writeFile(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_VEHICLES)); } catch ( Exception ee ) { log.error("Exception writing vehicles.", ee); } }
private void dumpTransitVehicles() { try { if ( transitVehicles != null ) { new VehicleWriterV1(transitVehicles).writeFile(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_TRANSIT_VEHICLES)); } } catch ( Exception ee ) { log.error("Exception writing transit vehicles.", ee); } }
private void dumpJointPlans() { JointPlansXmlWriter.write( scenario.getPopulation(), jointPlans, controlerIO.getOutputFilename( "output_jointPlans.xml.gz" ) ); } }
@Override public void notifyShutdown(ShutdownEvent event) { String filename = this.controlerIO.getOutputFilename("output_toll.xml.gz") ; new RoadPricingWriterXMLv1(this.scheme).writeFile(filename); }
private void dumpNetwork() { // dump network new NetworkWriter(network).write(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_NETWORK)); }
private void dumpConfig() { // dump config new ConfigWriter(config).write(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_CONFIG)); new ConfigWriter(config, ConfigWriter.Verbosity.minimal).write(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_CONFIG_REDUCED)); }
@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(GexfPOperatorCount.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)); } } }
private void dumpFacilities() { // dump facilities try { final String inputCRS = config.facilities().getInputCRS(); final String internalCRS = config.global().getCoordinateSystem(); new FacilitiesWriter(activityFacilities).write(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_FACILITIES)); } catch ( Exception ee ) { log.error("Exception writing facilities.", ee); } }
private void dumpPlans() { // dump plans final PopulationWriter writer = new PopulationWriter(population, network); writer.putAttributeConverters( attributeConverters ); writer.write(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_POPULATION)); final ObjectAttributes personAttributes = population.getPersonAttributes(); if ( personAttributes!=null ) { ObjectAttributesXmlWriter attributesXmlWriter = new ObjectAttributesXmlWriter(personAttributes) ; attributesXmlWriter.setPrettyPrint(true); attributesXmlWriter.putAttributeConverters( attributeConverters ); attributesXmlWriter.writeFile( controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_PERSON_ATTRIBUTES ) ); } }
private void dumpTransitSchedule() { try { if ( transitSchedule != null ) { final String inputCRS = config.transit().getInputScheduleCRS(); final String internalCRS = config.global().getCoordinateSystem(); new TransitScheduleWriter(transitSchedule).writeFile(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_TRANSIT_SCHEDULE)); } } catch ( Exception ee ) { log.error("Exception writing transit schedule.", ee); } }
private void dumpNetworkChangeEvents() { if (config.network().isTimeVariantNetwork()) { new NetworkChangeEventsWriter().write(controlerIO.getOutputFilename(Controler.OUTPUT_PREFIX + Controler.FILENAME_CHANGE_EVENTS_XML), NetworkUtils.getNetworkChangeEvents(network)); } }
@Override public void notifyIterationEnds(IterationEndsEvent event) { parsePopulation(event.getServices().getScenario().getPopulation()); String outNameIdentifier = "actsFromParatransitUsers.txt"; if (this.firstIteration) { // write it to main output writeResults(event.getServices().getControlerIO().getOutputFilename("0." + outNameIdentifier)); this.firstIteration = false; } else { // write it somewhere writeResults(event.getServices().getControlerIO().getIterationFilename(event.getIteration(), outNameIdentifier)); } }