private void writeRequestToFile(FileOutput out) throws FileNotFoundException,IOException
	{
		switch(out)		
		{
		case ONDEMAND:
			System.out.println("Writing the ondemand requests to file...");
			File ondemandFile=new File("data/request/OndemandRequest.txt");
			BufferedWriter bwriter1=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(ondemandFile)));
		
			for(OndemandRequest on: this.getOndemand())
			{
			bwriter1.write(on.getRequestId()+" "+on.getUserId()+" "+on.getInitialTime()+" "+on.getEndTime()+" "+on.getNumberInstance());
			bwriter1.write("\n");
			}
			bwriter1.close();
			break;
		
		case RESERVED:
		{
			System.out.println("Writing the reserved requests to file...");
			File reservedFile=new File("data/request/ReservedRequest.txt");
			BufferedWriter bwriter3=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(reservedFile)));
			for(ReservedRequest rs: this.getReserved())
			{
				bwriter3.write(rs.getRequestId()+" "+rs.getUserId()+" "+rs.getInitialTime()+" "+rs.getEndTime()+" "+rs.getNumberInstance());
				bwriter3.write("\n");
			}
			bwriter3.close();
			break;
		}
		case SPOT:
		{
			System.out.println("Writing the spot requests to file...");
			File spotFile=new File("data/request/SpotRequest.txt");
			BufferedWriter bwriter2=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(spotFile)));
			for(SpotRequest sp: this.getSpot())
			{
			
				bwriter2.write(sp.getRequestId()+" "+sp.getUserId()+" "+sp.getInitialTime()+" "+sp.getEndTime()+" "+sp.getNumberInstance());
				bwriter2.write("\n");
			}
			bwriter2.close();
			
			break;
		}
		case RESERVATIONWORKLOAD:
			System.out.println("Writing the Reservation workload to file...");
			File reworkloadFile=new File("data/request/reservationworkload.txt");
			BufferedWriter bwriter2=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(reworkloadFile)));
			for(ReservationWorkload re: list)
			{
			
				bwriter2.write(re.getUserId()+" "+re.getVms()+" "+re.getStartTime()+" "+re.getEndTime());
				bwriter2.write("\n");
			}
			bwriter2.close();
			
			break;
			
			
		}
		
	}