| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- #ifndef OCC_PUBLIC_DEFINE_DCHEADER_FILE
- #define OCC_PUBLIC_DEFINE_DCHEADER_FILE
- #pragma once
- #include "ElecBaseDefine.h"
- #include "CalculEquation.h"
- #include "YN_NodeDef.h"
- #include <vector>
- #include <map>
- #include "BaseElectricEqpmt.h"
- #include "ElectricEqpmt_Line_TouchNet.h"
- using namespace std;
- class DCSysMG // 直流计算类
- {
- public:
- DCSysMG(void);
- bool UpdataTrainData(DCSysTrain& pTrain); //更新列车数据
- bool IsTrainInPowerStation(DCSysTrain& pTrain); //判断车是否在站内
- void CalculValue(); //计算值
- bool CalculRectArray(); //计算矩阵数组
- bool CreateRectArray(); //创建矩阵数组
- bool CreateFixYNodes();
- bool CreateHeadNodes();
- bool CreateTailNodes();
- int CreateNodeID();
- bool CreateRectierToTouchNetNode(Dc_PowerStation& Station);
- bool CreateRectierToRailWayNode(Dc_PowerStation& Station);
- bool CreateRailWayNode(Dc_PowerStation& Station);
- bool CreateTrainNode();
- size_t FindNodeListIndex(string touchnetid,double ex,int arrow,vector<LineNodeData>& m_UpRunDataList,vector<LineNodeData>& m_DownRunDataList);
- void FindCalScope(Dc_PowerStation& node, bool& stop,double i);
- bool HaveRightResult();
- bool OutPutRectValueToFile();
- void OutPutTrainSMap();
- bool RemoveSpanNetInfo(int station,int errorid,int arrow);
- void AdjustI(double& i); //调整电流值
- bool AddSpanNetInfo(int station,int errorid,int arrow);
- bool AddTrainToNodes(DCSysTrain& train,vector<LineNodeData>& m_UpRunDataList,vector<LineNodeData>& m_DownRunDataList);
- void AddStationData(TrainRuningData &station);
- void AddStationInfo(Dc_PowerStation& station);
- void AddStationTo(int index,TrainRuningData &station);
- bool AdjustFixNodeRect(map<int,POWERNODE>& NodeMap);
- bool AdjustSpanNetNode(TouchNet_SpanNetApplyPower_Info& AdjustNode);
- bool AdjustShortCutNode(); //调整短路节点
- void AdjustTouchNetRelation(string touchnetid,Track_Section& tracksec); //调整接触网关系
- bool JudgeShortCutAreaTrian(DCSysTrain& train); //判断短路区域车辆
- size_t GetStationSize();
- bool GetStationByindex(int index,TrainRuningData &station); //通过索引来查找车站
- int GetRelaNodeRectIndex(int RelationNodeID); //获取关系节点矩阵索引
- void GetTrianVPublish(std::vector<POWERVALUE>& PQIList); //获取列车电压数据发布
- void GetRectiterVPublish(std::vector<POWERVALUE>& PQIList); //获取整流器电压发布
- void GetBackVIPublish(std::vector<POWERVALUE>& PQIList); //获取回流线电压发布
- double GetTouchNetDurDistance(string startline,double exs,string endline,double exe,int arrow); //获取两段接触网之间的距离
- string GetTouchNetByPosition(int trackid,double ex); //通过轨道区段号获取接触网位置
- double GetTouchLenght(string id);
- bool GetTouchNetPosByRailPosition(int trackid,double railex,string& touchnetid,double&touchnetex);
- void SetPQValueArr(DCNodePQValue PQValueArr[]); //设置PQ节点参数数组
- void SetHeadTailTouchNet(int arrow,int headtail,string id); //设置头尾接触网
- void PushTailNodes(); //把尾节点压到车站
- void SetRunStatus(int status); //设置运行状态
- void ExitInstance();
- //added by zhangjiahua
- void CheckSpanNetInfo(); //检测存在通过越区隔离开关进行越区供电情形,并进行相关节点关系调整 xyx注释
- void DeleteSpanNetInfo(); //在下一次直流计算前,将节点关系恢复至初始状态 xyx注释
- TOUCHNETMAP * GetTouchNetMap()
- {
- return &TouchNetMap;
- }
- map<int,DCSysTrain>* GetTrainSInStationMap()
- {
- return &TrainSInStationMap;
- }
- public:
- int m_RunStatus; //运行状态
- int m_trainID; //列车ID
- double PowerSourceV; //电源电压
- double PowerSourceR; //电源电阻
- bool HaveResult; //有无值
-
- vector<TrainRuningData> m_StationDataList; //,车站数据表 未用
- vector<TrainRuningData> m_RunDataList; //列车运行数据 未用
- vector<StationInfo> m_StationInfoVector; //车站信息,定义了列车运行的相关参数 未用
- vector<TouchNet_SpanNetApplyPower_Info> m_TouchNetSpanNetInfo; //接触网_跨网供电类向量的定义, 未用
- TOUCHNETRELAMAP m_NetTracksRelationMap; //接触网与轨道的关系
- typedef map<int,Dc_PowerStation> DCSTATIONMAP; //直流电站表,Dc_PowerStation直流电站类
- typedef map<int,DcYNodeBase*> DCYNODEMAP; //直流节点
- DCSTATIONMAP m_PowerStationNodeMap; //直流电站
- DCNodePQValue* p_PQValueArr; //直流PQ节点数组
- typedef map<int,POWERNODE> DCYSNODEMAP; //电力节点
- DCYSNODEMAP m_DCFixNodesMap; //直流固定节点
- DCYSNODEMAP m_DCNodesMap; //直流节点 //直流列车节点 xyx注释
- map<int,DCSysTrain> TrainSInStationMap; //直流列车系统相关定义,列车表的定义,DCSysTrain列车类
- CalculEquation m_EquationCalcul; //方程计算
- vector<LineNodeData> m_UpRunFixDataList; //上行固定节点列表 //上行接触网上的节点列表(含线上的直流直流母线节点及列车受电弓节点) xyx注释
- vector<LineNodeData> m_DownFixRunDataList; //下行接触网上的节点列表(含线上的直流直流母线节点及列车受电弓节点) xyx注释
- map<int,DCSysTrain> m_ShortCutAreaTrians; //短路区域车的数量
- int UpHeadNodeID; //接触网上行头节点ID
- int DownHeadNodeID; //接触网下行头节点ID
- int UpTailNodeID; //接触网上行尾节点ID
- int DownTailNodeID; //接触网下行尾节点ID
- string UpStartTouchNetID; //上行接触网起始ID
- string UpEndTouchNetID; //
- string DownStartTouchNetID;
- string DownEndtouchNetID; //下行接触网终点ID
- int NodeIDsCount; //节点的个数、(站)
- int NodeIndex; //节点索引
- TOUCHNETMAP TouchNetMap; //接触网相关信息
- ELEEQPMTMAP ElectricEqpmtMap;
- void SetElcEqpmtMap(ELEEQPMTMAP elceqpmtmap)
- {
- ElectricEqpmtMap = elceqpmtmap;
- }
- std::mutex m_CritilSec;
- std::mutex m_CritilSecYNodesMap;
- std::mutex m_CritilSecSpanNet;
- //bool m_bInit;
- protected:
- //保存当前计算数值,防止析构时数值变化导致数组越界
- int m_nMaxSigleArrowTrainNums; //单方向最大列车数量
- int m_nAllPowerStationNums; //全线所有车站数量
- public:
- ~DCSysMG(void);
- };
- #endif
|