1.加入几句代码只对有DG的线路做合并
2.把合并后总的头节点到每条线路头节点的阻抗改小为0.00001 Signed-off-by: dmy@lab <dmy@lab.lab>
This commit is contained in:
@@ -297,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*0.7,-ite->dg->getQG(0.95)/1000*0.7) );//capapcity的单位是kVA
|
||||
nodePQ.push_back(CIMExporter::NodePQ(ite->toNum,-ite->dg->getPG(0.999)/1000*0.5,-ite->dg->getQG(0.999)/1000*0.5) );//capapcity的单位是kVA
|
||||
// writer<<ite->fromNum<<"\t";
|
||||
// writer<<ite->toNum<<"\t";
|
||||
// writer<<ite->dg->capacity<<"\r\n";
|
||||
|
||||
@@ -28,7 +28,7 @@ bool TopologyRecorder::addDG(const QString& substationID, const QString &fromNod
|
||||
// std::cout<<"from node"<<fromNodeID.toStdString()<<std::endl;
|
||||
DG *DGP=new DG(fromTo,capacity,_DG->getName(),this);
|
||||
this->cimExporter.add(fromTo,DGP);
|
||||
std::cout<<"add "<<_DG->getName().toLocal8Bit().data()<<" to "<<substationID.toStdString() <<std::endl;
|
||||
std::cout<<"add "<<_DG->getName().toStdString()<<" to "<<substationID.toStdString() <<std::endl;
|
||||
this->usedDG[_DG->getName()]=0;//用过了,做个记号
|
||||
}
|
||||
return true;
|
||||
@@ -325,6 +325,11 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
||||
//把DG接在变压器旁边
|
||||
|
||||
this->addDG(static_cast<PowerTransformer *>(foundEle)->getEquipmentMemberOf_EquipmentContainer(),fromTo.first);
|
||||
|
||||
if(this->usedDG.keys().length()>0)
|
||||
{
|
||||
std::cout<<"contained DG"<<this->rootID.toStdString()<<std::endl;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user