21 package org.matsim.run;
23 import java.util.Iterator;
43 System.out.println(
"NetworkCleaner");
44 System.out.println(
"Reads a network-file and \"cleans\" it. Currently, it performs the following");
45 System.out.println(
"steps to ensure a network is suited for simulation:");
46 System.out.println(
" - ensure every link can be reached by every other link. It looks for the");
47 System.out.println(
" biggest cluster of connected nodes and links and removes all other elements.");
49 System.out.println(
"usage: NetworkCleaner [OPTIONS] input-network-file output-network-file");
51 System.out.println(
"Options:");
52 System.out.println(
"-h, --help: Displays this message.");
54 System.out.println(
"----------------");
55 System.out.println(
"2008, matsim.org");
65 public void run(
final String inputNetworkFile,
final String outputNetworkFile) {
81 public void run(
final String[] args) {
82 if (args.length == 0) {
83 System.out.println(
"Too few arguments.");
88 String arg = argIter.next();
89 if (arg.equals(
"-h") || arg.equals(
"--help")) {
93 String inputFile = arg;
94 if (!argIter.hasNext()) {
95 System.out.println(
"Too few arguments.");
99 String outputFile = argIter.next();
100 if (argIter.hasNext()) {
101 System.out.println(
"Too many arguments.");
105 run(inputFile, outputFile);
109 public static void main(String[] args) {
void run(final String inputNetworkFile, final String outputNetworkFile)
void run(final Network network)
void write(final String filename)
static void main(String[] args)
void run(final String[] args)
static Scenario createScenario(final Config config)
static Config createConfig(final String context)
Iterator< String > iterator()