Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PSSE raw import for gen_status at load buses #934

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KSepetanc
Copy link
Contributor

Fixes #932 .

PSSE ignores generators at load buses (bus type 1). It does not use this flag to determine if the generator is PV or PQ which is different from Matpower. Instead, it uses Machine Control Mode parameter found in panel Machine Data Record -> Wind Data -> Control Mode or in the Machine sheet.

As such fix needs to be implemented only for PSSE and there are no changes for Matpower. Thus, the only change is in src\io\psse.jl.

Consider adding Memento warning before merging.

Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.57%. Comparing base (30e3d39) to head (a7190d8).
Report is 4 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #934      +/-   ##
==========================================
- Coverage   94.06%   93.57%   -0.50%     
==========================================
  Files          43       42       -1     
  Lines        9665     9627      -38     
==========================================
- Hits         9091     9008      -83     
- Misses        574      619      +45     
Files with missing lines Coverage Δ
src/io/psse.jl 96.32% <100.00%> (-0.60%) ⬇️

... and 19 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 178ce13...a7190d8. Read the comment docs.

@KSepetanc
Copy link
Contributor Author

@ccoffrin can you review this please?

@ccoffrin
Copy link
Member

Sorry for the delay @KSepetanc. I have no way of verifying these semantics of PSSE. @jd-lara or @frederikgeth are you able to verify this behavior?

@KSepetanc, before merging we will need to add a test for this behavior so that we don't have a future regression.

@frederikgeth
Copy link
Collaborator

not able to verify, sorry, but can confirm he actual status of a machine is determined both by its status flag and the bus type code.

@KSepetanc
Copy link
Contributor Author

KSepetanc commented Nov 15, 2024

@ccoffrin I can not find any network in the PowerModels test/data/pti that has generator placed at load bus. I am not very comfortable modifying those frankenstein networks (presumably frankenstein_70.raw) as I do not know repercussions on other tests. I will need help with this.

test construct should be something like this (in test/psse.jl after transformer status tests):

    @testset "generator status" begin
        data_pti = PowerModels.parse_file("../test/data/pti/frankenstein_70.raw")

        gen_off = Set(["8", "9"]) # put names of inactive gens here
        for (i,gen) in data_pti["gen"]
            if i in gen_off
                @test gen["gen_status"] == 0
            else
                @test gen["gen_status"] == 1
            end
        end
    end

@KSepetanc
Copy link
Contributor Author

KSepetanc commented Nov 15, 2024

I have modified frankenstein_70.raw at but 1005 to load bus. Test has been added.

Do you think we need to add memento log in src/io/psse.jl line 214 for the case when bus type is 1 and gen["STAT"] is 1?

@KSepetanc
Copy link
Contributor Author

KSepetanc commented Nov 26, 2024

@ccoffrin do you have someone else who can check this? I would like to close this issue soon.

@KSepetanc
Copy link
Contributor Author

There is free trial version of PSSE with full computation support for up-to 50 buses. Can that help with the review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect behaviour for PSSE active generators at load buses
3 participants