-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Tempo extension for OverloadManagementsystem Trippings
Signed-off-by: CHIQUET Benoit <[email protected]>
- Loading branch information
Showing
18 changed files
with
493 additions
and
24 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
22 changes: 22 additions & 0 deletions
22
iidm/iidm-extensions/src/main/java/com/powsybl/iidm/network/extensions/TrippingTempo.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,22 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network.extensions; | ||
|
||
import com.powsybl.commons.extensions.Extension; | ||
import com.powsybl.iidm.network.OverloadManagementSystem; | ||
|
||
public interface TrippingTempo extends Extension<OverloadManagementSystem.Tripping> { | ||
String NAME = "trippingTempo"; | ||
|
||
@Override | ||
default String getName() { | ||
return NAME; | ||
} | ||
|
||
int getTempo(); | ||
} |
16 changes: 16 additions & 0 deletions
16
...iidm-extensions/src/main/java/com/powsybl/iidm/network/extensions/TrippingTempoAdder.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,16 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network.extensions; | ||
|
||
import com.powsybl.commons.extensions.ExtensionAdder; | ||
import com.powsybl.iidm.network.OverloadManagementSystem; | ||
|
||
public interface TrippingTempoAdder | ||
extends ExtensionAdder<OverloadManagementSystem.Tripping, TrippingTempo> { | ||
TrippingTempoAdder withTempo(int tempo); | ||
} |
22 changes: 22 additions & 0 deletions
22
...-extensions/src/main/java/com/powsybl/iidm/network/extensions/TrippingTempoContainer.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,22 @@ | ||
/** | ||
* Copyright (c) 2023, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network.extensions; | ||
|
||
import com.powsybl.commons.extensions.Extension; | ||
import com.powsybl.iidm.network.OverloadManagementSystem; | ||
|
||
public interface TrippingTempoContainer extends Extension<OverloadManagementSystem> { | ||
String NAME = "trippingTempo"; | ||
|
||
@Override | ||
default String getName() { | ||
return NAME; | ||
} | ||
|
||
OverloadManagementSystem.Tripping getTripping(); | ||
} |
15 changes: 15 additions & 0 deletions
15
...nsions/src/main/java/com/powsybl/iidm/network/extensions/TrippingTempoContainerAdder.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,15 @@ | ||
/** | ||
* Copyright (c) 2023, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network.extensions; | ||
|
||
import com.powsybl.commons.extensions.ExtensionAdder; | ||
import com.powsybl.iidm.network.OverloadManagementSystem; | ||
|
||
public interface TrippingTempoContainerAdder extends ExtensionAdder<OverloadManagementSystem, TrippingTempoContainer> { | ||
TrippingTempoContainerAdder withTempo(String tripping, int tempo); | ||
} |
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
37 changes: 37 additions & 0 deletions
37
...m-impl/src/main/java/com/powsybl/iidm/network/impl/extensions/TrippingTempoAdderImpl.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,37 @@ | ||
/** | ||
* Copyright (c) 2023, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network.impl.extensions; | ||
|
||
import com.powsybl.commons.extensions.AbstractExtensionAdder; | ||
import com.powsybl.iidm.network.OverloadManagementSystem; | ||
import com.powsybl.iidm.network.extensions.TrippingTempo; | ||
import com.powsybl.iidm.network.extensions.TrippingTempoAdder; | ||
|
||
public class TrippingTempoAdderImpl extends AbstractExtensionAdder<OverloadManagementSystem.Tripping, TrippingTempo> implements TrippingTempoAdder { | ||
private int tempo; | ||
|
||
protected TrippingTempoAdderImpl(OverloadManagementSystem.Tripping extendable) { | ||
super(extendable); | ||
} | ||
|
||
@Override | ||
protected TrippingTempo createExtension(OverloadManagementSystem.Tripping tripping) { | ||
return new TrippingTempoImpl(tripping, tempo); | ||
} | ||
|
||
@Override | ||
public TrippingTempoAdder withTempo(int tempo) { | ||
this.tempo = tempo; | ||
return this; | ||
} | ||
|
||
@Override | ||
public Class<TrippingTempo> getExtensionClass() { | ||
return TrippingTempo.class; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...rc/main/java/com/powsybl/iidm/network/impl/extensions/TrippingTempoAdderImplProvider.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,32 @@ | ||
/** | ||
* Copyright (c) 2023, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network.impl.extensions; | ||
|
||
import com.google.auto.service.AutoService; | ||
import com.powsybl.commons.extensions.ExtensionAdderProvider; | ||
import com.powsybl.iidm.network.OverloadManagementSystem; | ||
import com.powsybl.iidm.network.extensions.TrippingTempo; | ||
|
||
@AutoService(ExtensionAdderProvider.class) | ||
public class TrippingTempoAdderImplProvider implements | ||
ExtensionAdderProvider<OverloadManagementSystem.Tripping, TrippingTempo, TrippingTempoAdderImpl> { | ||
@Override | ||
public String getImplementationName() { | ||
return "Default"; | ||
} | ||
|
||
@Override | ||
public Class<TrippingTempoAdderImpl> getAdderClass() { | ||
return TrippingTempoAdderImpl.class; | ||
} | ||
|
||
@Override | ||
public TrippingTempoAdderImpl newAdder(OverloadManagementSystem.Tripping tripping) { | ||
return new TrippingTempoAdderImpl(tripping); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...c/main/java/com/powsybl/iidm/network/impl/extensions/TrippingTempoContainerAdderImpl.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) 2023, RTE (http://www.rte-france.com) | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network.impl.extensions; | ||
|
||
import com.powsybl.commons.extensions.AbstractExtensionAdder; | ||
import com.powsybl.iidm.network.OverloadManagementSystem; | ||
import com.powsybl.iidm.network.extensions.TrippingTempoContainer; | ||
import com.powsybl.iidm.network.extensions.TrippingTempoContainerAdder; | ||
|
||
public class TrippingTempoContainerAdderImpl extends AbstractExtensionAdder<OverloadManagementSystem, TrippingTempoContainer> implements TrippingTempoContainerAdder { | ||
private int tempo; | ||
private String tripping; | ||
|
||
protected TrippingTempoContainerAdderImpl(OverloadManagementSystem extendable) { | ||
super(extendable); | ||
} | ||
|
||
@Override | ||
protected TrippingTempoContainer createExtension(OverloadManagementSystem oms) { | ||
return new TrippingTempoContainerImpl(oms, tripping, tempo); | ||
} | ||
|
||
@Override | ||
public Class<? super TrippingTempoContainer> getExtensionClass() { | ||
return TrippingTempoContainer.class; | ||
} | ||
|
||
@Override | ||
public TrippingTempoContainerAdder withTempo(String tripping, int tempo) { | ||
this.tripping = tripping; | ||
this.tempo = tempo; | ||
return this; | ||
} | ||
} |
Oops, something went wrong.