Skip to content

Commit

Permalink
Clean
Browse files Browse the repository at this point in the history
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
  • Loading branch information
p-arvy committed Dec 16, 2024
1 parent 7f77212 commit b1ddbbe
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected static Generator createGenerator(Bus b, String id, double p, double v)
.setConnectableBus(b.getId())
.setEnergySource(EnergySource.OTHER)
.setMinP(0)
.setMaxP(2 * p)
.setMaxP(p)
.setTargetP(p)
.setTargetV(v)
.setVoltageRegulatorOn(true)
Expand Down Expand Up @@ -101,22 +101,14 @@ protected static Load createLoad(Bus b, String id, double p, double q) {
}

protected static Line createLine(Network network, Bus b1, Bus b2, String id, double x) {
return createLine(network, b1, b2, id, 0, x, 0, 0);
}

protected static Line createLine(Network network, Bus b1, Bus b2, String id, double r, double x, double halfG, double halfB) {
return network.newLine()
.setId(id)
.setBus1(b1.getId())
.setConnectableBus1(b1.getId())
.setBus2(b2.getId())
.setConnectableBus2(b2.getId())
.setR(r)
.setR(0)
.setX(x)
.setG1(halfG)
.setB1(halfB)
.setG2(halfG)
.setB2(halfB)
.add();
}

Expand Down

0 comments on commit b1ddbbe

Please sign in to comment.