对于没有长度的头节点线路,设定一个阻抗最小值。

Signed-off-by: dmy@lab <dmy@lab.lab>
This commit is contained in:
dmy@lab
2015-03-09 11:19:54 +08:00
parent 774a9339e8
commit f854799989
4 changed files with 35 additions and 21 deletions

View File

@@ -8,15 +8,16 @@ Line::Line(const QPair<QString,QString>& fromTo, ACLineSegment* ac, QObject *par
}
void Line::extract()
{
//用YJV22-3x240
ACLineSegment *ac=this->ac;
double length=ac->getLength();
if((int)length==0)
{
std::cout<<"line length zeros "<<ac->getID().toStdString()<<std::endl;
}
// if((int)length==0)
// {
// std::cout<<"line length zeros "<<ac->getID().toStdString()<<std::endl;
// }
//单位阻抗
double rn0=0.0958;//单位电阻有名值
double xn0=0.0881;//单位电抗有名值
@@ -24,11 +25,11 @@ void Line::extract()
double x0=xn0/(10.5*10.5/1000);
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;
this->length=length;
this->r=r0*length/1000;//length的单位是米
this->x=x0*length/1000;
this->g1=g0*length/1000;
this->g2=g0*length/1000;
this->b1=b0*length/1000;
this->b2=b0*length/1000;
this->length=length/1000;
}

View File

@@ -10,6 +10,7 @@ public:
Line(const QPair<QString, QString> &fromTo, ACLineSegment* ac,QObject* parent=0);
double length;
ACLineSegment *ac;
protected:
virtual void extract();
private: