-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
using #255 , we should be able to define a "stateless" powerflow solution
pf_object = powerflow(nw, s0=get_defaults(nw_static))
# pf object might be a dataframe or such for manual inspection
pf_interface_values = get_interface_states(pf_object)
# this is essentially a dict of dict of interface variables, i.e.
# VIndex(1) => Dict(:u_r=1.0, :u_i=0.0, :i_r=0.1, :i_i=0.1)
# VIndex(2) ...
# for all edges and vertices
s0 = initialize(nw, pf_interface_values)
initialize
(no !
) could essentially do something like
s0 = NWState(nw, fillp=NaN, fillu=NaN)
for c in component_idxs
model = nw[c]
metadata_defaults = get_defaults(model)
defaults = merge(metadata_defaults, pf_interface_values[c])
guesses = get_guesses(model)
inits, res = initialize_component(nw[c], defaults, guesses)
@assert res is small
initialized_state = merge(defaults, inits)
s0[c] = initialized_state # fill flat state representation with initialized state
end
The additional constraints/explicit initialization is considered inside initialize_component
according to #255.
Metadata
Metadata
Assignees
Labels
No labels