parent
9a70026cf3
commit
a012ca3502
|
|
@ -14,11 +14,24 @@ bool BusbarSection::derivedParse(QXmlStreamReader& reader)
|
||||||
terminal=reader.attributes().value("rdf:resource").toString();
|
terminal=reader.attributes().value("rdf:resource").toString();
|
||||||
this->terminal=terminal.replace("#","").leftRef(-1).toString();
|
this->terminal=terminal.replace("#","").leftRef(-1).toString();
|
||||||
qDebug()<<"got "<<"ConductingEquipment.Terminals "<<this->terminal<<"\n";
|
qDebug()<<"got "<<"ConductingEquipment.Terminals "<<this->terminal<<"\n";
|
||||||
|
// std::cout<<"ConductingEquipment.Terminals"<<this->terminal.toStdString()<<std::endl;
|
||||||
|
}
|
||||||
|
if("Equipment.MemberOf_EquipmentContainer"==reader.name() && reader.attributes().hasAttribute("rdf:resource"))
|
||||||
|
{
|
||||||
|
QString container;
|
||||||
|
container=reader.attributes().value("rdf:resource").toString();
|
||||||
|
this->equipmentMemberOf_EquipmentContainer=container.replace("#","").leftRef(-1).toString();
|
||||||
|
qDebug()<<"got "<<"ConductingEquipment.Terminals "<<this->terminal<<"\n";
|
||||||
// std::cout<<"ConductingEquipment.Terminals"<<this->terminal.toStdString()<<std::endl;
|
// std::cout<<"ConductingEquipment.Terminals"<<this->terminal.toStdString()<<std::endl;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString BusbarSection::getEquipmentMemberOf_EquipmentContainer()
|
||||||
|
{
|
||||||
|
return this->equipmentMemberOf_EquipmentContainer;
|
||||||
|
}
|
||||||
|
|
||||||
QString BusbarSection::getTerminal()
|
QString BusbarSection::getTerminal()
|
||||||
{
|
{
|
||||||
return this->terminal;
|
return this->terminal;
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,12 @@ class BusbarSection:public BasicElementInfo
|
||||||
public:
|
public:
|
||||||
explicit BusbarSection(QObject *parent = 0);
|
explicit BusbarSection(QObject *parent = 0);
|
||||||
virtual bool parse(QXmlStreamReader& reader);
|
virtual bool parse(QXmlStreamReader& reader);
|
||||||
|
QString getEquipmentMemberOf_EquipmentContainer();
|
||||||
QString getTerminal();
|
QString getTerminal();
|
||||||
protected:
|
protected:
|
||||||
QString terminal;
|
QString terminal;
|
||||||
virtual bool derivedParse(QXmlStreamReader& reader);
|
virtual bool derivedParse(QXmlStreamReader& reader);
|
||||||
|
QString equipmentMemberOf_EquipmentContainer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BUSBARSECTION_H
|
#endif // BUSBARSECTION_H
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ bool ElementHashtable::GoPath()
|
||||||
// if(p->getName()=="ACLineSegment"){
|
// if(p->getName()=="ACLineSegment"){
|
||||||
// std::cout<<p->getID().toStdString()<<std::endl;
|
// std::cout<<p->getID().toStdString()<<std::endl;
|
||||||
// }
|
// }
|
||||||
if(p->getName()=="ACLineSegment" && p->getID()=="AC-671400")
|
if(p->getName()=="ACLineSegment" && p->getID()=="AC-671401")
|
||||||
{
|
{
|
||||||
ACLineSegment *ac=static_cast<ACLineSegment *>(p);//BusbarSection也就是线路头节点
|
ACLineSegment *ac=static_cast<ACLineSegment *>(p);//BusbarSection也就是线路头节点
|
||||||
QString acTerminal=ac->getTerminalB();
|
QString acTerminal=ac->getTerminalB();
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,10 @@ bool Substation::derivedParse(QXmlStreamReader& reader)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Substation::getNamingDescription()
|
||||||
|
{
|
||||||
|
return this->namingDescription;
|
||||||
|
}
|
||||||
|
|
||||||
QString Substation::getSubstationMemberOf_Feeder()
|
QString Substation::getSubstationMemberOf_Feeder()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ class Substation:public BasicElementInfo
|
||||||
public:
|
public:
|
||||||
explicit Substation(QObject *parent = 0);
|
explicit Substation(QObject *parent = 0);
|
||||||
virtual bool parse(QXmlStreamReader& reader);
|
virtual bool parse(QXmlStreamReader& reader);
|
||||||
|
QString getNamingDescription();
|
||||||
QString getSubstationMemberOf_Feeder();
|
QString getSubstationMemberOf_Feeder();
|
||||||
protected:
|
protected:
|
||||||
virtual bool derivedParse(QXmlStreamReader& reader);
|
virtual bool derivedParse(QXmlStreamReader& reader);
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,25 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
||||||
}
|
}
|
||||||
if(ce.startsWith("BS"))
|
if(ce.startsWith("BS"))
|
||||||
{
|
{
|
||||||
|
//看找到那个Substation了
|
||||||
|
BusbarSection *bs=static_cast<BusbarSection *>(ht[ce]);
|
||||||
|
if(bs==NULL)
|
||||||
|
{
|
||||||
|
std::cout<<"not find bussection"<<ce.toStdString()<<std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QString container=bs->getEquipmentMemberOf_EquipmentContainer();
|
||||||
|
Substation *sfd=static_cast<Substation *>(ht[container]);
|
||||||
|
if(sfd==NULL)
|
||||||
|
{
|
||||||
|
std::cout<<"can not find"<<container.toStdString()<<std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout<<"encounter "<<sfd->getNamingDescription().toStdString()<<std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(ce.startsWith("TF"))
|
if(ce.startsWith("TF"))
|
||||||
|
|
@ -95,7 +114,7 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString feederID=sfd->getSubstationMemberOf_Feeder();
|
QString feederID=sfd->getSubstationMemberOf_Feeder();
|
||||||
if(feederID!="FD-2004")
|
if(feederID!="FD-2003")
|
||||||
{
|
{
|
||||||
std::cout<<tf->getNamingDescription().toStdString()<<"not belong"<<std::endl;
|
std::cout<<tf->getNamingDescription().toStdString()<<"not belong"<<std::endl;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
#include "powertransformer.h"
|
#include "powertransformer.h"
|
||||||
#include "substation.h"
|
#include "substation.h"
|
||||||
|
#include "busbarsection.h"
|
||||||
class TopologyRecorder
|
class TopologyRecorder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue