CFPRIME VDLINT                                                          VDLINT      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 VDLINT(IEBK)                                           VDLINT      3
CD                                                                      VDLINT      4
CD     THIS SUBROUTINE INITIALIZES VOLTAGE DIFFERENCE LOAD DROPPING     VDLINT      5
CD     RELAY.                                                           VDLINT      6
CD                                                                      VDLINT      7
CD                                                                      VDLINT      8
CD     LVDLDR           Starting position of IDATPT array for VDLDR     VDLINT      9
CD                      relay scheme, LVDLDR is in the common labelled  VDLINT     10
CD                      PT of include file CNPT.                        VDLINT     11
CD                                                                      VDLINT     12
CD     NVDLDR           Finishing position of IDATPT array for VDLDR    VDLINT     13
CD                      relay scheme, NVDLDR is in the common labelled  VDLINT     14
CD                      AUTO of include file CNAUTO.                    VDLINT     15
CD                                                                      VDLINT     16
CD                                                                      VDLINT     17
CD     let k = k-th VDLDR RELAY                                         VDLINT     18
CD                                                                      VDLINT     19
CD     N = IDATPT(k)    The array that stores the start position of     VDLINT     20
CD                      the K-TH VDLDR relay scheme data                VDLINT     21
CD                                                                      VDLINT     22
CD                                                                      VDLINT     23
CD                                                                      VDLINT     24
CD    IADATA(N+1)=IRVSW  IF= 0 THE VOLTAGE DEVIATION HAS NOT YET        VDLINT     25
CD                             EXCEEDED RVDRP1                          VDLINT     26
CD                       IF= 1 THE VOLTAGE DEVIATION HAS BEEN EXCEEDED  VDLINT     27
CD                             FOR LESS THAN RVTIM1 SECONDS             VDLINT     28
CD                       IF= 2 THE RELAY HAS TRIGGERED BUT THE BREAKER  VDLINT     29
CD                             TIME DELAY HAS NOT EXPIRED.              VDLINT     30
CD                       IF= 3 LOAD AND BEEN DROPPED AND THE RELAY IS   VDLINT     31
CD                             INACTIVE                                 VDLINT     32
CD                                                                      VDLINT     33
CD    IADATA(N+2)=IRVBNO PROGRAM BUS NUMBER WHERE RELAY IS LOCATED.     VDLINT     34
CD                                                                      VDLINT     35
CD    ADATA(N+3)=RVSHNT  IF= 'S', THEN THE REACTIVE LOAD TO BE DROPPED  VDLINT     36
CD                                AS ENTERED ON THE RV CARD IS ASSUMED  VDLINT     37
CD                                TO BE AT THE NOMINAL VALUE (VOLTAGE   VDLINT     38
CD                                = 1 PER UNIT).  THE PROGRAM WILL      VDLINT     39
CD                                CONVERT THIS VALUE TO THE PROPER PER  VDLINT     40
CD                                UNIT ADMITTANCE AT THE TIME THE LOAD  VDLINT     41
CD                                IS DROPPED.                           VDLINT     42
CD                                                                      VDLINT     43
CD   IADATA(N+4)=IFLAG   IF=0 : CONTROL BOTH LOACAL AND REMOTE RELAYS   VDLINT     44
CD                         =1 : CONTROL THE REMOTE RELAYS ONLY          VDLINT     45
CD                                                                      VDLINT     46
CD   IADATA(N+5)=IDRRR   NO. OF REMOTE RELAY ATTRACHED.                 VDLINT     47
CD                                                                      VDLINT     48
CD   IADATA(N+6)         REMOTE RELAY TRIP FLAG                         VDLINT     49
CD                                                                      VDLINT     50
CD   ADATA(N+7)=RVDRP1   VOLTAGE DEVIATION IN PER UNIT REQUIRED TO      VDLINT     51
CD                       TRIGGER THE RELAY.                             VDLINT     52
CD                                                                      VDLINT     53
CD   ADATA(N+8)=RVTIM1   TIME DURATION IN CYCLES THAT THE VOLTAGE       VDLINT     54
CD                       DEVIATION MUST EXCEED RVDRP1 BEFORE THE RELAY  VDLINT     55
CD                       TRIGGERS.                                      VDLINT     56
CD                                                                      VDLINT     57
CD   ADATA(N+9)=RVPDP1   AMOUNT OF REAL BUS LOAD, IN PER UNIT, TO BE    VDLINT     58
CD                       DROPPED.                                       VDLINT     59
CD                                                                      VDLINT     60
CD   ADATA(N+10)=RVQDP1  AMOUNT OF REACTIVE BUS LOAD, IN PER UNIT, TO   VDLINT     61
CD                       BE DROPPED.                                    VDLINT     62
CD                                                                      VDLINT     63
CD   ADATA(N+11)=RVBDY1  BREAKER TIME DELAY IN CYCLES.  DELAY TIME      VDLINT     64
CD                       BETWEEN RELAY TRIG AND LOAD BEING DROPPED.     VDLINT     65
CD                                                                      VDLINT     66
CD   ADATA(K+12)=RVCLK1  TIMER FOR HOW LONG THE DEVIATION HAS EXCEEDED  VDLINT     67
CD                       RVDRP1.                                        VDLINT     68
CD                                                                      VDLINT     69
CD   ADATA(N+13)=RVSTAN  STEADY STATE (T = 0.0) VOLTAGE                 VDLINT     70
CD                                                                      VDLINT     71
CD   ADATA(N+14)=RVCLK2  TIMER FOR THE BREAKER TIME DELAY.              VDLINT     72
CD                                                                      VDLINT     73
CD                                                                      VDLINT     74
      INCLUDE 'PARX.INS'                                                VDLINT     75
      INCLUDE 'CNPT.INS'                                                VDLINT     76
      INCLUDE 'CNIPTR.INS'                                              VDLINT     77
      INCLUDE 'CNVOLT.INS'                                              VDLINT     78
      INCLUDE 'CNAUTO.INS'                                              VDLINT     79
      INCLUDE 'CNB19.INS'                                               VDLINT     80
      INCLUDE 'CNUNIT.INS'                                              VDLINT     81
      INCLUDE 'CNNNEW.INS'                                              VDLINT     82
C                                                                       VDLINT     83
      COMPLEX VOLTK                                                     VDLINT     84
C                                                                       VDLINT     85
      DO 200 J=LVDLDR,NVDLDR                                            VDLINT     86
      K=IDATPT(J)                                                       VDLINT     87
      IF(IADATA(K+1).GT.9)GOTO 200                                      VDLINT     88
      NLF=IADATA(K+2)                                                   VDLINT     89
      IDRRR=IADATA(K+5)                                                 VDLINT     90
      NPROG=NNEW(NLF)                                                   VDLINT     91
      IADATA(K+2)=NPROG                                                 VDLINT     92
      IADATA(K+1)=0                                                     VDLINT     93
      IADATA(K+6)=0                                                     VDLINT     94
      VOLTK=VOLT(NPROG)                                                 VDLINT     95
      VMAG=CABS(VOLTK)                                                  VDLINT     96
      ADATA(K+13)=VMAG                                                  VDLINT     97
      ADATA(K+12)=0.0                                                   VDLINT     98
      ADATA(K+14)=0.0                                                   VDLINT     99
      ADATA(K+8)=ADATA(K+8)/FQBASE                                      VDLINT    100
      ADATA(K+11)=ADATA(K+11)/FQBASE                                    VDLINT    101
C                                                                       VDLINT    102
C   INITIALIZES THE REMOTE RELAYS                                       VDLINT    103
C                                                                       VDLINT    104
      IF(IDRRR.NE.0)THEN                                                VDLINT    105
        KADD=K+14                                                       VDLINT    106
        CALL REMINT(KADD,IDRRR)                                         VDLINT    107
      ENDIF                                                             VDLINT    108
C                                                                       VDLINT    109
 200  CONTINUE                                                          VDLINT    110
      RETURN                                                            VDLINT    111
      END                                                               VDLINT    112
