private void ReadShuntBreakers(Network systemNetwork, string inputFilePath, int rowNumber) { string ShuntBreakersPathname = inputFilePath + "CapBanks.csv"; CsvLineAdapter csvReadBreakerStatus = new CsvLineAdapter(); CsvLineAdapter csvReadBreakerKey = new CsvLineAdapter(); csvReadBreakerKey.ReadCSVLine(ShuntBreakersPathname, 0); csvReadBreakerStatus.ReadCSVLine(ShuntBreakersPathname, rowNumber); for (int i = 0; i < systemNetwork.ShuntBreakers.Count; i++) { systemNetwork.ShuntBreakers[i].CapBankSwitchKey = csvReadBreakerKey.LineArray[i]; systemNetwork.ShuntBreakers[i].CapBankSwitchStatus = csvReadBreakerStatus.LineArray[i]; } }
private void ReadVoltageMeasurments(Network systemNetwork, string inputFilePath, int rowNumber) { string VoltageMeasurmentsPathName = inputFilePath + VOLT_FILENAME; CsvLineAdapter csvReadMagnitude = new CsvLineAdapter(); CsvLineAdapter csvReadMagnitudeKey = new CsvLineAdapter(); csvReadMagnitudeKey.ReadCSVLine(VoltageMeasurmentsPathName, 0); csvReadMagnitude.ReadCSVLine(VoltageMeasurmentsPathName, rowNumber); for (int i = 0; i < systemNetwork.Voltages.Count; i++) { systemNetwork.Voltages[i].Measurement.MagnitudeKey = csvReadMagnitudeKey.LineArray[i]; systemNetwork.Voltages[i].Measurement.Magnitude = Convert.ToDouble(csvReadMagnitude.LineArray[i]); } }