Example #1
0
 public IpssDStab setRefMachine(String refMachId) {
   if (dstabNet.getMachine(refMachId) != null)
     this.dstabAlgo.setRefMachine(dstabNet.getMachine(refMachId));
   else {
     IpssLogger.getLogger()
         .severe("No machine is found for the input " + refMachId + ", please check!");
   }
   return this;
 }
Example #2
0
  public DynamicEvent addBusFaultEvent(
      String faultBusId,
      SimpleFaultCode code,
      double startTime,
      double durationTime,
      Complex Zlg,
      Complex Zll) {
    // define an event, set the event id and event type.
    DynamicEvent event1 =
        DStabObjectFactory.createDEvent(
            "BusFault_" + code + "@" + faultBusId,
            "Bus Fault @" + faultBusId,
            DynamicEventType.BUS_FAULT,
            dstabNet);
    event1.setStartTimeSec(startTime);
    event1.setDurationSec(durationTime);

    // define a bus fault
    DStabBus faultBus = dstabNet.getDStabBus(faultBusId);
    AcscBusFault fault =
        CoreObjectFactory.createAcscBusFault("Bus Fault 3P@" + faultBusId, dstabNet);
    fault.setBus(faultBus);
    fault.setFaultCode(code);
    fault.setZLGFault(Zlg);
    fault.setZLLFault(Zll);

    // add this fault to the event, must be consist with event type definition before.
    event1.setBusFault(fault);
    return event1;
  }
Example #3
0
  public boolean initialize() {
    if (!dstabNet.isLfConverged()) {
      LfAlgoDSL aclfDsl = IpssAclf.createAclfAlgo(dstabNet);
      try {
        if (!aclfDsl.runLoadflow()) {
          IpssLogger.getLogger()
              .severe(
                  "Load flow is not converged, the first stage of Dstabnetwork initializaiton failed!");
          return false;
        }

      } catch (InterpssException e) {

        e.printStackTrace();
      }
    }
    return this.dstabAlgo.initialization();
  }