DPsim
|
reads load profiles (csv files only) and assign them to the corresponding load object More...
#include <CSVReader.h>
Public Types | |
enum class | Mode { AUTO , MANUAL } |
enum class | DataFormat { HHMMSS , SECONDS , HOURS , MINUTES } |
Public Member Functions | |
CSVReader (String name, std::list< fs::path > path, Logger::Level logLevel) | |
CSVReader (String name, String path, Logger::Level logLevel) | |
CSVReader (String name, std::list< fs::path > path, std::map< String, String > &assignList, Logger::Level logLevel) | |
CSVReader (String name, String path, std::map< String, String > &assignList, Logger::Level logLevel) | |
Real | time_format_convert (const String &time) |
void | doSkipFirstRow (Bool value=true) |
Skip first row if it has no digits at beginning. | |
MatrixRow | csv2Eigen (const String &path) |
std::vector< PQData > | readLoadProfileDP (fs::path file, Real start_time=-1, Real time_step=1, Real end_time=-1, Real scale_factor=1, CSVReader::DataFormat format=CSVReader::DataFormat::SECONDS) |
void | assignLoadProfileDP (std::vector< std::shared_ptr< CPS::DP::Ph1::AvVoltageSourceInverterDQ > > &loads, Real start_time=-1, Real time_step=1, Real end_time=-1, Real scale_factor=1, CSVReader::Mode mode=CSVReader::Mode::AUTO, CSVReader::DataFormat format=CSVReader::DataFormat::SECONDS) |
PowerProfile | readLoadProfile (fs::path file, Real start_time=-1, Real time_step=1, Real end_time=-1, CSVReader::DataFormat format=CSVReader::DataFormat::SECONDS) |
std::vector< Real > | readPQData (fs::path file, Real start_time=-1, Real time_step=1, Real end_time=-1, CSVReader::DataFormat format=CSVReader::DataFormat::SECONDS) |
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 | |
void | assignPVGeneration (SystemTopology &sys, Real start_time=-1, Real time_step=1, Real end_time=-1, CSVReader::Mode mode=CSVReader::Mode::AUTO) |
PQData | interpol_linear (std::map< Real, PQData > &data_PQ, Real x) |
interpolation for PQ data points | |
Real | interpol_linear (std::map< Real, Real > &data_wf, Real x) |
interpolation for weighting factor data points | |
reads load profiles (csv files only) and assign them to the corresponding load object
Definition at line 28 of file CSVReader.h.
|
strong |
Definition at line 52 of file CSVReader.h.
|
strong |
set load profile assigning pattern. AUTO for assigning load profile name (csv file name) to load object with the same name (mName) MANUAL for providing an assign pattern manually. see power flow example: CIM/CIGRE_MV_PowerFlowTest_LoadProfiles.cpp
Definition at line 44 of file CSVReader.h.
CSVReader::CSVReader | ( | CPS::String | name, |
std::list< fs::path > | path, | ||
Logger::Level | logLevel ) |
Definition at line 87 of file CSVReader.cpp.
CSVReader::CSVReader | ( | CPS::String | name, |
CPS::String | path, | ||
Logger::Level | logLevel ) |
Definition at line 99 of file CSVReader.cpp.
CSVReader::CSVReader | ( | CPS::String | name, |
std::list< fs::path > | path, | ||
std::map< String, String > & | assignList, | ||
Logger::Level | logLevel ) |
Definition at line 117 of file CSVReader.cpp.
CSVReader::CSVReader | ( | CPS::String | name, |
CPS::String | path, | ||
std::map< String, String > & | assignList, | ||
Logger::Level | logLevel ) |
Definition at line 109 of file CSVReader.cpp.
void CSVReader::assignLoadProfile | ( | CPS::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
Definition at line 284 of file CSVReader.cpp.
MatrixRow CSVReader::csv2Eigen | ( | const String & | path | ) |
Definition at line 13 of file CSVReader.cpp.
|
inline |
Skip first row if it has no digits at beginning.
Definition at line 69 of file CSVReader.h.
PowerProfile CSVReader::readLoadProfile | ( | fs::path | file, |
Real | start_time = -1, | ||
Real | time_step = 1, | ||
Real | end_time = -1, | ||
CSVReader::DataFormat | format = CSVReader::DataFormat::SECONDS ) |
TODO : deprecate in the future read in load profile with time stamp format specified
Definition at line 172 of file CSVReader.cpp.
std::vector< PQData > CSVReader::readLoadProfileDP | ( | fs::path | file, |
Real | start_time = -1, | ||
Real | time_step = 1, | ||
Real | end_time = -1, | ||
Real | scale_factor = 1, | ||
CSVReader::DataFormat | format = CSVReader::DataFormat::SECONDS ) |
Definition at line 133 of file CSVReader.cpp.
std::vector< Real > CSVReader::readPQData | ( | fs::path | file, |
Real | start_time = -1, | ||
Real | time_step = 1, | ||
Real | end_time = -1, | ||
CSVReader::DataFormat | format = CSVReader::DataFormat::SECONDS ) |
Definition at line 249 of file CSVReader.cpp.
CPS::Real CSVReader::time_format_convert | ( | const String & | time | ) |
Convert HH:MM:SS format timestamp into total seconds. e.g.: 00 : 01 : 00 – > 60.
Definition at line 124 of file CSVReader.cpp.