Professional Documents
Culture Documents
=======================================================================
! Generated by : PSCAD v4.6.3.0
!
! Warning: The content of this file is automatically generated.
! Do not modify, as any changes made here will be lost!
!-----------------------------------------------------------------------
! Component : Main
! Description :
!-----------------------------------------------------------------------
!=======================================================================
SUBROUTINE MainDyn()
!---------------------------------------
! Standard includes
!---------------------------------------
INCLUDE 'nd.h'
INCLUDE 'emtconst.h'
INCLUDE 'emtstor.h'
INCLUDE 's0.h'
INCLUDE 's1.h'
INCLUDE 's2.h'
INCLUDE 's4.h'
INCLUDE 'branches.h'
INCLUDE 'pscadv3.h'
INCLUDE 'fnames.h'
INCLUDE 'radiolinks.h'
INCLUDE 'matlab.h'
INCLUDE 'rtconfig.h'
!---------------------------------------
! Function/Subroutine Declarations
!---------------------------------------
!---------------------------------------
! Variable Declarations
!---------------------------------------
! Subroutine Arguments
! Control Signals
REAL Vload, Iload, RT_1, RT_2, VCO
REAL RT_3, RT_4, Vsource
! Internal Variables
REAL RVD1_1, RVD1_2, RVD1_3, RVD1_4
! Indexing variables
INTEGER ICALL_NO ! Module call num
INTEGER ISTOF, IT_0 ! Storage Indices
INTEGER SS, INODE, IBRCH ! SS/Node/Branch/Xfmr
!---------------------------------------
! Local Indices
!---------------------------------------
NTXFR = NTXFR + 1
TXFR(NTXFR,1) = NSTOL
TXFR(NTXFR,2) = NSTOI
TXFR(NTXFR,3) = NSTOF
TXFR(NTXFR,4) = NSTOC
SS = NODE(NNODE+1)
ICALL_NO = NCALL_NO
NCALL_NO = NCALL_NO + 1
ISTOF = NSTOF
NSTOF = NSTOF + 8
NPGB = NPGB + 4
INODE = NNODE + 2
NNODE = NNODE + 8
IBRCH = NBRCH(SS)
NBRCH(SS) = NBRCH(SS) + 10
NCSCS = NCSCS + 0
NCSCR = NCSCR + 0
!---------------------------------------
! Transfers from storage arrays
!---------------------------------------
Vload = STOF(ISTOF + 1)
Iload = STOF(ISTOF + 2)
RT_1 = STOF(ISTOF + 3)
RT_2 = STOF(ISTOF + 4)
VCO = STOF(ISTOF + 5)
RT_3 = STOF(ISTOF + 6)
RT_4 = STOF(ISTOF + 7)
Vsource = STOF(ISTOF + 8)
!---------------------------------------
! Electrical Node Lookup
!---------------------------------------
!---------------------------------------
! Configuration of Models
!---------------------------------------
IF ( TIMEZERO ) THEN
FILENAME = 'Main.dta'
CALL EMTDC_OPENFILE
SECTION = 'DATADSD:'
CALL EMTDC_GOTOSECTION
ENDIF
!---------------------------------------
! Generated code from module definition
!---------------------------------------
RT_1 = 60.0
!---------------------------------------
! Feedbacks and transfers to storage
!---------------------------------------
STOF(ISTOF + 1) = Vload
STOF(ISTOF + 2) = Iload
STOF(ISTOF + 3) = RT_1
STOF(ISTOF + 4) = RT_2
STOF(ISTOF + 5) = VCO
STOF(ISTOF + 6) = RT_3
STOF(ISTOF + 7) = RT_4
STOF(ISTOF + 8) = Vsource
!---------------------------------------
! Transfer to Exports
!---------------------------------------
!---------------------------------------
! Close Model Data read
!---------------------------------------
!=======================================================================
SUBROUTINE MainOut()
!---------------------------------------
! Standard includes
!---------------------------------------
INCLUDE 'nd.h'
INCLUDE 'emtconst.h'
INCLUDE 'emtstor.h'
INCLUDE 's0.h'
INCLUDE 's1.h'
INCLUDE 's2.h'
INCLUDE 's4.h'
INCLUDE 'branches.h'
INCLUDE 'pscadv3.h'
INCLUDE 'fnames.h'
INCLUDE 'radiolinks.h'
INCLUDE 'matlab.h'
INCLUDE 'rtconfig.h'
!---------------------------------------
! Function/Subroutine Declarations
!---------------------------------------
REAL EMTDC_VVDC !
REAL RMS3 ! 'Instantaneous RMS Measurement'
REAL VBRANCH ! Voltage across the branch
!---------------------------------------
! Variable Declarations
!---------------------------------------
! Control Signals
REAL Vload, Iload, RT_1, RT_4, Vsource
! Internal Variables
! Indexing variables
INTEGER ICALL_NO ! Module call num
INTEGER ISTOL, ISTOI, ISTOF, ISTOC, IT_0 ! Storage Indices
INTEGER IPGB ! Control/Monitoring
INTEGER SS, INODE, IBRCH ! SS/Node/Branch/Xfmr
!---------------------------------------
! Local Indices
!---------------------------------------
NTXFR = NTXFR + 1
ISTOL = TXFR(NTXFR,1)
ISTOI = TXFR(NTXFR,2)
ISTOF = TXFR(NTXFR,3)
ISTOC = TXFR(NTXFR,4)
SS = NODE(NNODE+1)
ICALL_NO = NCALL_NO
NCALL_NO = NCALL_NO + 1
IPGB = NPGB
NPGB = NPGB + 4
INODE = NNODE + 2
NNODE = NNODE + 8
IBRCH = NBRCH(SS)
NBRCH(SS) = NBRCH(SS) + 10
NCSCS = NCSCS + 0
NCSCR = NCSCR + 0
!---------------------------------------
! Transfers from storage arrays
!---------------------------------------
Vload = STOF(ISTOF + 1)
Iload = STOF(ISTOF + 2)
RT_1 = STOF(ISTOF + 3)
RT_4 = STOF(ISTOF + 7)
Vsource = STOF(ISTOF + 8)
!---------------------------------------
! Electrical Node Lookup
!---------------------------------------
NT_1 = NODE(INODE + 1)
NT_4 = NODE(INODE + 4)
!---------------------------------------
! Configuration of Models
!---------------------------------------
IF ( TIMEZERO ) THEN
FILENAME = 'Main.dta'
CALL EMTDC_OPENFILE
SECTION = 'DATADSO:'
CALL EMTDC_GOTOSECTION
ENDIF
!---------------------------------------
! Generated code from module definition
!---------------------------------------
RT_1 = 60.0
!---------------------------------------
! Feedbacks and transfers to storage
!---------------------------------------
STOF(ISTOF + 1) = Vload
STOF(ISTOF + 2) = Iload
STOF(ISTOF + 3) = RT_1
STOF(ISTOF + 7) = RT_4
STOF(ISTOF + 8) = Vsource
!---------------------------------------
! Close Model Data read
!---------------------------------------
!=======================================================================
SUBROUTINE MainDyn_Begin()
!---------------------------------------
! Standard includes
!---------------------------------------
INCLUDE 'nd.h'
INCLUDE 'emtconst.h'
INCLUDE 's0.h'
INCLUDE 's1.h'
INCLUDE 's4.h'
INCLUDE 'branches.h'
INCLUDE 'pscadv3.h'
INCLUDE 'radiolinks.h'
INCLUDE 'rtconfig.h'
!---------------------------------------
! Function/Subroutine Declarations
!---------------------------------------
!---------------------------------------
! Variable Declarations
!---------------------------------------
! Subroutine Arguments
! Control Signals
REAL RT_1
! Internal Variables
! Indexing variables
INTEGER ICALL_NO ! Module call num
INTEGER IT_0 ! Storage Indices
INTEGER SS, INODE, IBRCH ! SS/Node/Branch/Xfmr
!---------------------------------------
! Local Indices
!---------------------------------------
! Define electric network subsystem number
SS = NODE(NNODE+1)
ICALL_NO = NCALL_NO
NCALL_NO = NCALL_NO + 1
INODE = NNODE + 2
NNODE = NNODE + 8
IBRCH = NBRCH(SS)
NBRCH(SS) = NBRCH(SS) + 10
NCSCS = NCSCS + 0
NCSCR = NCSCR + 0
!---------------------------------------
! Electrical Node Lookup
!---------------------------------------
!---------------------------------------
! Generated code from module definition
!---------------------------------------
RETURN
END
!=======================================================================
SUBROUTINE MainOut_Begin()
!---------------------------------------
! Standard includes
!---------------------------------------
INCLUDE 'nd.h'
INCLUDE 'emtconst.h'
INCLUDE 's0.h'
INCLUDE 's1.h'
INCLUDE 's4.h'
INCLUDE 'branches.h'
INCLUDE 'pscadv3.h'
INCLUDE 'radiolinks.h'
INCLUDE 'rtconfig.h'
!---------------------------------------
! Function/Subroutine Declarations
!---------------------------------------
!---------------------------------------
! Variable Declarations
!---------------------------------------
! Subroutine Arguments
! Control Signals
REAL RT_1
! Internal Variables
! Indexing variables
INTEGER ICALL_NO ! Module call num
INTEGER IT_0 ! Storage Indices
INTEGER SS, INODE, IBRCH ! SS/Node/Branch/Xfmr
!---------------------------------------
! Local Indices
!---------------------------------------
SS = NODE(NNODE+1)
ICALL_NO = NCALL_NO
NCALL_NO = NCALL_NO + 1
INODE = NNODE + 2
NNODE = NNODE + 8
IBRCH = NBRCH(SS)
NBRCH(SS) = NBRCH(SS) + 10
NCSCS = NCSCS + 0
NCSCR = NCSCR + 0
!---------------------------------------
! Electrical Node Lookup
!---------------------------------------
NT_1 = NODE(INODE + 1)
NT_4 = NODE(INODE + 4)
!---------------------------------------
! Generated code from module definition
!---------------------------------------
RETURN
END