CFPRIME AUTLIN                                                          AUTLIN      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 AUTLIN                                                 AUTLIN      3
CD                                                                      AUTLIN      4
CD    THIS ROUTINE PICKS UP LINE DATA FOR ALL SCGR RELAYS.              AUTLIN      5
CD                                                                      AUTLIN      6
      INCLUDE 'PARX.INS'                                                AUTLIN      7
      INCLUDE 'CNPT.INS'                                                AUTLIN      8
      INCLUDE 'CNUNIT.INS'                                              AUTLIN      9
      INCLUDE 'CNAUTO.INS'                                              AUTLIN     10
      INCLUDE 'CNNNEW.INS'                                              AUTLIN     11
C                                                                       AUTLIN     12
      CHARACTER*2 CID,SID                                               AUTLIN     13
      DIMENSION PFLINE(6),PLEFT(6),PSLINE(6)                            AUTLIN     14
C                                                                       AUTLIN     15
C   PICKING UP LINE ADMITTANCE DATA FOR CAPACITOR GAP RELAY SCHEME      AUTLIN     16
C                                                                       AUTLIN     17
      DO 500 I=LSCGRE,NSCGRE                                            AUTLIN     18
C                                                                       AUTLIN     19
      K=IDATPT(I)                                                       AUTLIN     20
C                                                                       AUTLIN     21
      NLFI=IADATA(K+2)                                                  AUTLIN     22
      NLFJ=IADATA(K+3)                                                  AUTLIN     23
      NPBNOI=NNEW(NLFI)                                                 AUTLIN     24
      NPBNOJ=NNEW(NLFJ)                                                 AUTLIN     25
      ICID=IADATA(K+4)                                                  AUTLIN     26
      CALL UNPACK(CID,JJJ,ICID)                                         AUTLIN     27
      ISID=IADATA(K+5)                                                  AUTLIN     28
      CALL UNPACK(SID,JJJ,ISID)                                         AUTLIN     29
C                                                                       AUTLIN     30
      ICODE=0                                                           AUTLIN     31
C                                                                       AUTLIN     32
      CALL LOSECT(ICODE,NPBNOI,NPBNOJ,CID,SID,PFLINE,PLEFT,PSLINE)      AUTLIN     33
C                                                                       AUTLIN     34
C     STORE THE EQUIVALENT PI ADMITTANCE FOR TOTAL LINE                 AUTLIN     35
C                                                                       AUTLIN     36
      ADATA(K+17)=PFLINE(1)                                             AUTLIN     37
      ADATA(K+18)=PFLINE(2)                                             AUTLIN     38
      ADATA(K+19)=PFLINE(3)                                             AUTLIN     39
      ADATA(K+20)=PFLINE(4)                                             AUTLIN     40
      ADATA(K+21)=PFLINE(5)                                             AUTLIN     41
      ADATA(K+22)=PFLINE(6)                                             AUTLIN     42
C                                                                       AUTLIN     43
C     GET EQUIVALENT PI ADMITTANCE FOR ALL SECTIONS TO THE LEFT         AUTLIN     44
C     OF KSECT                                                          AUTLIN     45
C                                                                       AUTLIN     46
      ADATA(K+23)=PLEFT(1)                                              AUTLIN     47
      ADATA(K+24)=PLEFT(2)                                              AUTLIN     48
      ADATA(K+25)=PLEFT(3)                                              AUTLIN     49
      ADATA(K+26)=PLEFT(4)                                              AUTLIN     50
      ADATA(K+27)=PLEFT(5)                                              AUTLIN     51
      ADATA(K+28)=PLEFT(6)                                              AUTLIN     52
C                                                                       AUTLIN     53
C     GET EQUIVALENT PI ADMITTANCE FOR ALL SECTIONS WITH                AUTLIN     54
C     SECTION KSECT SHORT CIRCUITED                                     AUTLIN     55
C                                                                       AUTLIN     56
      ADATA(K+29)=PSLINE(1)                                             AUTLIN     57
      ADATA(K+30)=PSLINE(2)                                             AUTLIN     58
      ADATA(K+31)=PSLINE(3)                                             AUTLIN     59
      ADATA(K+32)=PSLINE(4)                                             AUTLIN     60
      ADATA(K+33)=PSLINE(5)                                             AUTLIN     61
      ADATA(K+34)=PSLINE(6)                                             AUTLIN     62
C                                                                       AUTLIN     63
 500  CONTINUE                                                          AUTLIN     64
C                                                                       AUTLIN     65
      RETURN                                                            AUTLIN     66
      END                                                               AUTLIN     67
                                                                        AUTLIN     68
