Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 3
0
 public RegionalVoltageControllerAdapter()
 {
     m_baseVoltage             = 1;
     m_capBankCombinationArray = null;
     m_capBankCombinationIndex = -1;
     m_currentSecurityStatus   = "UNKNOWN";
     m_ctrlDecisionList        = new List <CtrlAction>();
     m_numOfBuses        = 0;
     m_numOfCapBanks     = 0;
     m_trainedTreeName   = null;
     m_trainedTreeFolder = null;
     m_preventiveVSA     = new VoltageSecurityAssessor();
     m_remedialVSA       = new List <VoltageSecurityAssessor>();
 }