while (itr.hasNext()) {
//System.out.println("\t-RESCHEDULER: Assigning iterator");
Programm p_aux = itr.next();
/*
* Checking method "PDFGenerator.getPDF"
* CHECKED!!!
*/
//System.out.println("\t-RESCHEDULER: Generating PDF for "+ p_aux.getAppliance().getApplianceType());
double[] d_PDF = PDFGenerator.getPDF(p_aux, d_heuristics,i_timeslot);
/*for(int x=0;x<d_PDF.length;x++){
System.out.println("\t PDF("+(x+p_aux.getEarliestExecutionTime())+")="+ d_PDF[x]);
}*/
/*
* Checking method "PDFGenerator.getPDF"
* CHECKED!!!
*/
// Probabilistic selection
//System.out.println("\t-RESCHEDULER: Generating CDF for "+ p_aux.getAppliance().getApplianceType());
double[] d_CDF = getCumulativeFunction(d_PDF);
/*for(int x=0;x<d_CDF.length;x++){
System.out.println("\t CDF("+(x+p_aux.getEarliestExecutionTime())+")="+ d_CDF[x]);
}*/
/*
* Checking method "selectProbabilistically"
* CHECKED!!!
*/
int i_reschedule_timeslot = selectProbabilistically(d_CDF, rand) + i_timeslot;
System.out.println("\t New Execution time for "+p_aux.getAppliance().getApplianceType()+" is "+i_reschedule_timeslot+" - old one "+p_aux.getTimeOfExecution());
Programm p_appliance_rescheduled = new Programm(
p_aux.getAppliance(), i_reschedule_timeslot,
p_aux.getEarliestExecutionTime(),
p_aux.getLatestExecutionTime());
al_p_new_schedule.add(p_appliance_rescheduled);