CFPRIME ASWINT                                                          ASWINT      1
C***********************************************************************RIGHTE      1
C*                                                                     *RIGHTE      2
C*        Extended Transient-Midterm Stability Program (ETMSP)         *RIGHTE      3
C*        ====================================================         *RIGHTE      4
C*                                                                     *RIGHTE      5
C*       Copyright (C) (1993) Electric Power Research Institute        *RIGHTE      6
C*                                                                     *RIGHTE      7
C* EPRI reserves all rights in the software and associated             *RIGHTE      8
C* documentation as delivered. The software and its associated         *RIGHTE      9
C* documention or any portion thereof may not be reproduced in any form*RIGHTE     10
C* whatsoever without the consent of EPRI, except as explicity provided*RIGHTE     11
C* for by license. Licensee shall submit a detailed description to EPRI*RIGHTE     12
C* of any changes or modifications to the software within two (2)      *RIGHTE     13
C* months after such changes or modifications are made. At EPRI's sole *RIGHTE     14
C* discretion, the software, as changed or modified, shall be given a  *RIGHTE     15
C* new designation sufficiently different from its then current        *RIGHTE     16
C* designation as to prevent mistake,confusion, or deception as between*RIGHTE     17
C* the current software as changed or modified.                        *RIGHTE     18
C*                                                                     *RIGHTE     19
C* A license under EPRI's rights in the software can be obtained       *RIGHTE     20
C* directly from EPRI.                                                 *RIGHTE     21
C*                                                                     *RIGHTE     22
C* This program and supporting materials may be independently available*RIGHTE     23
C* from Electric Power Software centre (EPSC) for an appropriate       *RIGHTE     24
C* distribution fee. The EPSC is a service of                          *RIGHTE     25
C*                                                                     *RIGHTE     26
C*                    Power Computing Company                          *RIGHTE     27
C*                    1930 Hi Line                                     *RIGHTE     28
C*                    Dallas, Tx 75207                                 *RIGHTE     29
C*                                                                     *RIGHTE     30
C* NEITHER EPRI, ANY MEMBER OF EPRI, NOR ANY PERSON OR  ORGANIZATION   *RIGHTE     31
C* ACTING ON BEHAVE OF THEM:                                           *RIGHTE     32
C*                                                                     *RIGHTE     33
C* 1. MAKE ANY WARRANTY OR REPRESENTATION WHATSOEVER, EXPRESS OR       *RIGHTE     34
C*    IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS OR *RIGHTE     35
C*    ANY PURPOSE WITH RESPECT TO THE SOFTWARE OR ITS ASSOCIATED       *RIGHTE     36
C*    DOCUMENTATION; OR                                                *RIGHTE     37
C*                                                                     *RIGHTE     38
C* 2. ASSUMES ANY LIABILITY WHATSOEVER WITH RESPECT TO ANY USE OF THE  *RIGHTE     39
C*    SOFTWARE OR ITS ASSOCIATED DOCUMENTATION OR ANY PORTION THEREOF  *RIGHTE     40
C*    OR WITH RESPECT TO ANY DAMAGES WHICH MAY RESULT FROM SUCH USE.   *RIGHTE     41
C*                                                                     *RIGHTE     42
C* THIS NOTICE MAY NOT BE REMOVED FROM THE SOFTWARE BY ANY USER        *RIGHTE     43
C* THEREOF.                                                            *RIGHTE     44
C*                                                                     *RIGHTE     45
C***********************************************************************RIGHTE     46
      SUBROUTINE ASWINT                                                 ASWINT      3
CD                                                                      ASWINT      4
CD    THIS IS THE MAIN DRIVER FOR AUTOMATIC RELAY INITIALIZATION.       ASWINT      5
CD                                                                      ASWINT      6
      INCLUDE 'PARX.INS'                                                ASWINT      7
      INCLUDE 'CNPT.INS'                                                ASWINT      8
      INCLUDE 'CNB4.INS'                                                ASWINT      9
      INCLUDE 'CNLUN.INS'                                               ASWINT     10
      INCLUDE 'CNUNIT.INS'                                              ASWINT     11
      INCLUDE 'CNAUTO.INS'                                              ASWINT     12
C                                                                       ASWINT     13
      CHARACTER*80  SIMBUF                                              ASWINT     14
C                                                                       ASWINT     15
      IEBK=0                                                            ASWINT     16
C                                                                       ASWINT     17
C   INITIALIZE THE UFVDB RELAYS                                         ASWINT     18
C                                                                       ASWINT     19
      IF(NUFVDB.NE.0)CALL LSHINT(IEBK)                                  ASWINT     20
