CFPRIME MODSOL                                                          MODSOL      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 MODSOL(CARD,IKEY,JTYP,IEBK)                            MODSOL      3
CD                                                                      MODSOL      4
CD    TO PERFORM THE CHANGE OF SOLUTION CONTROL ACTIVITIES:             MODSOL      5
CD                                                                      MODSOL      6
      INCLUDE 'PARX.INS'                                                MODSOL      7
      INCLUDE 'CNPT.INS'                                                MODSOL      8
      INCLUDE 'CNFLAG.INS'                                              MODSOL      9
      INCLUDE 'CNB4.INS'                                                MODSOL     10
      INCLUDE 'CNB5.INS'                                                MODSOL     11
      INCLUDE 'CNB6.INS'                                                MODSOL     12
      INCLUDE 'CNB9.INS'                                                MODSOL     13
      INCLUDE 'CNB19.INS'                                               MODSOL     14
      INCLUDE 'CNPARX.INS'                                              MODSOL     15
      INCLUDE 'CNUNIT.INS'                                              MODSOL     16
C                                                                       MODSOL     17
      CHARACTER*132 CARD                                                MODSOL     18
C                                                                       MODSOL     19
      LDEB=(JDEB(41).NE.0)                                              MODSOL     20
C                                                                       MODSOL     21
      READ(CARD,1370) ITYP,NLFI,NAREA,LICT,ISCKT,XREAL                  MODSOL     22
C                                                                       MODSOL     23
      IF(IKEY.EQ.1)THEN                                                 MODSOL     24
      IKEY=2                                                            MODSOL     25
C      WRITE(IU17,1450)                                                 MODSOL     26
      WRITE(IU6,1450)                                                   MODSOL     27
      ENDIF                                                             MODSOL     28
CD                                                                      MODSOL     29
CD    1. NETWORK SOLUTION PARAMETER CHANGES                             MODSOL     30
CD                                                                      MODSOL     31
      GOTO (100,110,120,130), JTYP                                      MODSOL     32
 100  CONTINUE                                                          MODSOL     33
      IF(XREAL.NE.0.0) ERTOL=XREAL                                      MODSOL     34
      IF(NLFI.NE.0) MAXIT=NLFI                                          MODSOL     35
C      WRITE(IU17,1640) ITYP,MAXIT,ERTOL                                MODSOL     36
      WRITE(IU6,1640) ITYP,MAXIT,ERTOL                                  MODSOL     37
      GOTO 140                                                          MODSOL     38
C                                                                       MODSOL     39
 110  CONTINUE                                                          MODSOL     40
      IF(XREAL.NE.0.0) PNLI=XREAL                                       MODSOL     41
C      WRITE(IU17,1630) ITYP,PNLI                                       MODSOL     42
      WRITE(IU6,1630) ITYP,PNLI                                         MODSOL     43
      GOTO 140                                                          MODSOL     44
CD                                                                      MODSOL     45
CD    2. ADD UNIFORM DAMPING FOR THE LOCAL MODE                         MODSOL     46
CD                                                                      MODSOL     47
 120  CONTINUE                                                          MODSOL     48
C                                                                       MODSOL     49
      IF(XREAL.NE. 0.0)THEN                                             MODSOL     50
       SDAMP=XREAL                                                      MODSOL     51
       LSDAMP=.TRUE.                                                    MODSOL     52
C       WRITE(IU17,1650) ITYP,SDAMP                                     MODSOL     53
       WRITE(IU6,1650) ITYP,SDAMP                                       MODSOL     54
      ENDIF                                                             MODSOL     55
C                                                                       MODSOL     56
 130  CONTINUE                                                          MODSOL     57
CD                                                                      MODSOL     58
CD    3. REMOVING UNIFORM DAMPING FOR THE LOCAL MODE                    MODSOL     59
CD                                                                      MODSOL     60
      IF(XREAL.NE. 0.0)THEN                                             MODSOL     61
       SDAMP=XREAL                                                      MODSOL     62
       LSDAMP=.FALSE.                                                   MODSOL     63
C       WRITE(IU17,1660) ITYP,SDAMP                                     MODSOL     64
       WRITE(IU6,1660) ITYP,SDAMP                                       MODSOL     65
      ENDIF                                                             MODSOL     66
C                                                                       MODSOL     67
 140  CONTINUE                                                          MODSOL     68
C                                                                       MODSOL     69
      RETURN                                                            MODSOL     70
C                                                                       MODSOL     71
 1370 FORMAT(A3,2I5,3X,A2,I5,4G10.5)                                    MODSOL     72
 1450 FORMAT (///10X,'CHANGES OF NETWORK SOLUTION PARAMETERS :-',/10X,39MODSOL     73
     1('-')/10X,'TYPE',T43,'DESCRIPTION',T85,'CHANGES'/)                MODSOL     74
 1630 FORMAT (T11,A3,T43,'PERIOD OF NON-LINEAR LOAD BUS ITERATION CHANGEMODSOL     75
     1',T85,'  PNLI =',F10.5)                                           MODSOL     76
 1640 FORMAT (T11,A3,T43,'LF VOLTAGE CONVERGENCE TOLERANCE CHANGE',T85,'MODSOL     77
     1MAX ITER= ',I5,'  ERTOL= ',F10.5)                                 MODSOL     78
 1650 FORMAT (T11,A3,T43,'ADDING SYSTEM DAMPING',T85,'                  MODSOL     79
     1 DAMP = ',F10.5)                                                  MODSOL     80
 1660 FORMAT (T11,A3,T43,'REMOVING THE ADDED SYSTEM DAMPING',T85,'      MODSOL     81
     1 DAMP = ',F10.5)                                                  MODSOL     82
C                                                                       MODSOL     83
      END                                                               MODSOL     84
