24
testHasttable/element/switch.cpp
Normal file
24
testHasttable/element/switch.cpp
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user