GridCal.Engine package

GridCal.Engine.maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

Subpackages

Submodules

GridCal.Engine.basic_structures module

class GridCal.Engine.basic_structures.BranchImpedanceMode

Bases: enum.Enum

An enumeration.

Lower = 2
Specified = 0
Upper = 1
class GridCal.Engine.basic_structures.BusMode

Bases: enum.Enum

An enumeration.

NONE = (4,)
PQ = (1,)
PV = (2,)
REF = (3,)
STO_DISPATCH = 5
class GridCal.Engine.basic_structures.CDF(data)

Bases: object

Inverse Cumulative density function of a given array of data

get_at(prob)

Samples a number of uniform distributed points and returns the corresponding probability values given the CDF. @param prob: probability from 0 to 1 @return: Corresponding CDF value

get_sample(npoints=1)

Samples a number of uniform distributed points and returns the corresponding probability values given the CDF. @param npoints: Number of points to sample, 1 by default @return: Corresponding probabilities

plot(ax=None)

Plots the CFD @param ax: MatPlotLib axis to plot into @return:

class GridCal.Engine.basic_structures.MIPSolvers

Bases: enum.Enum

An enumeration.

CBC = 'CBC'
CPLEX = 'CPLEX'
GUROBI = 'Gurobi'
XPRESS = 'Xpress'
class GridCal.Engine.basic_structures.StatisticalCharacterization(gen_P, load_P, load_Q)

Bases: object

Object to store the statistical characterization It is useful because the statistical characterizations can be: - not grouped - grouped by day - grouped by hour

get_sample(load_enabled_idx, gen_enabled_idx, npoints=1)

Returns a 2D array containing for load and generation profiles, shape (time, load) The profile is sampled from the original data CDF functions

@param npoints: number of sampling points @return: PG: generators profile S: loads profile

plot(ax)

Plot this statistical characterization @param ax: matplotlib index @return:

class GridCal.Engine.basic_structures.TimeGrouping

Bases: enum.Enum

An enumeration.

Daily = 'Daily'
Hourly = 'Hourly'
Monthly = 'Monthly'
NoGrouping = 'No grouping'
Weekly = 'Weekly'
GridCal.Engine.basic_structures.classify_by_day(t: pandas.core.indexes.datetimes.DatetimeIndex)

Passes an array of TimeStamps to an array of arrays of indices classified by day of the year @param t: Pandas time Index array @return: list of lists of integer indices

GridCal.Engine.basic_structures.classify_by_hour(t: pandas.core.indexes.datetimes.DatetimeIndex)

Passes an array of TimeStamps to an array of arrays of indices classified by hour of the year @param t: Pandas time Index array @return: list of lists of integer indices

GridCal.Engine.basic_structures.get_time_groups(t_array: pandas.core.indexes.datetimes.DatetimeIndex, grouping: GridCal.Engine.basic_structures.TimeGrouping)

Get the indices delimiting a number of groups :param t_array: DatetimeIndex object containing dates :param grouping: TimeGrouping value :return: list of indices that determine the partitions

GridCal.Engine.grid_analysis module

class GridCal.Engine.grid_analysis.TimeSeriesResultsAnalysis(numerical_circuit: GridCal.Engine.Core.numerical_circuit.NumericalCircuit, results: GridCal.Engine.Simulations.PowerFlow.time_series_driver.TimeSeriesResults)

Bases: object

GridCal.Engine.plot_config module