-
Notifications
You must be signed in to change notification settings - Fork 0
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
Non evacuated energy computation #51
Conversation
Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
…computation Signed-off-by: Franck LECUYER <[email protected]> # Conflicts: # src/main/java/org/gridsuite/sensitivityanalysis/server/service/SensitivityAnalysisWorkerService.java
…s (like for other computation types) Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
…computation Signed-off-by: Franck LECUYER <[email protected]> # Conflicts: # src/main/java/org/gridsuite/sensitivityanalysis/server/service/SensitivityAnalysisInputBuilderService.java
Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
…computation Signed-off-by: Franck LECUYER <[email protected]> # Conflicts: # src/main/java/org/gridsuite/sensitivityanalysis/server/service/NotificationService.java # src/main/java/org/gridsuite/sensitivityanalysis/server/service/SensitivityAnalysisWorkerService.java
…computation Signed-off-by: Franck LECUYER <[email protected]> # Conflicts: # src/main/java/org/gridsuite/sensitivityanalysis/server/SensitivityAnalysisController.java # src/main/java/org/gridsuite/sensitivityanalysis/server/service/SensitivityAnalysisInputBuilderService.java
src/main/java/org/gridsuite/sensitivityanalysis/server/SensitivityAnalysisController.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/sensitivityanalysis/server/SensitivityAnalysisController.java
Outdated
Show resolved
Hide resolved
.../sensitivityanalysis/server/dto/nonevacuatedenergy/results/ContingencyStageDetailResult.java
Outdated
Show resolved
Hide resolved
...ensitivityanalysis/server/dto/nonevacuatedenergy/NonEvacuatedEnergyGeneratorLimitByType.java
Outdated
Show resolved
Hide resolved
...ite/sensitivityanalysis/server/dto/nonevacuatedenergy/NonEvacuatedEnergyStagesSelection.java
Outdated
Show resolved
Hide resolved
private Map<EnergySource, Double> pInitByEnergySource = new EnumMap<>(EnergySource.class); | ||
|
||
@Builder.Default | ||
private Map<String, ContingencyStageDetailResult> resultsbyContingency = new HashMap<>(); // key is null for N |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"N" instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or separate N result and contingency results ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: resultsBy
|
||
private Double percentOverload; | ||
|
||
private String contingencyId; // null if N |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"N" if N?
...itivityanalysis/server/entities/nonevacuatedenergy/NonEvacuatedEnergyGlobalStatusEntity.java
Show resolved
Hide resolved
...sensitivityanalysis/server/repositories/nonevacuatedenergy/NonEvacuatedEnergyRepository.java
Outdated
Show resolved
Hide resolved
...sensitivityanalysis/server/repositories/nonevacuatedenergy/NonEvacuatedEnergyRepository.java
Outdated
Show resolved
Hide resolved
...e/sensitivityanalysis/server/service/nonevacuatedenergy/NonEvacuatedEnergyWorkerService.java
Outdated
Show resolved
Hide resolved
...sensitivityanalysis/server/repositories/nonevacuatedenergy/NonEvacuatedEnergyRepository.java
Outdated
Show resolved
Hide resolved
* @author Franck Lecuyer <franck.lecuyer at rte-france.com> | ||
*/ | ||
@Getter | ||
public class NonEvacuatedEnergyRunContext { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close to the sensi version, can we have an abstraction?
/** | ||
* @author Franck Lecuyer <franck.lecuyer at rte-france.com> | ||
*/ | ||
public class NonEvacuatedEnergyResultContext { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close to the sensi version, can we have an abstraction?
* @author Franck Lecuyer <franck.lecuyer at rte-france.com> | ||
*/ | ||
@Service | ||
public class NonEvacuatedEnergyWorkerService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some methods can be shared with SensitivityAnalysisWorkerService
// the limit value multiplied by the input coefficient (nCoeff/nm1Coeff) | ||
if (contingencyIndex < 0) { // N | ||
if (monitoredBranchThreshold.isIstN()) { | ||
limitName = "IST"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add as constant at the top of the file?
...e/sensitivityanalysis/server/service/nonevacuatedenergy/NonEvacuatedEnergyWorkerService.java
Outdated
Show resolved
Hide resolved
...e/sensitivityanalysis/server/service/nonevacuatedenergy/NonEvacuatedEnergyWorkerService.java
Outdated
Show resolved
Hide resolved
...e/sensitivityanalysis/server/service/nonevacuatedenergy/NonEvacuatedEnergyWorkerService.java
Show resolved
Hide resolved
// loop until no more remaining or no more generators to dispatch or max iteration reached | ||
while (!finished) { | ||
i++; | ||
int j = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to boolean firstIteration?
// the sum of generator variation and generator capping is higher than the generator targetP : | ||
// we update the generator capping with the targetP and remove this generator from the generators to dispatch | ||
// we substract the delta between the generator targetP and the generator capping from the remaining | ||
variationsByEnergySource.put(generator.getEnergySource(), variationsByEnergySource.get(generator.getEnergySource()) + targetP - generatorCappings.get(generatorId).getCapping()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a variable deltaP for targetP - generatorCappings.get(generatorId).getCapping()
?
...e/sensitivityanalysis/server/service/nonevacuatedenergy/NonEvacuatedEnergyWorkerService.java
Outdated
Show resolved
Hide resolved
...e/sensitivityanalysis/server/service/nonevacuatedenergy/NonEvacuatedEnergyWorkerService.java
Outdated
Show resolved
Hide resolved
...e/sensitivityanalysis/server/service/nonevacuatedenergy/NonEvacuatedEnergyWorkerService.java
Outdated
Show resolved
Hide resolved
...e/sensitivityanalysis/server/service/nonevacuatedenergy/NonEvacuatedEnergyWorkerService.java
Outdated
Show resolved
Hide resolved
...e/sensitivityanalysis/server/service/nonevacuatedenergy/NonEvacuatedEnergyWorkerService.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- To validate this algorithm, a comparative study with CVG and the same input parameters should be done at some point.
- We should try to lower the number of sonar issues, we should be able to get close to 0 with some method extraction and fixes?
Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add business logs to understand what's going on in the process, it's hard to debug for now
Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
Adding reports Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
Signed-off-by: Franck LECUYER <[email protected]>
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 21 New issues |
No description provided.