1.修复了上一次提交的bug
2.修复了from和to中的to不是node的bug Signed-off-by: dmy@lab <dmy@lab.lab>
This commit is contained in:
parent
5cd6849e95
commit
9259da0e93
|
|
@ -99,8 +99,8 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
|||
if(ce.startsWith("AC"))
|
||||
{
|
||||
QString acID=ce;
|
||||
fromTo.first=node;
|
||||
fromTo.second=acID;
|
||||
// fromTo.first=node;
|
||||
// fromTo.second=acID;
|
||||
ACLineSegment *AC=static_cast<ACLineSegment *>(ht[acID]);
|
||||
if(!AC)
|
||||
{
|
||||
|
|
@ -121,8 +121,8 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
|||
{
|
||||
// std::cout<<bi->getName().toStdString()<<std::endl;
|
||||
QString swID=ce;
|
||||
fromTo.first=node;
|
||||
fromTo.second=swID;
|
||||
// fromTo.first=node;
|
||||
// fromTo.second=swID;
|
||||
Breaker *SW=static_cast<Breaker *>(ht[swID]);
|
||||
if(!SW)
|
||||
{
|
||||
|
|
@ -155,8 +155,8 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
|||
// std::cout<<"Dissw not belong "<<disConID.toStdString()<<std::endl;
|
||||
continue;
|
||||
}
|
||||
fromTo.first=node;
|
||||
fromTo.second=disConID;
|
||||
// fromTo.first=node;
|
||||
// fromTo.second=disConID;
|
||||
|
||||
if(!Dis)
|
||||
{
|
||||
|
|
@ -223,8 +223,8 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
|||
if(this->isEquipmentNeeded(equipmentContainer))
|
||||
{
|
||||
this->tfs.push_back(tfID);
|
||||
fromTo.first=node;
|
||||
fromTo.second=tfID;
|
||||
// fromTo.first=node;
|
||||
// fromTo.second=tfID;
|
||||
foundEle=tf;
|
||||
}
|
||||
else
|
||||
|
|
@ -237,14 +237,24 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
|||
if(foundEle)
|
||||
{
|
||||
Branch *branch=NULL;
|
||||
switch(typ)
|
||||
QString nextTerminal;
|
||||
nextTerminal=(terminalA==anotherTerminal)?terminalB:terminalA;
|
||||
Terminal *nextTerminalP=static_cast<Terminal *>(ht[nextTerminal]);
|
||||
if(!nextTerminalP)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//有可能会访问到重复的元件,所以这里判断一下,如果是已经访问过的就不添加了。
|
||||
if(this->hasAdded.contains(foundEle->getID()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
this->hasAdded[foundEle->getID()]=0;
|
||||
QString nextNode=nextTerminalP->getConnectivityNode();
|
||||
fromTo.first=node;
|
||||
fromTo.second=nextNode;
|
||||
switch(typ)
|
||||
{
|
||||
case TopologyRecorder::Type::AC:
|
||||
branch=new Line(fromTo,static_cast<ACLineSegment *>(foundEle),this);
|
||||
this->cimExporter.add(fromTo,static_cast<Line *>(branch));
|
||||
|
|
@ -264,14 +274,7 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
QString nextTerminal;
|
||||
nextTerminal=(terminalA==anotherTerminal)?terminalB:terminalA;
|
||||
Terminal *nextTerminalP=static_cast<Terminal *>(ht[nextTerminal]);
|
||||
if(!nextTerminalP)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
QString nextNode=nextTerminalP->getConnectivityNode();
|
||||
|
||||
this->startWithNode(nextNode);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue