2014-12-06 21:48:07 +08:00
|
|
|
#ifndef TOPOLOGYRECORDER_H
|
|
|
|
|
#define TOPOLOGYRECORDER_H
|
2014-12-28 16:40:57 +08:00
|
|
|
#include <QObject>
|
2014-12-06 21:48:07 +08:00
|
|
|
#include <QVector>
|
|
|
|
|
#include <QHash>
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <QPair>
|
2015-01-07 21:57:50 +08:00
|
|
|
#include <QTextStream>
|
2014-12-06 21:48:07 +08:00
|
|
|
#include "BasicElementInfo.h"
|
|
|
|
|
#include "breaker.h"
|
|
|
|
|
#include "aclinesegment.h"
|
|
|
|
|
#include "nodetoterminal.h"
|
|
|
|
|
#include "terminal.h"
|
2014-12-11 20:32:49 +08:00
|
|
|
#include "powertransformer.h"
|
2014-12-25 11:44:46 +08:00
|
|
|
#include "substation.h"
|
2014-12-25 16:21:20 +08:00
|
|
|
#include "busbarsection.h"
|
2014-12-25 21:35:06 +08:00
|
|
|
#include "disconnector.h"
|
2014-12-28 16:40:57 +08:00
|
|
|
#include "cimexporter.h"
|
2015-01-30 21:34:31 +08:00
|
|
|
#include "dginfo.h"
|
|
|
|
|
#include "dgmapping.h"
|
2014-12-28 16:40:57 +08:00
|
|
|
#include "element/branch.h"
|
|
|
|
|
#include "element/line.h"
|
|
|
|
|
#include "element/switch.h"
|
|
|
|
|
#include "element/transformer.h"
|
2015-01-30 21:34:31 +08:00
|
|
|
#include "element/dg.h"
|
2014-12-28 16:40:57 +08:00
|
|
|
class TopologyRecorder:public QObject
|
2014-12-06 21:48:07 +08:00
|
|
|
{
|
2014-12-28 16:40:57 +08:00
|
|
|
Q_OBJECT
|
|
|
|
|
class Type
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
enum EleType{AC=0,BREAKER,DISCONNECTOR,BS,TF};
|
|
|
|
|
};
|
|
|
|
|
|
2014-12-06 21:48:07 +08:00
|
|
|
public:
|
2015-01-22 11:09:20 +08:00
|
|
|
TopologyRecorder(const QHash<QString,BasicElementInfo *>& elementHT, const QVector<QString> &FDSet, const QString &loadFilePath,const QString &rootID, QObject *parent=0);
|
2014-12-25 21:35:06 +08:00
|
|
|
~TopologyRecorder();
|
2015-01-07 21:57:50 +08:00
|
|
|
void showContainerInfo(QTextStream &stream);
|
2014-12-06 21:48:07 +08:00
|
|
|
bool startWithNode(const QString& node);
|
2014-12-28 17:49:16 +08:00
|
|
|
void exportTo(const QString& path);
|
2014-12-06 21:48:07 +08:00
|
|
|
private:
|
|
|
|
|
NodeToTerminal nodeToTerminal;
|
|
|
|
|
const QHash<QString,BasicElementInfo *>& eleHT;
|
|
|
|
|
QHash<QString,char> reachedTerminal;
|
2014-12-25 21:35:06 +08:00
|
|
|
QVector<QString> tfs;
|
2015-01-06 20:51:19 +08:00
|
|
|
QVector<QString> FDSet;
|
2015-01-20 13:19:28 +08:00
|
|
|
CIMExporter cimExporter;
|
2015-01-15 17:19:06 +08:00
|
|
|
QHash<QString,char> hasAdded;
|
2015-01-22 11:09:20 +08:00
|
|
|
QString rootID;
|
2015-01-30 21:34:31 +08:00
|
|
|
QHash<QString,char> usedDG;
|
|
|
|
|
bool addDG(const QString &substationID,const QString& fromNodeID);
|
2014-12-25 21:54:03 +08:00
|
|
|
bool isEquipmentNeeded(const QString& substatinID);
|
2015-01-30 21:34:31 +08:00
|
|
|
|
2014-12-06 21:48:07 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // TOPOLOGYRECORDER_H
|