parent
84d5330628
commit
4bc4f0ab3f
|
|
@ -4,6 +4,7 @@ Line::Line(const QPair<QString,QString>& fromTo, ACLineSegment* ac):Branch(fromT
|
||||||
{
|
{
|
||||||
this->ratio=1;
|
this->ratio=1;
|
||||||
this->ac=ac;
|
this->ac=ac;
|
||||||
|
this->extract();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
#include "switch.h"
|
||||||
|
|
||||||
|
Switch::Switch(const QPair<QString,QString>& fromTo):Branch(fromTo.first,fromTo.second)
|
||||||
|
{
|
||||||
|
this->extract();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Switch::extract()
|
||||||
|
{
|
||||||
|
// PowerTransformer *tf=this->tf;
|
||||||
|
double length=10;
|
||||||
|
//单位阻抗
|
||||||
|
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,14 @@
|
||||||
|
#ifndef SWITCH_H
|
||||||
|
#define SWITCH_H
|
||||||
|
#include <QPair>
|
||||||
|
#include "branch.h"
|
||||||
|
class Switch:public Branch
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Switch(const QPair<QString, QString> &fromTo);
|
||||||
|
protected:
|
||||||
|
virtual void extract();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SWITCH_H
|
||||||
|
|
@ -5,6 +5,7 @@ Transformer::Transformer(const QPair<QString,QString>& fromTo, PowerTransformer*
|
||||||
{
|
{
|
||||||
this->ratio=1;
|
this->ratio=1;
|
||||||
this->tf=tf;
|
this->tf=tf;
|
||||||
|
this->extract();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,8 @@ SOURCES += main.cpp \
|
||||||
cimexporter.cpp \
|
cimexporter.cpp \
|
||||||
element/branch.cpp \
|
element/branch.cpp \
|
||||||
element/line.cpp \
|
element/line.cpp \
|
||||||
element/transformer.cpp
|
element/transformer.cpp \
|
||||||
|
element/switch.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
elementhashtable.h \
|
elementhashtable.h \
|
||||||
|
|
@ -56,7 +57,8 @@ HEADERS += \
|
||||||
cimexporter.h \
|
cimexporter.h \
|
||||||
element/branch.h \
|
element/branch.h \
|
||||||
element/line.h \
|
element/line.h \
|
||||||
element/transformer.h
|
element/transformer.h \
|
||||||
|
element/switch.h
|
||||||
|
|
||||||
#release{
|
#release{
|
||||||
DEFINES += QT_NO_DEBUG_OUTPUT
|
DEFINES += QT_NO_DEBUG_OUTPUT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue