35 std::list<fs::path> mFileList;
37 std::map<String, String> mAssignPattern;
39 Bool mSkipFirstRow =
true;
44 enum class Mode { AUTO, MANUAL };
52 enum class DataFormat { HHMMSS, SECONDS, HOURS, MINUTES };
55 CSVReader(String name, std::list<fs::path> path, Logger::Level logLevel);
57 CSVReader(String name, String path, Logger::Level logLevel);
59 CSVReader(String name, std::list<fs::path> path,
60 std::map<String, String> &assignList, Logger::Level logLevel);
62 CSVReader(String name, String path, std::map<String, String> &assignList,
63 Logger::Level logLevel);
71 MatrixRow csv2Eigen(
const String &path);
73 std::vector<PQData> readLoadProfileDP(
74 fs::path file, Real start_time = -1, Real time_step = 1,
75 Real end_time = -1, Real scale_factor = 1,
76 CSVReader::DataFormat format = CSVReader::DataFormat::SECONDS);
78 void assignLoadProfileDP(
79 std::vector<std::shared_ptr<CPS::DP::Ph1::AvVoltageSourceInverterDQ>>
81 Real start_time = -1, Real time_step = 1, Real end_time = -1,
83 CSVReader::DataFormat format = CSVReader::DataFormat::SECONDS);
88 fs::path file, Real start_time = -1, Real time_step = 1,
90 CSVReader::DataFormat format = CSVReader::DataFormat::SECONDS);
93 readPQData(fs::path file, Real start_time = -1, Real time_step = 1,
95 CSVReader::DataFormat format = CSVReader::DataFormat::SECONDS);
100 CSVReader::DataFormat format = CSVReader::DataFormat::SECONDS);
102 void assignPVGeneration(
SystemTopology &sys, Real start_time = -1,
103 Real time_step = 1, Real end_time = -1,
128class CSVReaderIterator {
130 CSVReaderIterator(std::istream &str);
133 CSVReaderIterator &next();
134 CSVReaderIterator next(Int);
135 CSVReaderIterator &step(Int time_step);
136 CSVRow const &operator*()
const {
return m_row; };
137 Bool operator==(CSVReaderIterator
const &rhs) {
138 return ((
this == &rhs) || ((this->m_str == NULL) && (rhs.m_str == NULL)));
140 Bool operator!=(CSVReaderIterator
const &rhs) {
return !((*this) == rhs); }
void assignLoadProfile(SystemTopology &sys, Real start_time=-1, Real time_step=1, Real end_time=-1, CSVReader::Mode mode=CSVReader::Mode::AUTO, CSVReader::DataFormat format=CSVReader::DataFormat::SECONDS)
assign load profile to corresponding load object