コード例 #1
0
        public double MvaCase(int CaseNumber, int UnitNumber)
        {
            // Unit 3 MVA will always change accordingly to test case.
            // Test cases > 72 will always have same MVA rate at 100.
            if (UnitNumber == InitiatorPosition && CaseNumber <= TotalRegularTest)
            {
                switch (CaseNumber % 4)
                {
                case 3:
                    // MVA rate at 50.
                    CaseNumber = 1;
                    break;

                default:
                    // MVA rate at 100.
                    CaseNumber = 0;
                    break;
                }
            }
            else
            {
                // MVA rate at 100.
                CaseNumber = 0;
            }

            UCL ucl = new UCL();

            return(Convert.ToDouble(ucl.GetValues("mva", CaseNumber), new CultureInfo("en-US")));
        }
コード例 #2
0
        public double ImpedanceCase(int CaseNumber, int UnitNumber)
        {
            // Unit 3 CT will always change accordingly to test case.
            // Test cases > 72 will always have same Impedance assumption at 10.
            if (UnitNumber == InitiatorPosition && CaseNumber <= TotalRegularTest)
            {
                switch (CaseNumber % 4)
                {
                case 0:
                    // Impedance assumption is 8%.
                    CaseNumber = 1;
                    break;

                default:
                    // Impedance assumption is 10%.
                    CaseNumber = 0;
                    break;
                }
            }
            else
            {
                // Impedance assumption is 10%.
                CaseNumber = 0;
            }

            UCL ucl = new UCL();

            return(Convert.ToDouble(ucl.GetValues("impedance", CaseNumber), new CultureInfo("en-US")));
        }
コード例 #3
0
        public double CTCase(int CaseNumber, int UnitNumber)
        {
            // Unit 3 CT will always change accordingly to test case.
            // Test cases > 72 will always have same CT ratio at 5000.
            if (UnitNumber == InitiatorPosition && CaseNumber <= TotalRegularTest)
            {
                switch (CaseNumber % 4)
                {
                case 1:
                    // CT ratio is 4500.
                    CaseNumber = 1;
                    break;

                case 3:
                    // CT ratio is 2500.
                    CaseNumber = 2;
                    break;

                default:
                    // CT ratio is 5000.
                    CaseNumber = 0;
                    break;
                }
            }
            else
            {
                CaseNumber = 0;
            }

            UCL ucl = new UCL();

            return(Convert.ToDouble(ucl.GetValues("ct", CaseNumber), new CultureInfo("en-US")));
        }
コード例 #4
0
        private string GetBreakers(int UnitNumber, string BreakerCombination)
        {
            int position = Convert.ToInt16(BreakerCombination.Substring((UnitNumber - 1), 1), new CultureInfo("en-US"));

            UCL ucl = new UCL();

            return(ucl.GetValues("breakers", position));
        }
コード例 #5
0
        public double GetSettings(String itemName, int UnitNumber)
        {
            int unitNumberOffset = -1;

            if (UnitNumber == 0)
            {
                unitNumberOffset = 0;
            }

            UCL ucl = new UCL();

            return(Convert.ToDouble(ucl.GetValues(itemName, (UnitNumber + unitNumberOffset)), new CultureInfo("en-US")));
        }