×
Menu
Index

6.1.13.2 Methods Defined Here

open(filename) -> iesve.ResultsReader
Open an APS file and return a ResultsReader instance. Throws exception on error.
 
open_aps_data(filename) -> int
 Open an APS file, returns 1 on success, throws exception on file not found.
 
close() -> None
Close the results file, and releases all resources associated with the file.  It is recommended to close files as soon as possible to save resources.
 
get_all_apache_system_results(system_id, aps_var, variable level, [start_day], [end_day]) ->
    Dictionary of numpy array of floats, keyed by variable display name
Get the results for specified system + variable.  See units spreadsheet
for available variables and matching level.  See get_results for start_day
and end_day details.
 
get_all_component_process_results(room_id, index_in_room, aps_var, var_level, [start_day], [end_day]) ->  Dictionary of numpy array of floats, keyed by variable display name
Read the results for specified process variable.  See get_results for
start_day and end_day details.
 
get_all_opening_results(room_id, surface_index, opening_index, aps_var, [start_day], [end_day]->
    Dictionary of numpy array of floats, keyed by variable display name
Get the results for specified opening + variable.  See units spreadsheet
for available variables and matching level.  See get_results for start_day
and end_day details.
 
get_all_process_results(process_name, aps_var [start_day], [end_day]) ->
    Dictionary of numpy array of floats, keyed by variable display name
Read the results for specified process variable.  See get_results for
start_day and end_day details.
 
get_all_results(aps_var, var_level, [start_day], [end_day]) ->
    Dictionary of numpy array of floats, keyed by variable display name
Get the model-level results for specified variable.
See units spreadsheet for information on variable + level
If start_day and\or end_day are omitted, all available results will be
returned.  start_day = 1 means January 1, end_day = 365 is December 31st.
Check APS file firstday and lastday properties for valid range for file.
 
Note: results are always returned in metric units
 
get_all_room_results(room_id, aps_var, var_level, [start_day], [end_day]) ->
    Dictionary of numpy array of floats, keyed by variable display name
Get the results for specified room + variable.  See units spreadsheet
for available variables and matching level.  See get_results for start_day
and end_day details.
 
get_all_surface_results(room_id, aps_handle, aps_var, [start_day], [end_day]->
    Dictionary of numpy array of floats, keyed by variable display name
Get the results for specified surface + variable.  See units spreadsheet
for available variables and matching level.  See get_results for start_day
and end_day details.
 
get_all_weather_results(aps_var, [start_day], [end_day]->
    Dictionary of numpy array of floats, keyed by variable display name
Get the results for a weather variable.  See units spreadsheet for
available variables.  See get_results for start_day and end_day details.
 
get_apache_system_results( system_id, aps_var, vista_var, var_level, start_day = -1, end_day = -1 )
-> Numpy array of floats
Get the results for specified system + variable.  See variables list for available variables and matching level.  See get_results for start_day and end_day details.
 
get_apache_systems() -> list
Get list of Apache Systems in the results file.  Each list entry holds a tuple of (system name, system ID).
 
get_component_objects()
->  [(room ID, index in room, component name, [(variable name, variable unit, variable level)])]
Return the list of process component objects for this results file.  The variable unit can be used as an index into the units list returned from get_units().
 
get_component_process_results(room_id, index_in_room, aps_var, vista_var, var_level,
start_day = -1, end_day = -1)
-> Numpy array of floats
Read the results for specified process variable.  See get_results for start_day and end_day details.
 
get_conditioned_sizes()  -> (area, volume, number of rooms)
Returns a tuple containing the conditioned area, volume and number of rooms as recorded in the results file.
 
get_data_file_details(filename, date_time_format) -> dictionary
Get a dictionary of file details.
Dictionary keys are:
 
name
Filename (str)
calculated
File date/time (str)
profile_month_start
Name of start month (str)
profile_month_end
Name of end month (str)
 
 
get_hvac_component_results( component_id, component_type, var_name, start_day = -1, end_day = -1 )
-> Numpy array of floats
Get the results for HVAC Component ID + variable.  See variables list for available variables and matching level.  See get_results for start_day and end_day details.
 
The follow component types are currently available:
  1: HVAC_TYPE_ROOM
  2: HVAC_TYPE_SIMPLE_HEATING_COIL
  3: HVAC_TYPE_SIMPLE_COOLING_COIL
  4: VAC_TYPE_SPRAY_HUMIDIFIER
  5: HVAC_TYPE_STEAM_HUMIDIFIER
  6: HVAC_TYPE_TEMP_FLOW_CTRL
  7: HVAC_TYPE_JUNCTION
  8: HVAC_TYPE_DUCT
  9: HVAC_TYPE_EQUIP_HEAT_GAIN
 10: HVAC_TYPE_HEAT_RECOV
 11: HVAC_TYPE_TERMINAL_REHEAT
 12: HVAC_TYPE_TERMINAL_RECOOL
 13: HVAC_TYPE_BOILER
 14: HVAC_TYPE_CHILLER
 15: HVAC_TYPE_FAN
 16: HVAC_TYPE_DAMPER
17: HVAC_TYPE_VERSATEMP
18: HVAC_TYPE_UNITARY_COOLING
 19: HVAC_TYPE_WATERSIDE_ECON
 20: HVAC_TYPE_EWC_CHILLER
 21: HVAC_TYPE_HWB_BOILER
 22: HVAC_TYPE_ADIABATIC_DUCT
 23: HVAC_TYPE_EAC_CHILLER
 24: HVAC_TYPE_DX_COOLING
 25: HVAC_TYPE_ADVANCED_COOLING_COIL
 26: HVAC_TYPE_CHILLED_WATER_LOOP
 27: HVAC_TYPE_ADVANCED_HEATING_COIL
 28: HVAC_TYPE_HOT_WATER_LOOP
 29: HVAC_TYPE_GENERIC_HEAT_SOURCE
 30: HVAC_TYPE_AWHP
 31: HVAC_TYPE_AAHP
 32: HVAC_TYPE_SOLAR_WATER_HEATER
 33: HVAC_TYPE_HEAT_TRANSFER_LOOP
 34: HVAC_TYPE_WAHP
 35: HVAC_TYPE_GENERIC_COOLING_SOURCE
 36: HVAC_TYPE_ROOM_RADIATOR
 37: HVAC_TYPE_ROOM_CHILLED_CEILING
 38: HVAC_TYPE_CONDENSER_WATER_LOOP
 39: HVAC_TYPE_COOLING_TOWER
 40: HVAC_TYPE_FLUID_COOLER
 41: HVAC_TYPE_PRE_COOLING
 42: HVAC_TYPE_WATER_SOURCE_LOOP
 43: HVAC_TYPE_WATER_WATER_HX
 44: HVAC_TYPE_PCM_THERMAL_BATTERY
 45: HVAC_TYPE_PUMP
 46: HVAC_TYPE_VRF_INDOOR_HEAT
 47: HVAC_TYPE_VRF_INDOOR_COOL
 48: HVAC_TYPE_VRF_INDOOR_TYPE
 49: HVAC_TYPE_VRF_OUTDOOR
 50: HVAC_TYPE_SOLAR_AIRCOLLECTOR_BIST
 51: HVAC_TYPE_AIRFILTER
 52: HVAC_TYPE_PLENUM
 53: HVAC_TYPE_THERMAL_STORAGE_LOOP
 54: HVAC_TYPE_THERMAL_STORAGE_TANK
 55: HVAC_TYPE_TSD_VIRTUAL_CHILLER
 56: HVAC_TYPE_TSC_VIRTUAL_CHILLER
 
 
get_hvac_node_results(node_nr, layer_nr = -1, var_name, start_day = -1, end_day = -1)
-> Numpy array of floats
Get the results for HVAC Node.  Use layer_nr to specify multiplex layer, or -1 for plant-side node (outside of multiplex).  See variables list for available variables and matching level.  See get_results for start_day and end_day details.
 
get_opening_results( room_id, surface_index, opening_index, aps_var, vista_var, start_day = -1, end_day = -1 ) -> Numpy array of floats
Get the results for specified opening + variable.  See variables list for available variables and matching level.  See get_results for start_day and end_day details.
 
get_peak_results(roomID, [variables]) -> dictionary
Get the peak results of a series of variables at room-level, for the specified room.  Variables are specified by APS variable name (string).  Returns the peak value for each variable, using the variable name as dictionary key.
 
get_process_list() -> list
Return the list of process categories (strings) for this results file.
 
get_process_results( process_name, aps_var, vista_var, start_day = -1, end_day = -1 )
-> Numpy array of floats
Read the results for specified process variable.  See get_results for start_day and end_day details.
 
get_process_variables(process) -> list
For the process specified (one of the return values from GetProcessList), return the available process variables.   The returned list contains tuples of: (name, units).  The units can be used as an index into the units dictionary returned by get_units().
 
get_results(aps_var, vista_var, var_level, start_day = -1, end_day = -1 ) -> Numpy array of floats
Get the model-level results for specified variable. 
See variables list for information on variable + level details, as well as footnotes at the end of this section. 
If start_day and\or end_day are omitted, all available results will be returned.  start_day = 1 means January 1, end_day = 365 is December 31st.  start_day and end_day value of -1 means first and last available day respectively.  Check first_day and last_day properties for valid range for file.
Note: results are always returned in metric units
 
get_room_geometry_details([room ID]) -> list of dictionaries
get_room_geometry_details(roomID) -> dictionary
Returns a list of dictionaries for all requested room IDs.  You can also pass a single room ID string, in which case a single dictionary is returned.   All units are in m2.
Dictionary entries are:
opaque, glazed, internal_wall, external_wall, internal_glazed, num_open, num_surf external_glazed, rooflight, door, floor, ground_floor, ceiling, roof.
Note: glazing areas have construction frame dimensions applied (net glazed area, not gross opening area).
 
get_room_ids() -> [roomID]
Returns a list of room IDs for all rooms in the results file.
 
get_room_list() -> list
Returns a list of (room name, room ID, room area, room volume) tuples for all rooms in the results file.
 
get_room_results( room_id, aps_var, vista_var, var_level, start_day = -1, end_day = -1 )
-> Numpy array of floats
Get the results for specified room + variable.  See variables list for available variables and matching level.  See get_results for start_day and end_day details.
 
get_surface_results( room_id, aps_handle, aps_var, vista_var, start_day = -1, end_day = -1 )
-> Numpy array of floats
Get the results for specified surface + variable.  See variables list for available variables and matching level.  See get_results for start_day and end_day details.
 
get_energy_uses( used_only = True ) -> dictionary
Returns a dictionary of all (or only the used) energy uses in the file by id.
Each item is a dictionary containing information about a specific energy use.
Dictionary fields include:
    id
 the use id (iesve.EnergyUse)
    name
 the use name (string)
    tied_source_id
 the id of the source the use is fixed to, if any (iesve.EnergySource)
    used
 whether or not the use has any aps results (bool)
 
get_energy_sources( used_only = True ) -> dictionary
Returns a dictionary of all (or only the used) energy sources in the file by id.
Each item is a dictionary containing information about a specific energy source.
Dictionary fields include:
    cef
 the carbon emission factor of the source, used to convert kgC to kgCO2 (float)
    id
 the source id (iesve.EnergySource)
    name
 the source name (string)
    used
 whether or not the source has any aps results (bool)
 
get_energy_meters( used_only = True ) -> dictionary
Returns a dictionary of all (or only the used) energy meters in the file by id.
Each item is a dictionary containing information about a specific energy meter.
Dictionary fields include:
    has_subs
 whether or not the meter has any child (sub) meters (bool)
    id
 the meter id (iesve.EnergyMeter)
    name
 the meter name (string)
    parent_id
 the id of the parent meter this meter belongs to, if any (iesve.EnergyMeter)
    source_id
 the id of the source the meter is assigned to (iesve.EnergySource)
    used
 whether or not the meter has any aps results (bool)
 
get_energy_results( use_id = iesve.EnergyUse.unspecified, source_id = iesve.EnergySource.unspecified, meter_id = iesve.EnergyMeter.unspecified, type = 'e', add_subs = -1, start_day = -1, end_day = -1 )
-> Numpy array of floats or None
Returns the specified energy results given the use id, source id, meter id and type.
Setting type to 'e' or 'c' determines whether or not energy (W) or carbon (kgC) results are returned.
Setting add_subs to 1 or 0 determines whether or not parent meter results include or do not include child (sub) meter results.
When add_subs is -1 the option is ignored and the default behaviour will be applied.
See get_results for start_day and end_day details.
Example usage:
    get_energy_results() -> 'Total Energy'
    get_energy_results( source_id=elec ) -> 'Electricity'
    get_energy_results( source_id=elec, meter_id=1 ) -> 'Electricity: Meter 1'
    get_energy_results( use_id=prm_pumps ) -> 'Pumps'
    get_energy_results( use_id=prm_pumps, source_id=elec ) -> 'Pumps - Electricity'
    get_energy_results( use_id=prm_pumps, source_id=elec, meter_id=1 ) -> 'Pumps - Electricity: Meter 1'
 
get_energy_results_ex( use_ids = None, source_ids = None, type = 'e', start_day = -1, end_day = -1 )
-> Numpy array of floats or None
Returns the aggregated energy results for the specified use(s) and/or source(s).
The use_ids argument can be None, a single use id, or a list of use ids.
The source_ids argument can be None, a single source id, or a list of source ids.
At least one use or one source must be specified.
Setting type to 'e' or 'c' determines whether or not energy (W) or carbon (kgC) results are returned.
See get_results for start_day and end_day details.
 
get_units( ) -> dictionary
Get the list of results file units that are applicable to the loaded file.  The return value is a dictionary, keyed by unit type (string).  This unit type corresponds to the units_type field for APS variables, as well as the units for process variables.
 
Each units data field consists of another dictionary with 2 fields: ‘units_IP’ and ‘units_metric’.  These provide the conversion from APS raw data to both IP and metric display values.
The available unit data fields are:
 
divisor
offset
display_name
 
To achieve conversion of the raw APS results to display_name, divide the variable by divisor, and for temperatures also add offset (to convert degrees C to Fahrenheit).
 
For example, to display a ‘Power’ units variable in IP units:
aps_data = resultsfile.get_results(var_aps_name, var_model_level)
peak = np.max(aps_data)
aps_units = resultsfile.get_units()
power_units = aps_units['Power']
pu_ip = power_units['units_IP']
peak_IP = (peak / pu_ip['divisor']) + pu_ip['offset']
print('{} {}'.format(peak_IP, pu_ip['display_name'])
 
get_unmet_hours([excluded_room_ids])-> dictionary
Get unmet load hours data.
 
cooling
heating
 
 
get_variables ( ) -> list
Get the list of results file variables that are applicable to the loaded file.  The return value is a list of dictionaries, with each dictionary entry containing the various information fields for a variable.
Available data fields are:
aps_varname
APS result name.  Use this string for all ResultReader functions
display_name
the Vista / VistaPro name for this variable
model_level
variable level for ResultsReader function parameters
units_type
results unit for this variable.  Use this as index to unit dictionary
 
get_weather_results ( aps_var, vista_var, start_day = -1, end_day = -1 )
-> Numpy array of floats
Get the results for specified weather variable.  See variable list for available variables, matching level, and units.  See get_results for start_day and end_day details.