ElectricEqpmt_BreakRailPotential.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /********************************************************************
  2. 版权声明: Copyright (C),Yunda Tech.Co.,Ltd.
  3. 创 建 人: 张家华
  4. 创建时间: 2018/8/24 16:02
  5. 文件名称: ElectricEqpmt_BreakRailPotential
  6. 主要功能: 1.轨电位状态图元管理
  7. 其 他:
  8. 修改记录:
  9. *********************************************************************/
  10. #pragma once
  11. #include "ElectricEqpmt_SwicthEqpmt.h"
  12. #include "ElectricEqpmt_PowerBolt.h"
  13. #include "ElectricEqpmt_Breaker.h"
  14. class ElectricEqpmt_BreakRailPotential : //断路器
  15. public ElectricEqpmt_Breaker
  16. {
  17. public:
  18. ElectricEqpmt_BreakRailPotential();
  19. virtual ~ElectricEqpmt_BreakRailPotential(){};
  20. virtual void CalculateValue(double inputv,double inputI,ELEEQPMTMAP* PEqpmtMap);
  21. virtual bool handle_checkprotect(int eventOper,ELEEQPMTMAP& eqpmtmap,int errorid,int protectid);
  22. virtual int GetType(){return OCC_EQPMTTYPE_BreakRailPotential;}
  23. virtual bool handle_delaytime(int64_t& time,ELEEQPMTMAP& ElectricEqpmtMap,DelayTimeInfo& delayparm);
  24. virtual bool CheckProtect(ELEEQPMTMAP& ElectricEqpmtMap,int errorid,int protectid,bool bAutoRelation = true );
  25. virtual bool PowerCut(ELEEQPMTMAP& eqpmtmap,string sourceid,int offcase);
  26. //virtual void ClearProtect(ELEEQPMTMAP& ElectricEqpmtMap,int errorid);
  27. //virtual void ClearSingleProtect(ELEEQPMTMAP& ElectricEqpmtMap,int errorid, const string& strProtecResetType = _T("")); //added by zhangjh on 2017.5.18
  28. //virtual void SetShield(ELEEQPMTMAP& ElectricEqpmtMap);
  29. //virtual void CancleShield(ELEEQPMTMAP& ElectricEqpmtMap);
  30. virtual bool PowerIn(ELEEQPMTMAP& eqpmtmap,string sourceid);
  31. virtual void SetRemoteLock(ELEEQPMTMAP& ElectricEqpmtMap,int status,int ctrlArea,int lockType);
  32. virtual void CancleRemoteLock(ELEEQPMTMAP& ElectricEqpmtMap,int status,int ctrlArea);
  33. virtual void SetCommunicationStatus(map<string,BaseElectricEqpmt*>& ElectricEqpmtMap);
  34. virtual void CancleCommunicationStatus(map<string,BaseElectricEqpmt*>& ElectricEqpmtMap);
  35. int CheckAutoUnionStatus(int errorid,ELEEQPMTMAP& ElectricEqpmtMap, const ProtectValue& protectValue, bool bAutoRelation = true );
  36. bool AddProtectRelation(ProtectValue& protect); //增加保护关系
  37. void SetBreakHandID(string id); //设置断路器手车
  38. string GetBreakHandleID();
  39. /*void SetAutoBoltID(string id)
  40. {
  41. AutoBoltID = id;
  42. }
  43. string GetAutoBoltID()
  44. {
  45. return AutoBoltID;
  46. }*/
  47. void SetRepeatShut(int shutstatus); //设置重合闸
  48. int GetActiveProtectID(); //获取主保护ID
  49. int EqpmtAutoBreak(ELEEQPMTMAP& ElectricEqpmtMap,const ProtectValue& protectValue, bool bAutoRelation = true ); //设备自断
  50. ElectricEqpmt_PowerBolt* GetBoltInShut(ELEEQPMTMAP& eqpmtmap); //获取合闸的备自投设备
  51. ElectricEqpmt_PowerBolt* GetBoltInOff(ELEEQPMTMAP& eqpmtmap); //获取分闸的备自投设备
  52. /*
  53. 故障发生时联跳设备处理方法 Add By XYX 2017 12 21
  54. */
  55. virtual bool CheckTripping( ELEEQPMTMAP& ElectricEqpmtMap, const ProtectValue& protectValue );
  56. /*
  57. 判断断路器当前是否故障
  58. */
  59. bool IsFault();
  60. /*
  61. 联跳设备故障恢复:解除锁闭状态
  62. */
  63. void UnLockTrippingEqpmt( ELEEQPMTMAP& ElectricEqpmtMap );
  64. virtual void EqpmtCtrl(int status,ELEEQPMTMAP& ElectricEqpmtMap,string Stdid,int CtrlType, int nMark = 0);
  65. /*
  66. 检查出线设备是否需要断开:手动分闸时调用
  67. */
  68. void CheckOutLineElectricEqpmt( ELEEQPMTMAP& ElectricEqpmtMap, int nMark /*= 0*/ );
  69. /*
  70. 35KV出线设备自断逻辑处理
  71. */
  72. void PowerCutOutLineElectricEqpmt_35KV( ELEEQPMTMAP& ElectricEqpmtMap, const string& strOutLineElectricEqpmtStrID );
  73. /*
  74. 400V出线设备自断逻辑处理
  75. */
  76. void PowerCutOutLineElectricEqpmt_400V( ELEEQPMTMAP& ElectricEqpmtMap, const string& strOutLineElectricEqpmtStrID );
  77. /*
  78. 400V出线设备自断
  79. */
  80. void PowerCutCurElectricEqpmt_400V( ELEEQPMTMAP& ElectricEqpmtMap );
  81. /*
  82. 35KV目联是否投入
  83. */
  84. bool BoltPowerIn_35KV( ELEEQPMTMAP& ElectricEqpmtMap, const string& strOutLineElectricEqpmtStrID );
  85. /*
  86. 目联备自投要特殊处理
  87. */
  88. virtual int CheckEqpmtCtrlCase(int status,ELEEQPMTMAP& ElectricEqpmtMap,int stdid,int subsysid,int trianid,int stationid,int viewid, int CtrlType, int nMark = 0);
  89. private:
  90. std::vector<ProtectValue> SettingProtects;
  91. int ActiveProtectIndex; //主保护索引
  92. string BreakHandleID; //断路器手车ID
  93. /* string AutoBoltID;*/ //备自投ID
  94. int RepeatShut; //重合闸
  95. int64_t RepeatShutST; //重合闸开始时间
  96. int64_t LastShutST; //最后一次重合闸的时间
  97. /*
  98. 重合闸执行次数及时间间隔
  99. */
  100. static map<int, BreakerDelayTime> mapBreakerDelayTime;
  101. int RepeatShutIndex;
  102. static map<string,string> m_mapCheckedEqpmtStrID;
  103. public:
  104. /*
  105. 根据项目不同设置重合闸执行次数以及时间间隔 ADD BY XYX 2017-12-27
  106. */
  107. static void AddRepeatShut( int nEqpmtType, int nIndex, int nDelayTime, int nOneTime );
  108. int GetAllRepeatShutTime( );
  109. int GetDelayTime( int nIndex );
  110. int GetOneTime();
  111. int GetCurIndexDelayTime();
  112. void ResetRepeatShutIndex()
  113. {
  114. RepeatShutIndex = 1;
  115. }
  116. void MoveNextRepeatShutIndex()
  117. {
  118. RepeatShutIndex++;
  119. }
  120. int GetRepeatShutIndex()
  121. {
  122. return RepeatShutIndex;
  123. }
  124. };