Skip to content

Commit

Permalink
Merge pull request #1125 from ie3-institute/df/#1124-InvalidGridExcep…
Browse files Browse the repository at this point in the history
…tion-message

Enhance exception message in case of InvalidGridException
  • Loading branch information
sebastian-peter authored Feb 5, 2025
2 parents 7402a89 + c8fbdd5 commit 1b44b7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Throw exception if the slack node is not directly conected to a transformer. [#525](https://github.com/ie3-institute/simona/issues/525)
- Added support for topologies without transformers and slack grids with multiple nodes [#1099](https://github.com/ie3-institute/simona/issues/1099)
- Checking the number of slack nodes [#1122](https://github.com/ie3-institute/simona/issues/1122)
- Enhance exception message in case of InvalidGridException [#1124](https://github.com/ie3-institute/simona/issues/1124)

### Changed
- Adapted to changed data source in PSDM [#435](https://github.com/ie3-institute/simona/issues/435)
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/simona/model/grid/GridModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ object GridModel {
noLines && noTransformers2w && noTransformers3w && (noOfNodes > noOfSlackNodes)
)
throw new InvalidGridException(
"The grid contains no basic branch elements (lines or transformers)."
f"The grid with subnet number ${gridModel.subnetNo} contains additional nodes beside the slack nodes and no basic branch elements (lines or transformers). This is invalid."
)

// slack
Expand Down

0 comments on commit 1b44b7e

Please sign in to comment.