protected static void run(Parameters p) throws IOException {
		
		AbstractPointDistribution dist = new ZeroOriginDistribution(p);
		FixationTimeWriter ftw = new FixationTimeWriter(p);
		
		IteratedSimulationWriter isw;
		if (!p.getOutput().equalsIgnoreCase("MINIMAL"))
			isw = new IteratedSimulationWriter(p);
		else
			isw = null;
		
		RdfWriter rdf;
		
		if (p.getHaltCount() != -1)
			rdf = new RdfWriter(p);
		else
			rdf = null;
		
		PhaseWriter pw = new PhaseWriter(p);
		
		for (int i = 0; i < p.getReplicates(); i++) {
	
			Simulator solver = new Simulator(p, dist, isw, ftw, rdf, pw);
			String simPath = solver.getSimPath();
			
			if (p.getOutput().equalsIgnoreCase("FULL"))
				new Visualizer(simPath);
	
			// NOTE: Even if the random seed is set to '*' in the parameters,
			// all replicates beyond the first one will receive new random seeds.
			if (p.getReplicates() > 1) {
				p.nextReplicate();
			}
		}
		
		if (!p.getOutput().equalsIgnoreCase("MINIMAL"))
			isw.close();
		
		if (p.getHaltCount() != -1)
			rdf.close();
		
		ftw.close();
		pw.close();
		System.out.println("Done.");
	}