|
Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
|
In-memory / JSON-backed library of device gate results. More...
#include <PnP_library.h>
Public Member Functions | |
| void | clear () |
| void | add (const PnPDeviceRecord &rec) |
| void | addFromGate (const DeviceGateResult &gate, const std::string &device_type="") |
| const std::vector< PnPDeviceRecord > & | records () const |
| std::size_t | size () const |
| const PnPDeviceRecord * | find (const std::string &device_id) const |
| Lookup by id; returns nullptr if missing. | |
| bool | isAllowed (const std::string &device_id) const |
| True if id exists and allow==true. | |
| void | saveJson (const std::string &path) const |
| void | loadJson (const std::string &path) |
| void | saveCsv (const std::string &path) const |
| void | printSummary () const |
| Count of allow / block entries. | |
In-memory / JSON-backed library of device gate results.
Use after running evaluateDeviceGate on candidate converters; persist with saveJson / reload with loadJson for PnP screening.
| void PnPCertificateLibrary::add | ( | const PnPDeviceRecord & | rec | ) |
References PnPDeviceRecord::device_id.
Referenced by addFromGate().
| void PnPCertificateLibrary::addFromGate | ( | const DeviceGateResult & | gate, |
| const std::string & | device_type = "" |
||
| ) |
References add(), DeviceGateResult::allow, PnPDeviceRecord::allow, DeviceGateResult::device_id, PnPDeviceRecord::device_id, PnPDeviceRecord::device_type, PnPDeviceRecord::f_max_Hz, PnPDeviceRecord::f_min_Hz, CertificateSweep::freq_Hz, PnPDeviceRecord::notes, PnPDeviceRecord::phase_limit_deg, CertificateSweep::phase_limit_deg, DeviceGateResult::reason, DeviceGateResult::sweep, PnPDeviceRecord::worst_passivity, CertificateSweep::worst_passivity, PnPDeviceRecord::worst_phase_deg, CertificateSweep::worst_phase_deg, PnPDeviceRecord::worst_shifted, and CertificateSweep::worst_shifted.
Referenced by example_certificate_figures().
| void PnPCertificateLibrary::clear | ( | ) |
| const PnPDeviceRecord * PnPCertificateLibrary::find | ( | const std::string & | device_id | ) | const |
Lookup by id; returns nullptr if missing.
Referenced by isAllowed().
| bool PnPCertificateLibrary::isAllowed | ( | const std::string & | device_id | ) | const |
True if id exists and allow==true.
References find().
| void PnPCertificateLibrary::loadJson | ( | const std::string & | path | ) |
References PnPDeviceRecord::allow, PnPDeviceRecord::device_id, PnPDeviceRecord::device_type, PnPDeviceRecord::f_max_Hz, PnPDeviceRecord::f_min_Hz, j, PnPDeviceRecord::notes, PnPDeviceRecord::phase_limit_deg, PnPDeviceRecord::worst_passivity, PnPDeviceRecord::worst_phase_deg, and PnPDeviceRecord::worst_shifted.
| void PnPCertificateLibrary::printSummary | ( | ) | const |
Count of allow / block entries.
Referenced by example_certificate_figures().
|
inline |
| void PnPCertificateLibrary::saveCsv | ( | const std::string & | path | ) | const |
Referenced by example_certificate_figures().
| void PnPCertificateLibrary::saveJson | ( | const std::string & | path | ) | const |
Referenced by example_certificate_figures().
|
inline |