示例#1
0
 public void powerDrawPerSecond(ORSResourceSuppliable pm, double power_draw, double draw_power_consumption)
 {
     PowerConsumption powerConsumption;
     if (!power_consumption.TryGetValue(pm, out powerConsumption))
     {
         powerConsumption = new PowerConsumption();
         power_consumption.Add(pm, powerConsumption);
     }
     powerConsumption.Power_draw += power_draw;
     powerConsumption.Power_consume += draw_power_consumption;
 }
示例#2
0
 public void powerDrawFixed(ORSResourceSuppliable pm, double power_draw, double power_cosumtion) 
 {
     var timeWarpFixedDeltaTime = TimeWarpFixedDeltaTime;
     var power_draw_per_second = power_draw / timeWarpFixedDeltaTime;
     var power_cosumtion_per_second = power_cosumtion / timeWarpFixedDeltaTime;
     
     PowerConsumption powerConsumption;
     if (!power_consumption.TryGetValue(pm, out powerConsumption))
     {
         powerConsumption = new PowerConsumption();
         power_consumption.Add(pm, powerConsumption);
     }
     powerConsumption.Power_draw += power_draw_per_second;
     powerConsumption.Power_consume += power_cosumtion_per_second;         
 }