1.加入几句代码只对有DG的线路做合并
2.把合并后总的头节点到每条线路头节点的阻抗改小为0.00001 Signed-off-by: dmy@lab <dmy@lab.lab>
This commit is contained in:
parent
4d4ca8eb5f
commit
7802a7961d
|
|
@ -177,7 +177,7 @@ class MergeReconfigFile: # 合并重构用文件
|
|||
addNum += len(ipsodata.GetNodePower())
|
||||
#用一个总的头节点把之前所有线路的头节点连接起来
|
||||
for b in self.__balanceNodeOffset:
|
||||
self.__mergedIpsoLine.append ([indLine, 1 , b, 0.0001, 0.01, 0, 0])
|
||||
self.__mergedIpsoLine.append ([indLine, 1 , b, 0.00001, 0.01, 0, 0])
|
||||
self.__basicInfo[0][1]+=1
|
||||
indLine+=1
|
||||
self.__mergedIpsoLoad.insert(0,[1, n[1], 1,n[3], 0, 0, 0, 0, 0, 0])
|
||||
|
|
|
|||
|
|
@ -14,7 +14,15 @@ def prepareFiles():
|
|||
|
||||
|
||||
if __name__=='__main__':
|
||||
# 714泰林西乙线
|
||||
# 730泰港乙线
|
||||
# 705林港I线
|
||||
# 706林港II线
|
||||
# 724创业乙线
|
||||
# 727泰林东乙线
|
||||
# 713泰林东甲线
|
||||
fileList=[r"D:\MyPro\cimforreduceloss\testHasttable\output\pan\701港前南线.txt",r"D:\MyPro\cimforreduceloss\testHasttable\output\pan\702高尔夫I线.txt"]
|
||||
fileList=[r"D:\MyPro\cimforreduceloss\testHasttable\output\pan\727泰林东乙线.txt",r"D:\MyPro\cimforreduceloss\testHasttable\output\pan\714泰林西乙线.txt",r"D:\MyPro\cimforreduceloss\testHasttable\output\pan\730泰港乙线.txt",r"D:\MyPro\cimforreduceloss\testHasttable\output\pan\713泰林东甲线.txt",r"D:\MyPro\cimforreduceloss\testHasttable\output\pan\724创业乙线.txt",r"D:\MyPro\cimforreduceloss\testHasttable\output\pan\706林港Ⅱ线.txt",r"D:\MyPro\cimforreduceloss\testHasttable\output\pan\705林港I线.txt"]
|
||||
fileList=prepareFiles()
|
||||
# fileList=[r"D:\MyPro\cimforreduceloss\testHasttable\output\pan\702高尔夫I线.txt"]
|
||||
m=MergeReconfigFile(fileList)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue