An EnergyMeter object has Registers which contain the accumulated values up through the last time step. The demand interval data is saved to disk during the solution. You have to read the CSV files after Solve command has completed. You will find a CSV file with the same name as the meter in a folder below the circuit data, for example:
where feeder47375 is the name of the Energymeter and test_singlePV3 is the name of the circuit or case. DI_yr_0 means "demand interval data for year 0".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to run a timeseries simulation using Python COM. Moreover, trying to access data directly using bytestream.
meter = circuit.Meters.First
while meter:
meterdata = {}
meter = circuit.Meters
meterdata["RegisterNames"] = meter.RegisterNames
meterdata["numberofRegisters"] = len(meterdata["RegisterNames"])
meterdata["RegisterValues"] = meter.RegisterValues
meterdata["numberofValues"] = len(meterdata["RegisterValues"])
meterdata["Name"] = meter.Name
meterdata["Count"] = meter.Count
Apparently the meter do not have channels like monitors. Is there a way to access system losses for each timestep.
I do see a sub openalldifiles(). I do not seem to understand the right way to use it.
Hi,
You can use the class Activecircuit.losses, which will deliver the losses of the active circuit in the form of a bytestream.
Best regards
Davis
Is it total losses for entire timeseries duration or the last time step?
An EnergyMeter object has Registers which contain the accumulated values up through the last time step. The demand interval data is saved to disk during the solution. You have to read the CSV files after Solve command has completed. You will find a CSV file with the same name as the meter in a folder below the circuit data, for example:
"C:\Users...\Inv_test_ckt\test_singlePV3\DI_yr_0\feeder47375.CSV"
where feeder47375 is the name of the Energymeter and test_singlePV3 is the name of the circuit or case. DI_yr_0 means "demand interval data for year 0".
ActiveCircuit.Losses give the total circuit losses for the most recent solution.