utils

Functions

assert_limits(net, settings)

Check that the network operates within the operation limits and assert an error if not

check_limits(net, settings)

Check that the network operates within the operation limits and print it

check_limits_bool(net, settings)

Check that the network operates within the operation limits and return True(feasible)/False(not feasible)

check_line_current_limits(net[, upper_limit])

Check if the power flow result on the network caused respects the loading limitations in all lines

check_trafo_current_limits(net[, upper_limit])

Check if the power flow result on the network caused respects the loading limitations in all transformers

check_voltage_limits(voltages, upper_limit, ...)

Check if the power flow result on the network caused respects the voltage limitations in all lines

create_result_df(x_flexible, x_non_flexible, ...)

Sve Monte Carlo simulation result on the folder :param x_flexible: feasible P, :type x_flexible: list of floats

fix_missing_point(mat)

Filter in case the sampling of FSP shifts was wrong and left a point behind, it is observed in the power flow

fix_missing_pointsv2(mat)

Filter in case the sampling of FSP shifts was wrong and left a point behind, it is observed in the power flow

fix_net(net)

Fix the initial network structure

get_input_busses_pq(net, input_buses)

Get P and Q of all bus indices in {input_buses} list

get_input_busses_v(net, input_buses)

Get voltage magnitude v and angle θ of all bus indices in {input_buses} list

get_input_lines_pq(net, input_lines)

Get P and Q of all line indices in {input_lines} list

kumaraswamymontecarlo(a, b, c, LB, UB, ...)

Create samples using the Kumaraswamy Monte Carlo distribution

tensor_convolve_nd_torch(image, kernel)

Apply tensor convolution

tensor_convolve_nd_torch_half(image, kernel)

Apply tensor convolution, but with float32 types (might run into issues exceeding the maximum number)

update_pqs(net[, flex_wt, flex_pv, profile, ...])

Update network DG FSP P,Q based on the input values

update_pqs2(net[, flex_dg, profile])

Update network DG FSP P,Q based on the input profile

update_pqs_wl(net[, flex_wt, flex_pv, ...])

Update network FSP P,Q including loads based on the input values

update_pqs_wl2(net, profile[, load_ind, dg_ind])

Update load and distributed generator output values.

update_pqs_wl2_aliander(net, profile[, ...])

Update PQ values using Aliander's PGM

write_conv_result(df, name)

Write results from convolution simulations

write_result(x_flexible, x_non_flexible, ...)

Sve Monte Carlo simulation result on the folder