public static final void nextExperiment()
{

	// Reading parameter
	cycles = Configuration.getInt(PAR_CYCLES);
	if (CommonState.getEndTime() < 0) // not initialized yet
		CDState.setEndTime(cycles);

	// initialization
	CDState.setCycle(0);
	System.err.println("CDSimulator: resetting");
	controls = null;
	ctrlSchedules = null;
	Network.reset();
	System.err.println("CDSimulator: running initializers");
	runInitializers();

	// main cycle
	loadControls();

	System.err.println("CDSimulator: starting simulation");
	for (int i = 0; i < cycles; ++i) {
		CDState.setCycle(i);

		boolean stop = false;
		for (int j = 0; j < controls.length; ++j) {
			if (ctrlSchedules[j].active(i))
				stop = stop || controls[j].execute();
		}
		if (stop)
			break;
		System.err.println("CDSimulator: cycle " + i + " done");
	}

	CDState.setPhase(CDState.POST_SIMULATION);

	// analysis after the simulation
	for (int j = 0; j < controls.length; ++j) {
		if (ctrlSchedules[j].fin)
			controls[j].execute();
	}
}