|
|
|
|
@@ -189,7 +189,6 @@ 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;
|
|
|
|
|
for(QList<TransformerStru>::iterator ite=this->tf.begin();
|
|
|
|
|
ite!=this->tf.end();
|
|
|
|
|
@@ -209,17 +208,7 @@ void CIMExporter::exportTo(const QString& path,const QString &rootID)
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// std::cout<<"sub id"<< subID.toStdString()<<" "<<sub->getID().toStdString()<<std::endl;
|
|
|
|
|
LoadMapping loadMapping;
|
|
|
|
|
QVector<QSharedPointer<LoadInfo> > vecLoadInfo=loadMapping.getSubstationLoad(sub->getID());
|
|
|
|
|
foreach(QSharedPointer<LoadInfo> p,vecLoadInfo)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
QFileInfo targetBasename(p->getLoadPath());
|
|
|
|
|
// std::cout<<"search for "<<targetBasename.baseName().toLocal8Bit().data()<<std::endl;
|
|
|
|
|
if( baseNames.contains( targetBasename.baseName()) and !usedLoad.contains(targetBasename.baseName()))
|
|
|
|
|
{
|
|
|
|
|
// std::cout<<targetBasename.baseName().toLocal8Bit().data()<<" used "<<std::endl;
|
|
|
|
|
usedLoad<<targetBasename.baseName();
|
|
|
|
|
writer<<seqN++<<seperator;
|
|
|
|
|
writer<<0<<seperator;//变压器区域
|
|
|
|
|
writer<<ite->fromNum<<seperator;
|
|
|
|
|
@@ -233,6 +222,19 @@ void CIMExporter::exportTo(const QString& path,const QString &rootID)
|
|
|
|
|
writer<<endLine;
|
|
|
|
|
//保存接地支路
|
|
|
|
|
groudBranch.push_back(CIMExporter::GroundBranch(ite->toNum, ite->tf->g1,ite->tf->b1));//都只用g1,b1的数据
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LoadMapping loadMapping;
|
|
|
|
|
QVector<QSharedPointer<LoadInfo> > vecLoadInfo=loadMapping.getSubstationLoad(sub->getID());
|
|
|
|
|
foreach(QSharedPointer<LoadInfo> p,vecLoadInfo)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
QFileInfo targetBasename(p->getLoadPath());
|
|
|
|
|
// std::cout<<"search for "<<targetBasename.baseName().toLocal8Bit().data()<<std::endl;
|
|
|
|
|
if( baseNames.contains( targetBasename.baseName()) and !usedLoad.contains(targetBasename.baseName()))
|
|
|
|
|
{
|
|
|
|
|
// std::cout<<targetBasename.baseName().toLocal8Bit().data()<<" used "<<std::endl;
|
|
|
|
|
usedLoad<<targetBasename.baseName();
|
|
|
|
|
//保存节点注入功率
|
|
|
|
|
nodePQ.push_back(CIMExporter::NodePQ(ite->toNum,p->get3PhP(),p->get3PhQ()));
|
|
|
|
|
// writer<<"type"<<"\t";
|
|
|
|
|
@@ -372,6 +374,7 @@ void CIMExporter::idToNumber(QList<T> &s)//把所有元件的标识进行编号
|
|
|
|
|
T _t=*ite;
|
|
|
|
|
_t.fromNum=this->numberIt(_t.fromID);
|
|
|
|
|
_t.toNum=this->numberIt(_t.toID);
|
|
|
|
|
std::cout<<"id "<<_t.id.toStdString()<<" "<<_t.fromNum<<" "<<_t.toNum<<std::endl;
|
|
|
|
|
*ite=_t;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|