-
Notifications
You must be signed in to change notification settings - Fork 0
/
logreader.h
61 lines (47 loc) · 1.29 KB
/
logreader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef LOGREADER_H
#define LOGREADER_H
#include <QDir>
#include <QStringList>
#include <QHash>
class LogReader
{
public:
LogReader(QDir *directory);
void Refresh();
int GetMaxSims();
int GetCurSims();
double GetMinStepLength();
double GetMaxStepLength();
double GetCurStepLength();
QString GetTentBestUuid();
double GetTentBestOFValue();
int GetCurrentIteration();
QList<QPair<QString, double> > GetTentBestVariableValues();
QVector<double> GetObjectiveFunctionValues();
private:
QDir *directory_;
QString lp_settings_ = "";
QString lp_cases_ = "";
QString lp_uuidmap_ = "";
QString lp_optimization_ = "";
QString lp_simulation_ = "";
QString getPropertyName(QString uuid);
class CsvFile
{
public:
CsvFile(QString path);
QStringList GetHeaders();
QStringList GetColumnValues(QString column_header);
private:
QStringList headers_;
QHash<QString, QStringList> columns_;
QStringList readFile(QString path);
QVector<QVector<QString> > buildCsvMatrix(QStringList lines);
};
CsvFile *log_settings_ = 0;
CsvFile *log_cases_ = 0;
CsvFile *log_uuidmap_ = 0;
CsvFile *log_optimization_ = 0;
CsvFile *log_simulation_ = 0;
};
#endif // LOGREADER_H