private void writeLine(final double time, final Id<Person> agentId, final Id<Link> linkId, final int flag, final String description) { try { this.out.write(getTimeString(time)); if (agentId != null) { this.out.write(agentId.toString()); } this.out.write('\t'); // nothing to be written for leg-nr this.out.write('\t'); if (linkId != null) { this.out.write(linkId.toString()); } this.out.write('\t'); this.out.write('0'); // from-node-id this.out.write('\t'); this.out.write(Integer.toString(flag)); this.out.write('\t'); if (description != null) { this.out.write(description); } this.out.write('\n'); } catch (IOException e) { e.printStackTrace(); } }