parent
45a76228c4
commit
57dc9e9728
|
|
@ -30,13 +30,26 @@ bool ACLineSegment::derivedParse(QXmlStreamReader &reader)
|
||||||
}
|
}
|
||||||
if("Naming.description"==reader.name())
|
if("Naming.description"==reader.name())
|
||||||
{
|
{
|
||||||
// std::cout<<"Nd"<<std::endl;
|
|
||||||
// std::cout<<reader.readElementText().toLocal8Bit().data()<<std::endl;
|
|
||||||
this->namingDescription=reader.readElementText();
|
this->namingDescription=reader.readElementText();
|
||||||
}
|
}
|
||||||
|
if("Conductor.length"==reader.name())
|
||||||
|
{
|
||||||
|
bool ok;
|
||||||
|
this->conductorLength=reader.readElementText().toInt(&ok);
|
||||||
|
if(!ok)
|
||||||
|
{
|
||||||
|
this->conductorLength=-100000;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double ACLineSegment::getLength()
|
||||||
|
{
|
||||||
|
return this->conductorLength;
|
||||||
|
}
|
||||||
|
|
||||||
QString ACLineSegment::getNamingDescription()
|
QString ACLineSegment::getNamingDescription()
|
||||||
{
|
{
|
||||||
return this->namingDescription;
|
return this->namingDescription;
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,14 @@ public:
|
||||||
virtual bool parse(QXmlStreamReader &reader);
|
virtual bool parse(QXmlStreamReader &reader);
|
||||||
QString getTerminalA();
|
QString getTerminalA();
|
||||||
QString getTerminalB();
|
QString getTerminalB();
|
||||||
|
double getLength();
|
||||||
QString getNamingDescription();
|
QString getNamingDescription();
|
||||||
protected:
|
protected:
|
||||||
QString terminalA;
|
QString terminalA;
|
||||||
QString terminalB;
|
QString terminalB;
|
||||||
QString containsOfSubstation;
|
QString containsOfSubstation;
|
||||||
QString namingDescription;
|
QString namingDescription;
|
||||||
|
double conductorLength;
|
||||||
virtual bool derivedParse(QXmlStreamReader &reader);
|
virtual bool derivedParse(QXmlStreamReader &reader);
|
||||||
private:
|
private:
|
||||||
bool isTerminalA;
|
bool isTerminalA;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
#include "cimexporter.h"
|
||||||
|
|
||||||
|
CIMExporter::CIMExporter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
#ifndef CIMEXPORTER_H
|
||||||
|
#define CIMEXPORTER_H
|
||||||
|
|
||||||
|
class CIMExporter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CIMExporter();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CIMEXPORTER_H
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
#include "branch.h"
|
||||||
|
|
||||||
|
Branch::Branch(double ratio,const QString& from, const QString& to):ratio(ratio),from(from),to(to)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
#ifndef BRANCH_H
|
||||||
|
#define BRANCH_H
|
||||||
|
#include <QString>
|
||||||
|
class Branch
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Branch(double ratio,const QString& from, const QString& to);
|
||||||
|
protected:
|
||||||
|
double r;
|
||||||
|
double x;
|
||||||
|
QString from;
|
||||||
|
QString to;
|
||||||
|
double ratio;//变比
|
||||||
|
double b1;
|
||||||
|
double b2;
|
||||||
|
double g1;
|
||||||
|
double g2;
|
||||||
|
protected:
|
||||||
|
virtual void extract()=0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BRANCH_H
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
#include "line.h"
|
||||||
|
|
||||||
|
Line::Line(const QPair<QString,QString>& fromTo, ACLineSegment* ac):Branch(1,fromTo.first,fromTo.second)
|
||||||
|
{
|
||||||
|
this->ac=ac;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Line::extract()
|
||||||
|
{
|
||||||
|
ACLineSegment *ac=this->ac;
|
||||||
|
double length=ac->getLength();
|
||||||
|
//单位阻抗
|
||||||
|
double r0=0.01;
|
||||||
|
double x0=0.01;
|
||||||
|
double g0=0;
|
||||||
|
double b0=0;
|
||||||
|
this->r=r0*length;
|
||||||
|
this->x=x0*length;
|
||||||
|
this->g1=g0*length;
|
||||||
|
this->g2=g0*length;
|
||||||
|
this->b1=b0*length;
|
||||||
|
this->b2=b0*length;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
#ifndef LINE_H
|
||||||
|
#define LINE_H
|
||||||
|
#include <QPair>
|
||||||
|
#include "branch.h"
|
||||||
|
#include "./../aclinesegment.h"
|
||||||
|
class Line:public Branch
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Line(const QPair<QString, QString> &fromTo, ACLineSegment* ac);
|
||||||
|
protected:
|
||||||
|
virtual void extract();
|
||||||
|
private:
|
||||||
|
ACLineSegment *ac;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // LINE_H
|
||||||
|
|
@ -31,7 +31,10 @@ SOURCES += main.cpp \
|
||||||
synchronousmachine.cpp \
|
synchronousmachine.cpp \
|
||||||
nodetoterminal.cpp \
|
nodetoterminal.cpp \
|
||||||
topologyrecorder.cpp \
|
topologyrecorder.cpp \
|
||||||
substation.cpp
|
substation.cpp \
|
||||||
|
cimexporter.cpp \
|
||||||
|
element/branch.cpp \
|
||||||
|
element/line.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
elementhashtable.h \
|
elementhashtable.h \
|
||||||
|
|
@ -48,7 +51,10 @@ HEADERS += \
|
||||||
synchronousmachine.h \
|
synchronousmachine.h \
|
||||||
nodetoterminal.h \
|
nodetoterminal.h \
|
||||||
topologyrecorder.h \
|
topologyrecorder.h \
|
||||||
substation.h
|
substation.h \
|
||||||
|
cimexporter.h \
|
||||||
|
element/branch.h \
|
||||||
|
element/line.h
|
||||||
|
|
||||||
#release{
|
#release{
|
||||||
DEFINES += QT_NO_DEBUG_OUTPUT
|
DEFINES += QT_NO_DEBUG_OUTPUT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue