Skip to content

OpPoDyn: stateless powerflow #256

@hexaeder

Description

@hexaeder

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions