Curves and dependencies

These are auxiliary object that are used to manage data-points, mainly electrical characteristics and time-dependent quantities, for sequential simulations (duty-cycle, etc.) of a Circuit. Typical examples are inverter efficiencies, memorized in Curve (with ‘xycurve’ parameter), temperature profiles (Curve with ‘thsape’ parameter) and Load histories, memorized in loadshapes.

CsvLoadshape

class krangpower._components.CsvLoadshape(name='', csv_path=None, column_scheme=None, interval=None, use_actual=True, npts=None)

Allows to specify a Loadshape that refers to a CSV file. Requires a path. The name of the loadshape will be the same as the file basename. Automatically recognizes if header is present or not.

Parameters:
  • name (str) – the loadshape name.
  • csv_path (str) – the csv file path.
  • column_scheme (dict) – A dictionary of one or more int:<’hour’|’mult’|’qmult’> couples that associate the column with one of the hour, mult and qmult properties.
  • interval (_pint_qty_type) – length of step in the data as a pint unit with dimension [time]. If unspecified or None the first column of the csv will be used as the vector of times, that can be, in general, non uniformly spaced.
  • use_actual (bool) – setting this to False indicates that you want to use the data values in the csv to rescale the base value of the DSS object, rather than using the values directly.
  • npts (int) – the number of points to load from the csv. If None, all the lines in the csv will be loaded in the loadshape. If greater than the number of lines in the csv, the lines will be tiled from the beginning. Please note that, since the automatic determination of the number of datapoints requires opening the csv and counting the rows, specifying this parameter, when possible, will grant a speed-up, especially for big files and/or multiple imports.
eltype = 'CsvLoadshape'
fcs(**hookup)
fullname
get_at_hour
get_at_row
has_hour()
static isabove()

Returns True if the class is an above-graph component, like a monitor or regulator, False otherwise.

classmethod isai()

Returns true if the class is ai-enabled, False otherwise.

static isnamed()

Returns True if the class is a named entity, like a LineCode, False otherwise.

jsonize()
peek()
uses_actual

XYCurve

class krangpower._components.Curve(name, curve_type, data, interval=None)
fcs()
classmethod isabove()

Returns True if the class is an above-graph component, like a monitor or regulator, False otherwise.

classmethod isai()

Returns true if the class is ai-enabled, False otherwise.

static isnamed()

Returns True if the class is a named entity, like a LineCode, False otherwise.

jsonize(all_params=False, flatten_mtx=True)
x
y
z