1.重新组织了文件。
2.准备试试把所有元素都读入内存中。 Signed-off-by: facat@lab.com <facat@lab.com>
This commit is contained in:
324
core/head.h
Normal file
324
core/head.h
Normal file
@@ -0,0 +1,324 @@
|
||||
#ifndef UIREADER_H
|
||||
#define UIREADER_H
|
||||
|
||||
//#include <QtGui>
|
||||
#include <QXmlStreamReader>
|
||||
#include <vector>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <QIODevice>
|
||||
#include <QTextStream>
|
||||
#include <QFile>
|
||||
#include <iostream>
|
||||
|
||||
class total
|
||||
{
|
||||
public:
|
||||
QString ID;
|
||||
QString description;
|
||||
QString name;
|
||||
int flag;
|
||||
std::vector<QString> Terminal_res;
|
||||
int island;
|
||||
};
|
||||
|
||||
class List
|
||||
{
|
||||
public:
|
||||
QString ID;
|
||||
QString name;
|
||||
int no;
|
||||
int flag;
|
||||
};
|
||||
|
||||
class AC_kind
|
||||
{
|
||||
public:
|
||||
QString GIS_ID;
|
||||
int quantity;
|
||||
int calculateTimes;
|
||||
};
|
||||
|
||||
|
||||
class Substation:public total
|
||||
{
|
||||
public:
|
||||
std::vector<QString> MemberOf_SubControlArea_res;
|
||||
QString GIS_type;
|
||||
};
|
||||
|
||||
class Terminal:public total
|
||||
{
|
||||
public:
|
||||
std::vector<QString> ConductingEquipment_res;
|
||||
std::vector<QString> ConnectivityNode_res;
|
||||
|
||||
};
|
||||
|
||||
|
||||
class BaseVoltage:public total
|
||||
{
|
||||
public:
|
||||
double nominalVoltage;
|
||||
std::vector<QString> BasePower_res;
|
||||
};
|
||||
|
||||
class BasePower:public total
|
||||
{
|
||||
public:
|
||||
double basePower;
|
||||
};
|
||||
|
||||
class ConnectivityNode:public total
|
||||
{
|
||||
public:
|
||||
std::vector<QString> MemberOf_EquipmentContainer_res;
|
||||
};
|
||||
|
||||
class ACLineSegment:public total
|
||||
{
|
||||
public:
|
||||
double LongLength;
|
||||
double secLength; //每节段长度
|
||||
int foreheadI; //上一节段是第i号线路
|
||||
double depth; //节段的深度
|
||||
QString Model;
|
||||
std::vector<QString> BaseVoltage_res;
|
||||
int link_from;
|
||||
int link_to;
|
||||
std::vector<QString> MemberOf_EquipmentContainer_res;
|
||||
double r;
|
||||
double x;
|
||||
double UB;
|
||||
QString GIS_ID;
|
||||
QString foreheadLine;
|
||||
|
||||
};
|
||||
|
||||
class LoadBreakSwitch:public total
|
||||
{
|
||||
public:
|
||||
QString normalOpen;
|
||||
std::vector<QString> MemberOf_EquipmentContainer_res;
|
||||
std::vector<QString> BaseVoltage_res;
|
||||
std::vector<QString> Circuits_res;
|
||||
};
|
||||
|
||||
class BusbarSection:public total
|
||||
{
|
||||
public:
|
||||
QString Normal_Voltage;
|
||||
std::vector<QString> MemberOf_EquipmentContainer_res;
|
||||
std::vector<QString> BaseVoltage_res;
|
||||
double PG;
|
||||
double QG;
|
||||
double PL;
|
||||
double QL;
|
||||
double UB;
|
||||
int busSequence;
|
||||
};
|
||||
|
||||
class Disconnector:public total
|
||||
{
|
||||
public:
|
||||
QString normalOpen;
|
||||
std::vector<QString> MemberOf_EquipmentContainer_res;
|
||||
std::vector<QString> BaseVoltage_res;
|
||||
std::vector<QString> Circuits_res;
|
||||
};
|
||||
|
||||
class PowerTransformer:public total
|
||||
{
|
||||
public:
|
||||
std::vector<QString> MemberOf_EquipmentContainer_res;
|
||||
std::vector<QString> Circuits_res;
|
||||
std::vector<QString> BaseVoltage_res;
|
||||
QString Serial_Number;
|
||||
int link_1;
|
||||
int link_2;
|
||||
int link_3;
|
||||
int low;
|
||||
double ratedMVA;
|
||||
double APower;
|
||||
double BPower;
|
||||
double CPower;
|
||||
QString Model;
|
||||
double r;
|
||||
double x;
|
||||
double Pk;
|
||||
double Uk;
|
||||
double UB;
|
||||
double AReactivePower;
|
||||
double BReactivePower;
|
||||
double CReactivePower;
|
||||
double g;
|
||||
double b;
|
||||
double P0;
|
||||
double I0;
|
||||
bool isPublic;
|
||||
QString foreheadLine;
|
||||
QString type;
|
||||
|
||||
};
|
||||
|
||||
class TransformerWinding:public total
|
||||
{
|
||||
public:
|
||||
std::vector<QString> MemberOf_PowerTransformer_res;
|
||||
std::vector<QString> BaseVoltage_res;
|
||||
};
|
||||
|
||||
class GroundDisconnector:public total
|
||||
{
|
||||
public:
|
||||
QString normalOpen;
|
||||
std::vector<QString> Circuits_res;
|
||||
std::vector<QString> BaseVoltage_res;
|
||||
std::vector<QString> MemberOf_EquipmentContainer_res;
|
||||
};
|
||||
|
||||
class CompositeSwitch:public total
|
||||
{
|
||||
public:
|
||||
QString CompositeSwitchType;
|
||||
std::vector<QString> Circuits_res;
|
||||
};
|
||||
|
||||
class Circuit:public total
|
||||
{
|
||||
public:
|
||||
std::vector<QString> Substations_res;
|
||||
};
|
||||
|
||||
class Bay:public total
|
||||
{
|
||||
public:
|
||||
std::vector<QString> MemberOf_Substation_res;
|
||||
std::vector<QString> BaseVoltage_res;
|
||||
};
|
||||
|
||||
class Connector:public total
|
||||
{
|
||||
public:
|
||||
std::vector<QString> MemberOf_EquipmentContainer_res;
|
||||
int link_from;
|
||||
int link_to;
|
||||
};
|
||||
|
||||
class Fuse:public total
|
||||
{
|
||||
public:
|
||||
QString normalOpen;
|
||||
std::vector<QString> BaseVoltage_res;
|
||||
std::vector<QString> Circuits_res;
|
||||
};
|
||||
|
||||
class Pole:public total
|
||||
{
|
||||
public:
|
||||
std::vector<QString> BaseVoltage_res;
|
||||
std::vector<QString> Circuits_res;
|
||||
};
|
||||
|
||||
class Breaker:public total
|
||||
{
|
||||
public:
|
||||
int GIS_ID;
|
||||
std::vector<QString> BaseVoltage_res;
|
||||
std::vector<QString> MemberOf_EquipmentContainer_res;
|
||||
};
|
||||
|
||||
class vector_finder //得到与ID号相对应的索引
|
||||
{
|
||||
public:
|
||||
vector_finder(QString a):m_i_a(a){}
|
||||
bool operator ()(const std::vector<List>::value_type &value)
|
||||
{
|
||||
return value.ID == m_i_a;
|
||||
}
|
||||
private:
|
||||
QString m_i_a;
|
||||
};
|
||||
|
||||
class ac_finder
|
||||
{
|
||||
public:
|
||||
ac_finder(QString a):m_i_a(a){}
|
||||
bool operator ()(const std::vector<AC_kind>::value_type &value)
|
||||
{
|
||||
return value.GIS_ID == m_i_a;
|
||||
}
|
||||
private:
|
||||
QString m_i_a;
|
||||
};
|
||||
|
||||
class bus_finder
|
||||
{
|
||||
public:
|
||||
bus_finder(int a):m_i_a(a){}
|
||||
bool operator ()(const std::vector<PowerTransformer>::value_type &value)
|
||||
{
|
||||
return value.low == m_i_a;
|
||||
}
|
||||
private:
|
||||
int m_i_a;
|
||||
};
|
||||
|
||||
class DisSubstation
|
||||
{
|
||||
public:
|
||||
QString Name;
|
||||
QString CIMID;
|
||||
QString Description;
|
||||
QString MemberOf;
|
||||
};
|
||||
|
||||
class DisLine
|
||||
{
|
||||
public:
|
||||
QString Name;
|
||||
QString CIMID;
|
||||
QString Owner;
|
||||
QString MemberOf;
|
||||
};
|
||||
|
||||
class DisSecNode
|
||||
{
|
||||
public:
|
||||
QString Name;
|
||||
QString ID;
|
||||
QString FatherID;
|
||||
QString LineType;
|
||||
QString LineID;
|
||||
double Depth;
|
||||
double UnitR;
|
||||
double SecLong;
|
||||
double G;
|
||||
double B;
|
||||
};
|
||||
|
||||
class DisTrans
|
||||
{
|
||||
public:
|
||||
QString ID;
|
||||
QString Name;
|
||||
QString SecNode;
|
||||
double Ps;
|
||||
double P0;
|
||||
double Up;
|
||||
double Ip;
|
||||
double RunRate;
|
||||
QString Type;
|
||||
QString UserType;
|
||||
QString LineID;
|
||||
double S;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user