public final void writeV6(final String filename) { this.handler = new PopulationWriterHandlerImplV6(coordinateTransformation); ((PopulationWriterHandlerImplV6) handler).putAttributeConverters( converters ); write(filename); }
public final void writeV0(final String filename) { this.handler = new PopulationWriterHandlerImplV0( coordinateTransformation , this.network); write(filename); }
public final void writeV5(final String filename) { this.handler = new PopulationWriterHandlerImplV5(coordinateTransformation); write(filename); }
/** * Writes the population in the format of population_v5.dtd * * @param filename */ public void writeV6(final String filename) { final org.matsim.core.population.io.PopulationWriter writer = new org.matsim.core.population.io.PopulationWriter( transformation , this.population, this.network); writer.putAttributeConverters( attributeConverters ); writer.writeV6(filename); } }
/** * Writes the population in the format of plans_v4.dtd * * @param filename */ public void writeV4(final String filename) { new org.matsim.core.population.io.PopulationWriter(transformation , this.population, this.network).writeV4(filename); }
/** * Writes the population in the format of population_v5.dtd * * @param filename */ public void writeV5(final String filename) { new org.matsim.core.population.io.PopulationWriter( transformation , this.population, this.network).writeV5(filename); }
@Override public void run() { final PopulationWriter writer = new PopulationWriter(s1); try { writer.write(out); } catch (UncheckedIOException e) { // Writer will throw an IOException when pipe is closed from the other side (like "broken pipe" in UNIX) // This is expected. Don't even log anything. // Other exceptions (from the Writer) are not caught // but written to the console. } } }).start();
public final void writeV4(final String filename) { this.handler = new PopulationWriterHandlerImplV4( coordinateTransformation , this.network ); write(filename); }
@Override public void readFile(String filename) { reader.readFile(filename); }
@Override public void readURL( URL url ) { reader.parse( url ) ; }
public final void closeStreaming() { // if ((this.population instanceof Population) && (((Population) this.population).isStreaming())) { // if ( this.population instanceof StreamingPopulationReader.StreamingPopulation ) { if (matsimWriter.getWriter() != null) { writeEndPlans(); } else { log.error("Cannot close streaming. File is not open."); } // } else { // log.error("Cannot close streaming. Streaming must be activated in the Population."); // } }
@SuppressWarnings("unused") public static void addAlgorithm( Population pop, PersonAlgorithm algo ) { printError(); } static void printError() {
public final void startStreaming(final String filename) { // if ((this.population instanceof Population) && (((Population) this.population).isStreaming())) { // if ( this.population instanceof StreamingPopulationReader.StreamingPopulation ) { // write the file head if it is used with streaming. writeStartPlans(filename); // } else { // log.error("Cannot start streaming. Streaming must be activated in the Population."); // } }
/** * * @param coordinateTransformation transformation from the internal CRS to the CRS in which the file should be written * @param fraction of persons to write to the plans file */ public StreamingPopulationWriter( final CoordinateTransformation coordinateTransformation, final double fraction) { this.write_person_fraction = fraction; this.handler = new PopulationWriterHandlerImplV6(coordinateTransformation); }
@Override public final void run(final Person person) { writePerson(person); }
public static void printPlansCount(StreamingPopulationReader reader) { reader.printPlansCount() ; }
public void parse(InputStream is) { reader.parse(is); }
@SuppressWarnings("unused") public static void runAlgorithms( Population pop ) { printError() ; }
public void parse(URL url) { reader.parse( url ); }