-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix consistency, ensure that participationFactor > 0
Signed-off-by: Caio Luke <caio.luke@artelys.com>
- Loading branch information
cluke
committed
Jan 25, 2023
1 parent
28ff62e
commit c8cbf6c
Showing
5 changed files
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ public List<ParticipatingElement> getParticipatingElements(Collection<LfBus> bus | |
return buses.stream() | ||
.filter(bus -> bus.isParticipating() && !bus.isDisabled() && !bus.isFictitious()) | ||
.flatMap(bus -> bus.getGenerators().stream()) | ||
.filter(generator -> isParticipating(generator) && getParticipationFactor(generator) != 0) | ||
.filter(generator -> isParticipating(generator) && getParticipationFactor(generator) > 0) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jeandemanged
Member
|
||
.map(generator -> new ParticipatingElement(generator, getParticipationFactor(generator))) | ||
.collect(Collectors.toList()); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am not sure with this fix. I prefer that you put this in the
isParticipating(LfGeneror)
method and make the check specific to each balance type.