对于没有长度的头节点线路,设定一个阻抗最小值。
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<<seqN++<<seperator;
|
||||||
writer<<l.fromNum<<seperator;
|
writer<<l.fromNum<<seperator;
|
||||||
writer<<l.toNum<<seperator;
|
writer<<l.toNum<<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->r<<seperator;
|
||||||
writer<<l.line->x<<seperator;
|
writer<<l.line->x<<seperator;
|
||||||
writer<<l.line->b1<<seperator;
|
writer<<l.line->b1<<seperator;
|
||||||
writer<<l.line->b2<<seperator;
|
writer<<l.line->b2<<seperator;
|
||||||
|
}
|
||||||
writer<<endLine;
|
writer<<endLine;
|
||||||
// writer<<"type"<<seperator;
|
// writer<<"type"<<seperator;
|
||||||
// writer<<l.id<<"\t";
|
// writer<<l.id<<"\t";
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,16 @@ Line::Line(const QPair<QString,QString>& fromTo, ACLineSegment* ac, QObject *par
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Line::extract()
|
void Line::extract()
|
||||||
{
|
{
|
||||||
//用YJV22-3x240
|
//用YJV22-3x240
|
||||||
ACLineSegment *ac=this->ac;
|
ACLineSegment *ac=this->ac;
|
||||||
double length=ac->getLength();
|
double length=ac->getLength();
|
||||||
if((int)length==0)
|
// if((int)length==0)
|
||||||
{
|
// {
|
||||||
std::cout<<"line length zeros "<<ac->getID().toStdString()<<std::endl;
|
// std::cout<<"line length zeros "<<ac->getID().toStdString()<<std::endl;
|
||||||
}
|
// }
|
||||||
//单位阻抗
|
//单位阻抗
|
||||||
double rn0=0.0958;//单位电阻有名值
|
double rn0=0.0958;//单位电阻有名值
|
||||||
double xn0=0.0881;//单位电抗有名值
|
double xn0=0.0881;//单位电抗有名值
|
||||||
|
|
@ -24,11 +25,11 @@ void Line::extract()
|
||||||
double x0=xn0/(10.5*10.5/1000);
|
double x0=xn0/(10.5*10.5/1000);
|
||||||
double g0=0;
|
double g0=0;
|
||||||
double b0=0;
|
double b0=0;
|
||||||
this->r=r0*length;
|
this->r=r0*length/1000;//length的单位是米
|
||||||
this->x=x0*length;
|
this->x=x0*length/1000;
|
||||||
this->g1=g0*length;
|
this->g1=g0*length/1000;
|
||||||
this->g2=g0*length;
|
this->g2=g0*length/1000;
|
||||||
this->b1=b0*length;
|
this->b1=b0*length/1000;
|
||||||
this->b2=b0*length;
|
this->b2=b0*length/1000;
|
||||||
this->length=length;
|
this->length=length/1000;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ public:
|
||||||
Line(const QPair<QString, QString> &fromTo, ACLineSegment* ac,QObject* parent=0);
|
Line(const QPair<QString, QString> &fromTo, ACLineSegment* ac,QObject* parent=0);
|
||||||
double length;
|
double length;
|
||||||
ACLineSegment *ac;
|
ACLineSegment *ac;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void extract();
|
virtual void extract();
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,14 @@ void ElementReduction::calibration(const QString &id,QHash<QString,BranchStruc *
|
||||||
idToBranch[id]->fromID.swap(idToBranch[id]->toID);
|
idToBranch[id]->fromID.swap(idToBranch[id]->toID);
|
||||||
}
|
}
|
||||||
|
|
||||||
LineStru *line=static_cast<LineStru *>(idToBranch[id]);
|
// LineStru *line=static_cast<LineStru *>(idToBranch[id]);
|
||||||
if(0==static_cast<int>(line->length))
|
// if(0==static_cast<int>(line->length))
|
||||||
{
|
// {
|
||||||
line->length=10;
|
// std::cout<<"is zeros"<<line->id.toStdString()<<std::endl;
|
||||||
line->line->length=10;
|
// line->length=10;
|
||||||
}
|
// line->line->length=10;
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue