You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This cannot work because we do not know the redistribution keys from the power values of devices # to the power values of buses. Leaving this here anyways to document this issue.functionset_system_time_step(sys::PSY.System, data::PowerFlowData; time_step =1)
@error("This function cannot work")
for bus in PSY.get_components(PSY.Bus, sys)
bus_number = data.bus_lookup[PSY.get_number(bus)]
bus_type = data.bus_type[bus_number, time_step]
sys_bus_type = sys.bustype # here we should be using the system bus type to know which inputs to modify# for REF bus, we don't need to set anythingif sys_bus_type == PSY.ACBusTypes.PV
# we need to modify the P value#TODO if we also modify time-series data for voltage set-points, also set that value. # However, we cannot do this easily because it can happen that the PV -> PQ transformation # caused a different Vm value as the result, while the set-point Vm is still the same. # We need a solution for this.
P_gen = data.bus_activepower_injection[bus_number, time_step]
Q_gen =0.0#TODO write time-series value of the bus back to devices (not possible)elseif sys_bus_type == PSY.ACBusTypes.PQ
P_gen = data.bus_activepower_injection[bus_number, time_step]
Q_gen = data.bus_reactivepower_injection[bus_number, time_step]
P_load = data.bus_activepower_withdrawals[bus_number, time_step]
Q_load = data.bus_reactivepower_withdrawals[bus_number, time_step]
#TODO write time-series value of the bus back to devices (not possible)endendend
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: