arras-energy / gridlabd

Arras Energy simulator
https://www.arras.energy/
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

Tape drops fields when units specified #33

Closed dchassin closed 1 year ago

dchassin commented 1 year ago

Problem description

Steps to reproduce

Try the following

module powerflow;
module tape
{
    csv_header_type NAME;
}
clock
{
    timezone "PST+8PDT";
    starttime "2022-01-01 00:00:00 PST";
    stoptime "2023-01-01 00:00:00 PST";
}
object meter
{
    nominal_voltage 12.47 kV;
    phases ABCD;
    object recorder
    {
        file ${modelname/.glm/.csv};
        property "measured_real_power[MW],measured_reactive_power[MVAr]";
        interval 1h;
    };
}

The output is missing the second field:

timestamp,measured_real_power[MW],measured_reactive_power[MVAr]
2022-01-01 00:00:00 PST,+0 MW
2022-01-01 01:00:00 PST,+0 MW
2022-01-01 02:00:00 PST,+0 MW

Expected behavior

Disable the line units in the recorder:

module powerflow;
module tape
{
    csv_header_type NAME;
}
clock
{
    timezone "PST+8PDT";
    starttime "2022-01-01 00:00:00 PST";
    stoptime "2023-01-01 00:00:00 PST";
}
object meter
{
    nominal_voltage 12.47 kV;
    phases ABCD;
    object recorder
    {
        file ${modelname/.glm/.csv};
        property "measured_real_power[MW],measured_reactive_power[MVAr]";
        interval 1h;
        line_units NONE;
    };
}

The second is now present:

timestamp,measured_real_power[MW],measured_reactive_power[MVAr]
2022-01-01 00:00:00 PST,+0,+0
2022-01-01 01:00:00 PST,+0,+0
2022-01-01 02:00:00 PST,+0,+0