PowerSystems.jl icon indicating copy to clipboard operation
PowerSystems.jl copied to clipboard

PSS/E Parser - Branch Voltage endpoints

Open amirmm11 opened this issue 1 year ago • 1 comments

Considering a voltage difference (tolerance) in both ends when parsing branches.

in

function check_endpoint_voltages(line)
   is_valid = true
   arc = get_arc(line)
   if get_base_voltage(get_from(arc)) != get_base_voltage(get_to(arc))
       is_valid = false
       @error "Voltage endpoints of $(line.name) are different, cannot create Line"
   end
   return is_valid
end

to

function check_endpoint_voltages(line, tolerance=0.02)
    is_valid = true
    arc = get_arc(line)
    from_voltage = get_base_voltage(get_from(arc))
    to_voltage = get_base_voltage(get_to(arc))
    percent_difference = abs(from_voltage - to_voltage) / ((from_voltage + to_voltage) / 2)
    if percent_difference > tolerance
        is_valid = false
        @error "Voltage endpoints of $(line.name) have more than $(tolerance*100)% difference, cannot create Line"
    end

    return is_valid
end

amirmm11 avatar Jan 11 '24 20:01 amirmm11

@claytonpbarrows any thoughts on this?

jd-lara avatar Jun 25 '24 14:06 jd-lara