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

Address issue 1164 for Source by adding needs_conversion #1270

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

GabrielKS
Copy link
Collaborator

Fixes #1164 as it pertains to Source.

@GabrielKS GabrielKS self-assigned this Jan 30, 2025
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.35%. Comparing base (718f842) to head (073e1d8).
Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1270   +/-   ##
=======================================
  Coverage   84.35%   84.35%           
=======================================
  Files         183      183           
  Lines        8451     8451           
=======================================
  Hits         7129     7129           
  Misses       1322     1322           
Flag Coverage Δ
unittests 84.35% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/models/generated/Source.jl 93.75% <100.00%> (ø)

GabrielKS added a commit to NREL-Sienna/PowerFlows.jl that referenced this pull request Jan 31, 2025
@jd-lara jd-lara merged commit 44d3325 into main Jan 31, 2025
11 checks passed
jd-lara added a commit to NREL-Sienna/PowerFlows.jl that referenced this pull request Feb 5, 2025
* add raw psy -> psse exporter code

* Run formatter

* Code cleanup: remove machine-specific paths, add dependencies

* Code cleanup: minor edits to make `Write_Sienna2PSSE` run

* Add prefixes, adjust imports to make standalone scripts work

* Add `DISABLED_TEST_FILES` option like in PowerSimulations

* Add compat for new dependencies

* Begin work on a formal exporter interface

* Add rough draft tests for exporter interface

* Add `update_exporter!(..., System)`, extensively refactor tests

* PSSE exporter: test AC powerflow on reimport, minor test refactor

* Begin implementing routine to update a `System` from a `PowerFlowData`

* Finish first draft of `update_system!`

* Exporter: add round trip generator name remapping

* Exporter: add round trip *bus* name remapping

* Add round trip branch name remapping, RTS_GMLC tests, more test tweaks

* Add load zone name mapping, test verbosity; make RTS_GMLC tests pass

* Implement `update_exporter!` for `PowerFlowData`, build out RTS tests

* Reimplement Case Identification Data and Bus Data export (untested)

Those sections being

* Reimplement Load Data and Fixed Bus Shunt Data export (untested)

* Reimplement Generator Data and Non-Transformer Branch Data export

(untested)

* Reimplement Transformer Data export (first draft, untested)

* Implement Zone Data export, keep track of unimplemented sections

* Add option for customary comments at end of group, etc.

* Support `PowerLoad`s

* Use new `IS.compare_values` interface

* Revamp reimport remappers, etc. so tests fully pass with both systems

* Remove old exporter implementation

* Address minor PR comments, migrate from JSON.jl to JSON3.jl

* Minor `end_group` refactor

* Multiply dispatch on export groups: part 1

* Multiply dispatch on export groups: part 2

* Add `write_comments` test

* Remove more old code

* Fix power limits units, fix redistribution calls, power flow is broken

* Remove old dependency and TODOs, fix some power flow testing

* add abstract type

* add branch types for the PowerFlowData

* time_step clean up

* add methods and types

* add clear method

* Do not copy time series when `deepcopy`ing for PSS/E export

* Reduce arguments to `write_export`

* Add optional extra data to `PowerFlowData`

* Factor out egregious `PowerFlowData` constructor code duplication

* Add overwrite option to PSS/E export

* Create a `PSSEExportPowerFlow` `PowerFlowData` using `extra_data`

* Fix `clear_injection_data!` bug, other minor code cleanup

* Create `PowerFlowContainer` type hierarchy, supporting infrastructure

* Remove `extra_data` from `PowerFlowData`

* Make `PowerFlowData` tests actually test something

* `PSSEExporter`: Add `name`, `step`, and `overwrite` fields

* Better accommodate multi period in PSS/E export

* Misc code cleanup following self-review

* Minor test fixes

* Implement `get_total_p`, `q` for `InterruptiblePowerLoad`

* Exporter: allow for null area, load zone

* Strictly specify `vPTDFPowerFlowData`, fix bug 50

* Add detail to `deepcopy_system_no_time_series`

* Gracefully skip tests when file is missing

* Refactor test data path

* Exporter: tighten test comparisons, remove unused helper functions

* Refactor test export directory

* PSSE reimport: add `shunt_name_formatter`

* PSSE exporter: remove rest of old testing

* Make exporter more flexible

* PERF: reuse export buffer, cache component lists

* PERF: cache serialized exporter metadata

* PERF: use existing buffer for `show(::IOBuffer, ::Float64)`

* Fix `show` optimization compatibility

* PERF: unroll `joinln` loops by hand (ugh)

* WIP: implement NR power flow function, rename ACPowerFlow to NLSolveACPowerFlow, introduce KLUACPowerFlow for the use in the new NR power flow function

* WIP: some bugfixes in the PF function

* small changes

* KLU PF: use correct V0; return x in expected format; write results function supports KLU PF; implement tests for KLUACPowerFlow

* reformat code

* formatting

* Addressed review comments except for using functor

* formatter

* small fix ACPowerFlow type; add test for results consistency for 2000 bus system

* small change

* optimize NR code to reduce memory allocations

* trying to reduce memory allocation

* Use PSY's `with_units_base`

See NREL-Sienna/PowerSystems.jl#1232

* Use PSY's `fast_deepcopy_system`

* PERF: remove try/catch in tight loop, cache more

* NR PF non-allocating

* vectorized update for dSbus_dV

* fixes Add `solve_powerflow!` for AC power flow #49

* formatting

* WIP: multiperiod AC PF

* adrressing comments

* wip: multiperiod ac pf

* Modify `PowerFlowData` fields for multi-period AC PF

* Add `to_from` vs. `from_to` distinction to `PowerFlowData`

* Modify `PowerFlowData` constructors given new fields

* Make tests pass with new `PowerFlowData` fields

* wip: solve_powerflow!

* integrate previous changes to powersystemdata

* remove a println

* small change to _update_system!

* Implement power flow-specific (re)active power limits proxies (#79)

Fixes #39

* Fix `ACPowerFlow` method overwriting

* Remove old/obsolete TODOs

* add field "converged" to PowerFlowData, return NaN when not converged

* Fix typing of empty vector from `get_name.`

* wip: SolverData, penalty factors

* fix penalty factors function

* bugfix shape penalty factors

* Update dependencies

* Comment out broken tests

* Add fields to `PowerFlowEvaluationModel`s

* Address some exporter TODOs, misc cleanup

* implement yft, ytf calculations in solve_powerflow!

* adjust for the changes in PNM

* formatter

* Fine-tune exporter interface, minor cleanup

* Move reimporting code to PSY

* Reform export metadata file, make tests pass

* More thoroughly exercise new PSY reimporting interface

* Reduce manual computation by relying on a new PSY bugfix

Depends on NREL-Sienna/PowerSystems.jl#1270

* Fix `yft`, `ytf` typos

* clean up code for release

* time_step removed where not relevant

* add multi-period pf for nlsolve, test to compare results across solvers for multi-period pf

* formatter

* docstrings

* Add `Storage` to exporter, resolve minor TODOs

* Address PR comments

* address PR comments

---------

Co-authored-by: HaleyRoss <[email protected]>
Co-authored-by: Jose Daniel Lara <[email protected]>
Co-authored-by: Roman Bolgaryn <[email protected]>
Co-authored-by: Roman Bolgaryn <[email protected]>
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.

Unit Conversion Inconsistency Between Types
2 participants