-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use of extension GeneratorFortescue from powsybl-core (#5)
Signed-off-by: Georges Steiner <[email protected]>
- Loading branch information
Showing
15 changed files
with
191 additions
and
217 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
78 changes: 0 additions & 78 deletions
78
sc-extensions/src/main/java/com/powsybl/sc/extensions/GeneratorFortescue.java
This file was deleted.
Oops, something went wrong.
72 changes: 0 additions & 72 deletions
72
sc-extensions/src/main/java/com/powsybl/sc/extensions/GeneratorFortescueAdder.java
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
...tensions/src/main/java/com/powsybl/sc/extensions/GeneratorFortescueAdderImplProvider.java
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
sc-extensions/src/main/java/com/powsybl/sc/extensions/GeneratorFortescueType.java
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Copyright (c) 2022, Jean-Baptiste Heyberger & Geoffroy Jamgotchian | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
package com.powsybl.sc.extensions; | ||
|
||
import com.powsybl.commons.extensions.AbstractExtension; | ||
import com.powsybl.iidm.network.Generator; | ||
|
||
/** | ||
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at gmail.com> | ||
*/ | ||
public class GeneratorFortescueType extends AbstractExtension<Generator> { | ||
|
||
public static final String NAME = "generatorFortescueType"; | ||
|
||
public enum GeneratorType { | ||
UNKNOWN, | ||
ROTATING_MACHINE, | ||
FEEDER; | ||
} | ||
|
||
private final GeneratorType generatorType; | ||
|
||
@Override | ||
public String getName() { | ||
return NAME; | ||
} | ||
|
||
public GeneratorFortescueType(Generator generator, GeneratorType generatorType) { | ||
super(generator); | ||
this.generatorType = generatorType; | ||
|
||
} | ||
|
||
public GeneratorType getGeneratorType() { | ||
return generatorType; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
sc-extensions/src/main/java/com/powsybl/sc/extensions/GeneratorFortescueTypeAdder.java
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright (c) 2022, Jean-Baptiste Heyberger & Geoffroy Jamgotchian | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
package com.powsybl.sc.extensions; | ||
|
||
import com.powsybl.commons.extensions.AbstractExtensionAdder; | ||
import com.powsybl.iidm.network.Generator; | ||
|
||
import static com.powsybl.sc.extensions.FortescueConstants.*; | ||
|
||
/** | ||
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at gmail.com> | ||
*/ | ||
public class GeneratorFortescueTypeAdder extends AbstractExtensionAdder<Generator, GeneratorFortescueType> { | ||
|
||
private GeneratorFortescueType.GeneratorType generatorType = DEFAULT_GENERATOR_FORTESCUE_TYPE; | ||
|
||
public GeneratorFortescueTypeAdder(Generator generator) { | ||
super(generator); | ||
} | ||
|
||
@Override | ||
public Class<? super GeneratorFortescueType> getExtensionClass() { | ||
return GeneratorFortescueType.class; | ||
} | ||
|
||
@Override | ||
protected GeneratorFortescueType createExtension(Generator generator) { | ||
return new GeneratorFortescueType(generator, generatorType); | ||
} | ||
|
||
public GeneratorFortescueTypeAdder withGeneratorType(GeneratorFortescueType.GeneratorType generatorType) { | ||
this.generatorType = generatorType; | ||
return this; | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...ions/src/main/java/com/powsybl/sc/extensions/GeneratorFortescueTypeAdderImplProvider.java
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Copyright (c) 2022, Jean-Baptiste Heyberger & Geoffroy Jamgotchian | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
package com.powsybl.sc.extensions; | ||
|
||
import com.google.auto.service.AutoService; | ||
import com.powsybl.commons.extensions.ExtensionAdderProvider; | ||
import com.powsybl.iidm.network.Generator; | ||
|
||
/** | ||
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at gmail.com> | ||
*/ | ||
@AutoService(ExtensionAdderProvider.class) | ||
public class GeneratorFortescueTypeAdderImplProvider implements ExtensionAdderProvider<Generator, GeneratorFortescueType, GeneratorFortescueTypeAdder> { | ||
|
||
@Override | ||
public String getImplementationName() { | ||
return "Default"; | ||
} | ||
|
||
@Override | ||
public String getExtensionName() { | ||
return GeneratorFortescueType.NAME; | ||
} | ||
|
||
@Override | ||
public Class<GeneratorFortescueTypeAdder> getAdderClass() { | ||
return GeneratorFortescueTypeAdder.class; | ||
} | ||
|
||
@Override | ||
public GeneratorFortescueTypeAdder newAdder(Generator generator) { | ||
return new GeneratorFortescueTypeAdder(generator); | ||
} | ||
} |
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
Oops, something went wrong.