Skip to content

Commit

Permalink
Add dispatch for StandardLoad and ExponentialLoad (#17)
Browse files Browse the repository at this point in the history
* update total p and q for standardload

* add exponential load get power
  • Loading branch information
rodrigomha authored Mar 7, 2023
1 parent b4ed76e commit f32f750
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/post_processing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,23 @@ function _get_total_q(l::PSY.PowerLoad)
end

function _get_total_p(l::PSY.StandardLoad)
return PSY.get_constant_active_power(l)
return PSY.get_constant_active_power(l) +
PSY.get_current_active_power(l) +
PSY.get_impedance_active_power(l)
end

function _get_total_q(l::PSY.StandardLoad)
return PSY.get_constant_reactive_power(l)
return PSY.get_constant_reactive_power(l) +
PSY.get_current_reactive_power(l) +
PSY.get_impedance_reactive_power(l)
end

function _get_total_p(l::PSY.ExponentialLoad)
return PSY.get_active_power(l)
end

function _get_total_q(l::PSY.ExponentialLoad)
return PSY.get_reactive_power(l)
end

"""
Expand Down

0 comments on commit f32f750

Please sign in to comment.