Menu

System losses for each time step while using Python COM

Adarsh
2015-08-09
2015-08-10
  • Adarsh

    Adarsh - 2015-08-09

    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.

     
  • Davis Montenegro

    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

     
  • Adarsh

    Adarsh - 2015-08-10

    Is it total losses for entire timeseries duration or the last time step?

     
  • Roger Dugan

    Roger Dugan - 2015-08-10

    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".

     
  • Roger Dugan

    Roger Dugan - 2015-08-10

    ActiveCircuit.Losses give the total circuit losses for the most recent solution.

     

Log in to post a comment.

MongoDB Logo MongoDB