deltaFlow
OutputFileCommon.H File Reference

Shared helpers (hostname/timestamp, bus-type counting, loss calc) used by the OutputFile writer classes (OutFileWriter, StaFileWriter, MsgFileWriter, DatFileWriter), so the small bits of business logic that all four formats repeat are defined exactly once. More...

#include <chrono>
#include <cmath>
#include <complex>
#include <string>
#include <unistd.h>
#include <Eigen/Dense>
#include <fmt/chrono.h>
#include <fmt/core.h>
#include "Data.H"
Include dependency graph for OutputFileCommon.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  OutputFileCommon::BusTypeCounts
 Bus type counts (Slack/PV/PQ). More...
 
struct  OutputFileCommon::BusTotals
 Aggregate bus totals (load/gen) used in the bus-data result tables. More...
 

Namespaces

namespace  OutputFileCommon
 Small pieces of business/formatting logic shared by all OutputFile writers.
 

Functions

std::string OutputFileCommon::hostname ()
 Returns the current hostname.
 
std::string OutputFileCommon::timestamp ()
 Returns the current timestamp string.
 
std::string OutputFileCommon::dateStr ()
 Returns the current date string.
 
std::string OutputFileCommon::timeStr ()
 Returns the current time string.
 
BusTypeCounts OutputFileCommon::countBusTypes (const BusData &busData)
 Counts buses by type (1=Slack, 2=PV, else PQ).
 
BusTotals OutputFileCommon::computeBusTotals (const BusData &busData)
 Computes total load/gen/injected Mvar across all buses.
 

Detailed Description

Shared helpers (hostname/timestamp, bus-type counting, loss calc) used by the OutputFile writer classes (OutFileWriter, StaFileWriter, MsgFileWriter, DatFileWriter), so the small bits of business logic that all four formats repeat are defined exactly once.

Behavior is byte-for-byte identical to the original OutputFile.H namespace: this file only relocates the duplicated helper logic, it does not change any formatting, field order, or computation.

Definition in file OutputFileCommon.H.