Exemplo n.º 1
0
        private SimulateResult GenerateSimulationResult(List <Job> scheduledJobs)
        {
            var sr = new SimulateResult
            {
                SchedulerType                = this.Scheduler.SchedulerType,
                ScheduledProfit              = scheduledJobs.Sum(j => j.Profit),
                UsedGreenEnergy              = scheduledJobs.Sum(j => j.UsedGreenEnergyAmount),
                UsedBrownEnergyAmount        = scheduledJobs.Sum(j => j.UsedBrownEnergyAmount),
                UsedBrownEnergyCost          = scheduledJobs.Sum(j => j.UsedBrownEnergyCost),
                ScheduledJobs                = scheduledJobs,
                ScheduledWorkloadUtilization = (double)scheduledJobs.Sum(j => j.RequiredNodes * j.ProcessingTime) / this.PS.ClusterNodeNum / this.PS.TimeSlots,
                ArrivedWorkloadUtilization   = (double)OriginJobs.Sum(j => j.RequiredNodes * j.ProcessingTime) / this.PS.ClusterNodeNum / this.PS.TimeSlots
                                               //ArrivedWorkloadUtilization = (double)this.PS.job
            };

            return(sr);
        }
Exemplo n.º 2
0
 private SimulateResult GenerateSimulationResult(List<Job> scheduledJobs)
 {
     var sr = new SimulateResult
     {
         SchedulerType = this.Scheduler.SchedulerType,
         ScheduledProfit = scheduledJobs.Sum(j => j.Profit),
         UsedGreenEnergy = scheduledJobs.Sum(j => j.UsedGreenEnergyAmount),
         UsedBrownEnergyAmount = scheduledJobs.Sum(j => j.UsedBrownEnergyAmount),
         UsedBrownEnergyCost = scheduledJobs.Sum(j => j.UsedBrownEnergyCost),
         ScheduledJobs = scheduledJobs,
         ScheduledWorkloadUtilization = (double)scheduledJobs.Sum(j => j.RequiredNodes*j.ProcessingTime)/this.PS.ClusterNodeNum/this.PS.TimeSlots,
         ArrivedWorkloadUtilization = (double) OriginJobs.Sum(j => j.RequiredNodes*j.ProcessingTime)/this.PS.ClusterNodeNum/this.PS.TimeSlots
         //ArrivedWorkloadUtilization = (double)this.PS.job
     };
     return sr;
 }