Esempio n. 1
0
        private void Initialize()
        {
            m_controlTransformers = new List <VcTransformer>(); // need to initialize it

            m_controlCapacitorBanks = new List <VcCapacitorBank>();

            m_substationInformation = new VcSubstationInfomation();

            m_substationAlarmDevice = new VcSubstationAlarmDevice();

            m_ltcStatus = new VcLtcStatus();

            m_rawKeyValuePairs = new Dictionary <string, object>();
        }
Esempio n. 2
0
        public void RunCmd(string cmd, string args, string folder, VcSubstationInfomation subInformation, string testCaseName, VcCapacitorBank capacitorbank1, VcCapacitorBank capacitorbank2)
        {
            ProcessStartInfo start = new ProcessStartInfo();

            start.FileName               = @"C:\Python27\python.exe";
            start.Arguments              = string.Format("{0} {1} \"{2}\" {3} {4} {5} {6} \"{7}\" {8} {9} {10} {11}", cmd, args, folder, subInformation.ConsecTap, subInformation.ConsecCap, subInformation.Ncdel, subInformation.Ntdel, testCaseName, capacitorbank1.NcTrip, capacitorbank2.NcTrip, capacitorbank1.NcClose, capacitorbank2.NcClose);
            start.UseShellExecute        = false;
            start.RedirectStandardOutput = true;
            using (Process process = Process.Start(start))
            {
                using (StreamReader reader = process.StandardOutput)
                {
                    string result = reader.ReadToEnd();
                    Console.Write(result);
                }
            }
        }
Esempio n. 3
0
        public void CheckTieBreaker()
        {
            VcSubstationInfomation  VcSubInfo  = new VcSubstationInfomation();
            VcSubstationAlarmDevice VcSubAlarm = new VcSubstationAlarmDevice();
            BellyUps BU = new BellyUps();

            // tie_v = sw_db::read_and_verify_point(farm_dev_id, tie_230_id, @Zquit_bits);
            VcSubInfo.TieV = 1;
            if (VcSubInfo.TieV != 0)    // "Value Type" in .NET (int) cannot, by definition, be null.
            {
                //if (tie_v != CLOSE)
                //{
                //    ibal = 0;                                       // can not balance mvrs tie open
                //}
            }
            else
            {
                BU.BellyUp(string.Format("undefed bits set or {0} = prog_stat", VcSubAlarm.LtcProgram));
            }
        }
        private void CheckIfControlDoneLastCycle(int i)
        {
            VoltVarController      VC        = new VoltVarController();
            VcSubstationInfomation VcSubInfo = new VcSubstationInfomation();
            ProgLogMessage         PM        = new ProgLogMessage();
            BellyUps       BU  = new BellyUps();
            LtcLogMessages LM  = new LtcLogMessages();
            VcLtcStatus    LTC = new VcLtcStatus();

            if (VC.ControlTransformers[i].CtlDone != 0)
            {
                double TapMove = Math.Abs(VC.ControlTransformers[i].StTapV - VC.ControlTransformers[i].TapV);
                double MvrMove = Math.Abs(VC.ControlTransformers[i].StMvrV - VC.ControlTransformers[i].MvrV);
                if (TapMove < 0.2 && MvrMove < 0.2)
                {
                    LM.LtcLogMessage(string.Format("Control Failed {0} {1} {2} {3}",
                                                   VC.ControlTransformers[i].DeviceId, VC.ControlTransformers[i].LtcCtlId, VC.ControlTransformers[i].PrevCtl, VC.ControlTransformers[i].TapV));

                    LTC.Cfail++;
                }
                VC.ControlTransformers[i].CtlDone = 0;
            }
        }