"""Partitionned EDF using PartitionedScheduler."""fromsimso.core.SchedulerimportSchedulerInfofromRM_monoimportRM_monofromsimso.utilsimportPartitionedSchedulerclassP_RM(PartitionedScheduler):definit(self):PartitionedScheduler.init(self,SchedulerInfo("RM_mono",RM_mono))defpacker(self):# First Fitcpus=[[cpu,0]forcpuinself.processors]fortaskinself.task_list:m=cpus[0][1]j=0# Find the processor with the lowest load.fori,cinenumerate(cpus):ifc[1]<m:m=c[1]j=i# Affect it to the task.self.affect_task_to_processor(task,cpus[j][0])# Update utilization.cpus[j][1]+=float(task.wcet)/task.periodreturnTrue