com.powsybl.action.DanglingLineActionBuilder Maven / Gradle / Ivy
The newest version!
package com.powsybl.action;
public class DanglingLineActionBuilder extends AbstractLoadActionBuilder {
public DanglingLineActionBuilder withDanglingLineId(String danglingLineId) {
return withNetworkElementId(danglingLineId);
}
@Override
public String getType() {
return DanglingLineAction.NAME;
}
@Override
public DanglingLineAction build() {
if (this.getRelativeValue() == null) {
throw new IllegalArgumentException("For a load action, relativeValue must be provided");
}
if (this.getActivePowerValue() == null && this.getReactivePowerValue() == null) {
throw new IllegalArgumentException("For a load action, activePowerValue or reactivePowerValue must be provided");
}
return new DanglingLineAction(this.getId(), this.getElementId(), this.getRelativeValue(), this.getActivePowerValue(),
this.getReactivePowerValue());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy