def make_monte_carlo_input(numerical_input_island: CalculationInputs): """ Generate a monte carlo input instance :param numerical_input_island: :return: """ n = numerical_input_island.nbus Scdf = [None] * n Icdf = [None] * n Ycdf = [None] * n for i in range(n): Scdf[i] = CDF(numerical_input_island.Sbus_prof[i, :]) Icdf[i] = CDF(numerical_input_island.Ibus_prof[i, :]) Ycdf[i] = CDF(numerical_input_island.Ysh_prof[i, :]) return MonteCarloInput(n, Scdf, Icdf, Ycdf)
def make_monte_carlo_input(numerical_input_island: TimeCircuit): """ Generate a monte carlo input instance :param numerical_input_island: :return: """ n = numerical_input_island.nbus Scdf = [None] * n Icdf = [None] * n Ycdf = [None] * n for i in range(n): Scdf[i] = CDF(numerical_input_island.Sbus[i, :]) Icdf[i] = CDF(numerical_input_island.Ibus[i, :]) Ycdf[i] = CDF(numerical_input_island.Yshunt_from_devices[i, :]) return MonteCarloInput(n, Scdf, Icdf, Ycdf)