예제 #1
0
        public void AcquireCtrlDecisionsList()
        {
            m_ctrlDecisionList = new List <CtrlAction>();
            m_remedialVSA      = new List <VoltageSecurityAssessor>();

            for (int i = 0; i < Math.Pow(2, m_numOfCapBanks); i++)
            {
                VoltageSecurityAssessor vsa = new VoltageSecurityAssessor()
                {
                    BaseVoltage = m_baseVoltage,
                    //InputFrame = m_inputFrame,
                    TreeIndex        = i,
                    TreeFilePath     = Path.Combine(m_trainedTreeFolder, $"DecisionTreeModel_ControlForLowVoltage_{i}_train"),
                    VoltMeasMagFrame = m_voltMeasMagFrame
                };

                vsa.Assess();

                if ((vsa.AssessResult == "SECURE") && (vsa.TreeIndex != m_capBankCombinationIndex))
                {
                    CtrlAction ctrlact = new CtrlAction()
                    {
                        Index        = vsa.TreeIndex,
                        CtrlTreeName = $"DecisionTreeModel_ControlForLowVoltage_{i}_train",
                        CurrentCapBankCombinationArray = m_capBankCombinationArray,
                        CtrlCapBankCominationArray     = ConvertCapBankCombinationIndexToArray(vsa.TreeIndex, m_numOfCapBanks)
                    };

                    ctrlact.Initialize();
                    m_ctrlDecisionList.Add(ctrlact);
                }

                m_remedialVSA.Add(vsa);
            }
        }
예제 #2
0
        public void AssessVoltageSecurity()
        {
            m_preventiveVSA = new VoltageSecurityAssessor()
            {
                BaseVoltage = m_baseVoltage,
                //InputFrame = m_inputFrame,
                TreeIndex        = m_capBankCombinationIndex,
                TreeFilePath     = Path.Combine(m_trainedTreeFolder, m_trainedTreeName),
                VoltMeasMagFrame = m_voltMeasMagFrame
            };

            m_preventiveVSA.Assess();
            m_currentSecurityStatus = m_preventiveVSA.AssessResult;
        }