对于没有长度的头节点线路,设定一个阻抗最小值。
Signed-off-by: dmy@lab <dmy@lab.lab>
This commit is contained in:
parent
774a9339e8
commit
f854799989
|
|
@ -136,10 +136,20 @@ void CIMExporter::exportTo(const QString& path,const QString &rootID)
|
|||
writer<<seqN++<<seperator;
|
||||
writer<<l.fromNum<<seperator;
|
||||
writer<<l.toNum<<seperator;
|
||||
writer<<l.line->r<<seperator;
|
||||
writer<<l.line->x<<seperator;
|
||||
writer<<l.line->b1<<seperator;
|
||||
writer<<l.line->b2<<seperator;
|
||||
if(l.id==rootID && static_cast<int>(l.length)==0)
|
||||
{
|
||||
writer<<0.01<<seperator;
|
||||
writer<<0.01<<seperator;
|
||||
writer<<0<<seperator;
|
||||
writer<<0<<seperator;
|
||||
}
|
||||
else
|
||||
{
|
||||
writer<<l.line->r<<seperator;
|
||||
writer<<l.line->x<<seperator;
|
||||
writer<<l.line->b1<<seperator;
|
||||
writer<<l.line->b2<<seperator;
|
||||
}
|
||||
writer<<endLine;
|
||||
// writer<<"type"<<seperator;
|
||||
// writer<<l.id<<"\t";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -21,12 +21,14 @@ void ElementReduction::calibration(const QString &id,QHash<QString,BranchStruc *
|
|||
idToBranch[id]->fromID.swap(idToBranch[id]->toID);
|
||||
}
|
||||
|
||||
LineStru *line=static_cast<LineStru *>(idToBranch[id]);
|
||||
if(0==static_cast<int>(line->length))
|
||||
{
|
||||
line->length=10;
|
||||
line->line->length=10;
|
||||
}
|
||||
// LineStru *line=static_cast<LineStru *>(idToBranch[id]);
|
||||
// if(0==static_cast<int>(line->length))
|
||||
// {
|
||||
// std::cout<<"is zeros"<<line->id.toStdString()<<std::endl;
|
||||
// line->length=10;
|
||||
// line->line->length=10;
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue