public void setup(boolean isCallDuringRun) throws Exception {

		System.out.println("Simulation setup started");

		Vector<Installation> insts = setupScenario();
		
		if (insts == null)
			throw new Exception("No installations defined for the current scenario.");
		
		if (simulationWorld == null)
			throw new Exception("No simulation parameters defined for the current scenario.");
		
		this.mcruns = this.simulationWorld.getMcruns();
		this.co2 = this.simulationWorld.getCo2();
		this.numOfDays = this.simulationWorld.getNumOfDays();
		this.setup = this.simulationWorld.getSetup();
		
		endTick = Constants.MIN_IN_DAY * numOfDays;

		// Check type of setup
		if (setup.equalsIgnoreCase("static")) {
			//  			this.installations = insts;
			staticSetup(insts);
		} 
		else if (setup.equalsIgnoreCase("dynamic")) {
			if (this.demographics == null)
				throw new Exception("Demographics undefined for \"dynamic\" scenario.");
			this.installations = new Vector<Installation>();
			dynamicSetup(insts, isCallDuringRun);
			//  			dynamicSetupStandalone(jump);
		} else {
			throw new Exception("Problem with setup property: a scenario can be either \"static\" or \"dynamic\"");
		}

		if (this.pricing == null)
			this.pricing = new PricingPolicy();
		if (this.baseline_pricing == null)
			this.baseline_pricing = new PricingPolicy();

		System.out.println("Simulation setup finished");
	}