Package eas.users.fredy.grid.prosumer.repository.schedule

Examples of eas.users.fredy.grid.prosumer.repository.schedule.Programm


           
            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);
View Full Code Here


     */
    public void addLoads(Schedule s_prosumerLoad){
       
        Iterator<Programm> itr = s_prosumerLoad.getSchedule().iterator();
        while(itr.hasNext()){
            Programm p_aux = itr.next();
            int i_duration = p_aux.getAppliance().getDuration();
            int i_time_of_execution = p_aux.getTimeOfExecution()
           
            for(int j = i_time_of_execution; j < i_time_of_execution + i_duration;j++){
               
                /*System.out
                        .println("MGMG: GridLoad - Printing Received Load: Timeslot. "
                                + j
                                + " TOE "
                                + i_time_of_execution
                                + " DURATION "
                                + i_duration
                                + " Load: "
                                + this.d_gridLoad[j]
                                + " - Appliance "
                                + p_aux.getAppliance().getApplianceType());
                */
               
                this.d_gridLoad[j] += p_aux.getAppliance().getApplianceLoadAt(j - i_time_of_execution);
                       
               
            }
           
        }
View Full Code Here

TOP

Related Classes of eas.users.fredy.grid.prosumer.repository.schedule.Programm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.