C                                                                       ASWINT     21
C   INITIALIZE THE UFREQ RELAYS                                         ASWINT     22
C                                                                       ASWINT     23
      IF(NUFREQ.NE.0)CALL UFLINT(IEBK)                                  ASWINT     24
C                                                                       ASWINT     25
C   INITIALIZE THE VDLDR RELAYS                                         ASWINT     26
C                                                                       ASWINT     27
      IF(NVDLDR.NE.0)CALL VDLINT(IEBK)                                  ASWINT     28
C                                                                       ASWINT     29
C   INITIALIZE THE GUFRE RELAYS                                         ASWINT     30
C                                                                       ASWINT     31
      IF(NGUFRE.NE.0)CALL GUFINT(IEBK)                                  ASWINT     32
C                                                                       ASWINT     33
C   INITIALIZE THE UFLTRE RELAYS                                        ASWINT     34
C                                                                       ASWINT     35
      IF(NUFLTR.NE.0)CALL FLTINT(IEBK)                                  ASWINT     36
C                                                                       ASWINT     37
C   INITIALIZE THE SCGRE RELAYS                                         ASWINT     38
C                                                                       ASWINT     39
      IF(NSCGRE.NE.0)THEN                                               ASWINT     40
       CALL AUTLIN                                                      ASWINT     41
       CALL SCGINT(IEBK)                                                ASWINT     42
      ENDIF                                                             ASWINT     43
C                                                                       ASWINT     44
C   INITIALIZE THE DIST RELAYS                                          ASWINT     45
C                                                                       ASWINT     46
      IF(NDISTR.NE.0)CALL DISINT(IEBK)                                  ASWINT     47
C                                                                       ASWINT     48
C    INITIALIZE THE RATE OF CHANGE OF POWER RELAYS                      ASWINT     49
C                                                                       ASWINT     50
      IF(NRCPRA.NE.0)CALL RCPINT(IEBK)                                  ASWINT     51
C                                                                       ASWINT     52
C    INITIALIZE THE POWER ANGLE RELAYS                                  ASWINT     53
C                                                                       ASWINT     54
      IF(NDPDA.NE.0)CALL DPAINT(IEBK)                                   ASWINT     55
C                                                                       ASWINT     56
C                                                                       ASWINT     57
C    INITIALIZE THE DOUBLE LENS SHAPE OUT-OF-STEP RELAYS                ASWINT     58
C                                                                       ASWINT     59
      IF(NDLSO.NE.0)CALL DLSINT(IEBK)                                   ASWINT     60
C                                                                       ASWINT     61
C    INITIALIZE THE STRAIGHT LINE BLINDER OUT-OF-STEP RELAYS            ASWINT     62
C                                                                       ASWINT     63
      IF(NSLBOR.NE.0)CALL SLBINT(IEBK)                                  ASWINT     64
C                                                                       ASWINT     65
C    INITIALIZE THE DOUBLE CIRCLE OR LENS SHAPE OUT-OF-STEP RELAYS      ASWINT     66
C                                                                       ASWINT     67
      IF(NDCOSR.NE.0)CALL DCOINT(IEBK)                                  ASWINT     68
C                                                                       ASWINT     69
C    INITIALIZE OVERCURRENT RELAYS                                      ASWINT     70
C                                                                       ASWINT     71
      IF (NOCRE .NE. 0) CALL OCRINT (IEBK)                              ASWINT     72
C                                                                       ASWINT     73
C    INITIALIZE DIRECTIONAL COMPARISON SUPERVISORY OVERCURRENT RELAYS   ASWINT     74
C                                                                       ASWINT     75
      IF (NDCSI .NE. 0) CALL DCSINT (IEBK)                              ASWINT     76
C                                                                       ASWINT     77
      IF(IEBK.EQ.0)THEN                                                 ASWINT     78
        OPEN(ISWFA,STATUS='SCRATCH',FORM='FORMATTED')                   ASWINT     79
        LUNITS(ISWFA)=.TRUE.                                            ASWINT     80
        REWIND ISWFA                                                    ASWINT     81
      ELSE                                                              ASWINT     82
        SIMBUF = 'ASWINT: AUTOMATIC RELAY DATA INITIALIZATION ERRORS'   ASWINT     83
        CALL ASTOP (SIMBUF, 50)                                         ASWINT     84
      ENDIF                                                             ASWINT     85
C                                                                       ASWINT     86
      RETURN                                                            ASWINT     87
C                                                                       ASWINT     88
      END                                                               ASWINT     89
