public static double LinearR(Consumer[] Consumers) { Consumer[] Resistors = Scheme.GetConsumersByType(Consumers, "R"); double LR = 0; for (int i = 0; i < Resistors.Length; i++) { LR += Resistors[i].R; } return(LR); }
public static double LinearX(Consumer[] Consumers, string ConType) { Consumer[] Resistors = Scheme.GetConsumersByType(Consumers, ConType); double LX = 0; for (int i = 0; i < Resistors.Length; i++) { double X = 0; if (ConType == "C") { X = Resistors[i].C / 1000000; //Деление для исбавления от микрофарад } if (ConType == "L") { X = Resistors[i].L; } LX += X; } return(LX); }