-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add notification when move connectable
Signed-off-by: Slimane AMAR <[email protected]>
- Loading branch information
Slimane AMAR
committed
Oct 2, 2024
1 parent
9436977
commit 1fd93ea
Showing
6 changed files
with
149 additions
and
22 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
...ore-iidm-impl/src/main/java/com/powsybl/network/store/iidm/impl/BusTopologyPointImpl.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,59 @@ | ||
/** | ||
* 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/. | ||
*/ | ||
package com.powsybl.network.store.iidm.impl; | ||
|
||
import com.powsybl.iidm.network.BusTopologyPoint; | ||
import com.powsybl.iidm.network.TopologyKind; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* @author Slimane Amar <slimane.amar at rte-france.com> | ||
*/ | ||
public class BusTopologyPointImpl implements BusTopologyPoint { | ||
|
||
private final String voltageLevelId; | ||
|
||
private final String connectableBusId; | ||
|
||
private final boolean connected; | ||
|
||
public BusTopologyPointImpl(String voltageLevelId, String connectableBusId, boolean connected) { | ||
this.voltageLevelId = Objects.requireNonNull(voltageLevelId); | ||
this.connectableBusId = Objects.requireNonNull(connectableBusId); | ||
this.connected = connected; | ||
} | ||
|
||
@Override | ||
public TopologyKind getTopologyKind() { | ||
return TopologyKind.BUS_BREAKER; | ||
} | ||
|
||
@Override | ||
public String getVoltageLevelId() { | ||
return voltageLevelId; | ||
} | ||
|
||
@Override | ||
public String getConnectableBusId() { | ||
return connectableBusId; | ||
} | ||
|
||
@Override | ||
public boolean isConnected() { | ||
return connected; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "NodeTopologyPoint(" + | ||
"voltageLevelId='" + voltageLevelId + '\'' + | ||
", connectableBusId='" + connectableBusId + '\'' + | ||
", connected=" + connected + | ||
')'; | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...re-iidm-impl/src/main/java/com/powsybl/network/store/iidm/impl/NodeTopologyPointImpl.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,50 @@ | ||
/** | ||
* 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/. | ||
*/ | ||
package com.powsybl.network.store.iidm.impl; | ||
|
||
import com.powsybl.iidm.network.NodeTopologyPoint; | ||
import com.powsybl.iidm.network.TopologyKind; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* @author Slimane Amar <slimane.amar at rte-france.com> | ||
*/ | ||
public class NodeTopologyPointImpl implements NodeTopologyPoint { | ||
|
||
private final String voltageLevelId; | ||
|
||
private final int node; | ||
|
||
public NodeTopologyPointImpl(String voltageLevelId, int node) { | ||
this.voltageLevelId = Objects.requireNonNull(voltageLevelId); | ||
this.node = node; | ||
} | ||
|
||
@Override | ||
public TopologyKind getTopologyKind() { | ||
return TopologyKind.NODE_BREAKER; | ||
} | ||
|
||
@Override | ||
public String getVoltageLevelId() { | ||
return voltageLevelId; | ||
} | ||
|
||
@Override | ||
public int getNode() { | ||
return node; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "NodeTopologyPoint(" + | ||
"voltageLevelId='" + voltageLevelId + '\'' + | ||
", node=" + node + | ||
')'; | ||
} | ||
} |
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