Example #1
0
  @Test
  public void sampleTest() {
    AcscNetwork faultNet = CoreObjectFactory.createAcscNetwork();
    SampleCases.load_SC_5BusSystem(faultNet);
    // System.out.println(faultNet.net2String());

    assertTrue((faultNet.getBusList().size() == 5 && faultNet.getBranchList().size() == 5));

    SimpleFaultAlgorithm algo = CoreObjectFactory.createSimpleFaultAlgorithm(faultNet);
    AcscBusFault fault = CoreObjectFactory.createAcscBusFault("2", algo);
    fault.setFaultCode(SimpleFaultCode.GROUND_3P);
    fault.setZLGFault(new Complex(0.0, 0.0));
    fault.setZLLFault(new Complex(0.0, 0.0));

    algo.calculateBusFault(fault);
    // System.out.println(fault.toString(faultBus.getBaseVoltage(), faultNet.getBaseKva()));
    /*
    fault amps(1): (  0.0000 + j 32.57143) pu
    fault amps(2): (  0.0000 + j  0.0000) pu
    fault amps(0): (  0.0000 + j  0.0000) pu
    */
    assertTrue(
        TestUtilFunc.compare(
            fault.getFaultResult().getSCCurrent_012(), 0.0, 0.0, 0.0, 32.57142857157701, 0.0, 0.0));

    // System.out.println(AcscOut.faultResult2String(faultNet));
  }
Example #2
0
  @Test
  public void dslTest() {
    AcscNetwork faultNet = CoreObjectFactory.createAcscNetwork();
    SampleCases.load_SC_5BusSystem(faultNet);
    // System.out.println(faultNet.net2String());

    assertTrue((faultNet.getBusList().size() == 5 && faultNet.getBranchList().size() == 5));

    AcscFaultAnalysisXmlType acscCaseXml = createCase();
    IFaultResult result = new AcscDslODMRunner(faultNet).runAcsc(acscCaseXml);

    assertTrue(
        TestUtilFunc.compare(
            result.getSCCurrent_012(), 0.0, 0.0, 0.0, 32.57142857157701, 0.0, 0.0));
  }