1.把xml文件中明显错误的变压器容量读为630kVA
2.把电容器输出到数据文件中。 Signed-off-by: dmy@lab <dmy@lab.lab>
This commit is contained in:
@@ -206,6 +206,8 @@ void CIMExporter::exportTo(const QString& path,const QString &rootID)
|
||||
QList<CIMExporter::GroundBranch > groudBranch;//first is g, second is b.
|
||||
QList<CIMExporter::NodePQ> nodePQ;//节点注入功率,也就是负荷或者发电机
|
||||
QStringList usedLoad;
|
||||
//电容器补偿量
|
||||
QHash<int,double> capacitor;
|
||||
for(QList<TransformerStru>::iterator ite=this->tf.begin();
|
||||
ite!=this->tf.end();
|
||||
ite++)
|
||||
@@ -238,7 +240,9 @@ void CIMExporter::exportTo(const QString& path,const QString &rootID)
|
||||
writer<<endLine;
|
||||
//保存接地支路
|
||||
groudBranch.push_back(CIMExporter::GroundBranch(ite->fromNum, ite->tf->g1,ite->tf->b1));//都只用g1,b1的数据
|
||||
|
||||
//保存补偿量
|
||||
capacitor[ite->toNum]=ite->tf->capacityMVA*.3;//30% 容性
|
||||
// std::cout<<"cap "<<ite->tf->capacityMVA<< ite->id.toStdString()<<capacitor[ite->toNum] <<std::endl;
|
||||
|
||||
LoadMapping loadMapping;
|
||||
QVector<QSharedPointer<LoadInfo> > vecLoadInfo=loadMapping.getSubstationLoad(sub->getID());
|
||||
@@ -277,6 +281,13 @@ void CIMExporter::exportTo(const QString& path,const QString &rootID)
|
||||
writer<<endLine;
|
||||
}
|
||||
writer<<0<<endLine;//数据间隔
|
||||
//电容器
|
||||
seqN=1;
|
||||
foreach(int node,capacitor.keys())
|
||||
{
|
||||
// std::cout<<"cap"<< capacitor[node]<<std::endl;
|
||||
writer<<seqN++<<seperator<<1<<seperator<<node<<seperator<<0<<seperator<<capacitor[node]<<seperator<<0<<seperator<<-1<<seperator<<1<<endLine;
|
||||
}
|
||||
writer<<0<<endLine;//数据间隔
|
||||
writer<<0<<endLine;//数据间隔
|
||||
//列出DG
|
||||
@@ -286,7 +297,7 @@ void CIMExporter::exportTo(const QString& path,const QString &rootID)
|
||||
ite++)
|
||||
{
|
||||
//保存到节点注入功率中
|
||||
nodePQ.push_back(CIMExporter::NodePQ(ite->toNum,-ite->dg->getPG(0.95)/1000,-ite->dg->getQG(0.95)/1000) );//capapcity的单位是kVA
|
||||
nodePQ.push_back(CIMExporter::NodePQ(ite->toNum,-ite->dg->getPG(0.999)/1000*.5,-ite->dg->getQG(0.999)/1000*.5) );//capapcity的单位是kVA
|
||||
// writer<<ite->fromNum<<"\t";
|
||||
// writer<<ite->toNum<<"\t";
|
||||
// writer<<ite->dg->capacity<<"\r\n";
|
||||
|
||||
@@ -45,7 +45,12 @@ bool PowerTransformer::derivedParse(QXmlStreamReader &reader)
|
||||
QString ratedMVA=reader.readElementText();
|
||||
bool ok;
|
||||
double _ratedMVA=ratedMVA.toDouble(&ok);
|
||||
this->powerTransformerRatedMVA_H=ok?_ratedMVA:-10000;
|
||||
double assignedMVA=ok?_ratedMVA:-10000;
|
||||
if(assignedMVA>5)
|
||||
{
|
||||
assignedMVA=0.63;
|
||||
}
|
||||
this->powerTransformerRatedMVA_H=assignedMVA;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user