cimforreduceloss/testHasttable/topologyrecorder.h

57 lines
1.5 KiB
C
Raw Normal View History

#ifndef TOPOLOGYRECORDER_H
#define TOPOLOGYRECORDER_H
#include <QObject>
#include <QVector>
#include <QHash>
#include <QString>
#include <QPair>
#include <QTextStream>
#include "BasicElementInfo.h"
#include "breaker.h"
#include "aclinesegment.h"
#include "nodetoterminal.h"
#include "terminal.h"
#include "powertransformer.h"
#include "substation.h"
#include "busbarsection.h"
#include "disconnector.h"
#include "cimexporter.h"
#include "dginfo.h"
#include "dgmapping.h"
#include "element/branch.h"
#include "element/line.h"
#include "element/switch.h"
#include "element/transformer.h"
#include "element/dg.h"
class TopologyRecorder:public QObject
{
Q_OBJECT
class Type
{
public:
enum EleType{AC=0,BREAKER,DISCONNECTOR,BS,TF};
};
public:
TopologyRecorder(const QHash<QString,BasicElementInfo *>& elementHT, const QVector<QString> &FDSet, const QString &loadFilePath,const QString &rootID, QObject *parent=0);
~TopologyRecorder();
void showContainerInfo(QTextStream &stream);
bool startWithNode(const QString& node);
void exportTo(const QString& path);
private:
NodeToTerminal nodeToTerminal;
const QHash<QString,BasicElementInfo *>& eleHT;
QHash<QString,char> reachedTerminal;
QVector<QString> tfs;
QVector<QString> FDSet;
CIMExporter cimExporter;
QHash<QString,char> hasAdded;
QString rootID;
QHash<QString,char> usedDG;
bool addDG(const QString &substationID,const QString& fromNodeID);
bool isEquipmentNeeded(const QString& substatinID);
};
#endif // TOPOLOGYRECORDER_H