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

DBFS with multiple connections between sub grids #25

Merged
merged 50 commits into from
Aug 2, 2022

Conversation

ckittl
Copy link
Member

@ckittl ckittl commented Dec 13, 2021

Resolves #22
Resolves #129

Edit (SP): Please review #266 first!
Edit (SP): Test grid for DBFSAlgorithmCenGridSpec adapted to only have three inferior subgrids, one of which having two connections to the central subgrid

ckittl and others added 2 commits December 13, 2021 14:50
between agents in DBFS algorithm when there are multiple connections between two adjacent GridAgents.

Co-authored-by: sebastian-peter <sebastian.peter@tu-dortmund.de>
@ckittl ckittl added the bug Something isn't working label Dec 13, 2021
@ckittl ckittl requested a review from a team December 13, 2021 14:02
@ckittl ckittl self-assigned this Dec 13, 2021
@codecov
Copy link

codecov bot commented Dec 13, 2021

Codecov Report

Merging #25 (419bc1b) into dev (e7c9884) will increase coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##              dev      #25      +/-   ##
==========================================
+ Coverage   79.78%   79.84%   +0.05%     
==========================================
  Files         159      159              
  Lines        5838     5869      +31     
  Branches       80       81       +1     
==========================================
+ Hits         4658     4686      +28     
- Misses       1180     1183       +3     
Impacted Files Coverage Δ
...a/edu/ie3/simona/agent/grid/PowerFlowSupport.scala 79.06% <0.00%> (-1.33%) ⬇️
...in/scala/edu/ie3/simona/model/grid/GridModel.scala 73.68% <0.00%> (-1.00%) ⬇️
...in/scala/edu/ie3/simona/model/grid/RefSystem.scala 100.00% <0.00%> (ø)
...du/ie3/simona/agent/grid/ReceivedValuesStore.scala 100.00% <0.00%> (ø)
...cala/edu/ie3/simona/agent/grid/DBFSAlgorithm.scala 83.47% <0.00%> (+0.62%) ⬆️
...cala/edu/ie3/simona/agent/grid/GridAgentData.scala 90.27% <0.00%> (+0.72%) ⬆️
...a/edu/ie3/util/scala/quantities/QuantityUtil.scala 77.14% <0.00%> (+1.46%) ⬆️

Continue to review full report at Codecov.

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

Copy link
Member

@sebastian-peter sebastian-peter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small things I noticed

input/samples/vn_simona/vn_simona.conf Outdated Show resolved Hide resolved
@johanneshiry johanneshiry changed the base branch from dev_dep to dev December 16, 2021 09:53
@sonarqubegithubprchecks

This comment has been minimized.

@sonarqubegithubprchecks

This comment has been minimized.

@sonarqubegithubprchecks

This comment has been minimized.

@sonarqubegithubprchecks

This comment has been minimized.

@ckittl ckittl force-pushed the ck/#22-dbfsMultipleConnections branch from c650307 to 73dcc5a Compare February 8, 2022 12:26
@sebastian-peter
Copy link
Member

I guess #131 should be merged before this PR.

@johanneshiry johanneshiry marked this pull request as draft March 1, 2022 08:58
# Conflicts:
#	CHANGELOG.md
#	src/main/scala/edu/ie3/simona/config/ConfigFailFast.scala
#	src/main/scala/edu/ie3/simona/config/RefSystemParser.scala
#	src/main/scala/edu/ie3/simona/config/SimonaConfig.scala
#	src/test/scala/edu/ie3/simona/config/ConfigFailFastSpec.scala
#	src/test/scala/edu/ie3/simona/config/RefSystemParserSpec.scala
@sonarqubegithubprchecks

This comment has been minimized.

@sonarqubegithubprchecks

This comment has been minimized.

Copy link
Member

@danielfeismann danielfeismann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I just have minor things which might be taken into account.

Co-authored-by: Daniel Feismann <98817556+danielfeismann@users.noreply.github.com>
@sonarqubegithubprchecks

This comment has been minimized.

@sonarqubegithubprchecks
Copy link

Passed

Analysis Details

1 Issue

  • Bug0 Bugs
  • Vulnerability0 Vulnerabilities
  • Code Smell1 Code Smell

Coverage and Duplications

  • 90 percent coverage94.68% Coverage (81.90% Estimated after merge)
  • 3 percent duplication0.00% Duplicated Code (0.00% Estimated after merge)

Project ID: edu.ie3:simona

View in SonarQube

# Conflicts:
#	CHANGELOG.md
#	src/main/scala/edu/ie3/simona/agent/grid/PowerFlowSupport.scala
#	src/test/scala/edu/ie3/simona/agent/grid/DBFSAlgorithmCenGridSpec.scala
@sebastian-peter sebastian-peter marked this pull request as draft July 31, 2022 17:43
@sebastian-peter sebastian-peter marked this pull request as ready for review July 31, 2022 18:32
@sebastian-peter sebastian-peter changed the title Fix DBFS communication protocol DBFS with multiple connections between sub grids Jul 31, 2022
Copy link
Contributor

@t-ober t-ober left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work 🙃

Comment on lines 295 to 308

implicit class RichUnit[Q <: Quantity[Q]](
private val unit: measure.Unit[Q]
) extends AnyVal {

/** Transform some power unit to given unit with the same prefix
* @param targetUnit
* the target system unit
* @return
* this unit converted to given
*/
def toEquivalentIn(targetUnit: measure.Unit[Q]): measure.Unit[Q] =
targetUnit.transform(unit.getConverterTo(unit.getSystemUnit))
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to transfer this class (as well as the RichQuantity) into the PowerSystemUtils as it might come in handy for other projects as well and we already have som Quantity related utils there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with doing that at some point in time. I'd leave it in SIMONA until it's available in PSU.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ie3-institute/PowerSystemUtils#289

If you want to make a quick review we can add it while were at it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that was really quick. I removed RichUnit and RichQuantity here and replaced all calls with ones to the equivalents in PSU

Copy link
Member

@danielfeismann danielfeismann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@danielfeismann danielfeismann merged commit 0f08be8 into dev Aug 2, 2022
@danielfeismann danielfeismann deleted the ck/#22-dbfsMultipleConnections branch August 2, 2022 09:51
@sebastian-peter sebastian-peter added this to the Version 3.0 milestone Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Correctly finish grid simulation in inferior grids Adapt DBFS communication protocol
4 participants