First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
I made a simple miscellaneous dynamics model to trip branch 222 to 333 '1' at 0.15 seconds, this action is currently commented out to help you see where it is. The model works if these lines are commented out as I can see the print outs, so in effect, I have gotten a hello world model to work. However, when the lines are enabled (i.e. trying to get the model to do what I want), I get a crash.
returned non-zero exit status -1073741819
I believe the crash occurs after leaving the subroutine because I can see 'About to return'
before it crashes.
Note I am running with a Python 2.7 script using PSS/E v33.
Any ideas?
SUBROUTINE KMODL(KM,ISLOT)
INTEGER KM,ISLOT, IDEF
REAL BVOLT, TOIME, RDEF
INTEGER, DIMENSION(6):: INTGAR
REAL, DIMENSION(15):: REALAR
CALL GETDEFAULTINT(IDEF)
CALL GETDEFAULTREAL(RDEF)
INTGAR = IDEF
REALAR = RDEF
IF (MODE.LT.4) THEN
CALL DSRVAL('TIME', 1, TOIME, IERR)
IF (TOIME.GT.0.15) THEN
WRITE(*, *) 'About to trip'
C INTGAR(1) = 0
C CALL BRANCH_CHNG(222, 333, '1', INTGAR, REALAR, IERR)
WRITE(*, *) 'Tripped'
END IF
END IF
WRITE(*, *) 'About to return'
RETURN
END
2 | No.2 Revision |
I made a simple miscellaneous dynamics model to trip branch 222 to 333 '1' at 0.15 seconds, this action is currently commented out to help you see where it is. The model works if these lines are commented out as I can see the print outs, so in effect, I have gotten a hello world model to work. However, when the lines are enabled (i.e. trying to get the model to do what I want), I get a crash.
returned non-zero exit status -1073741819
I believe the crash occurs after leaving the subroutine because I can see 'About to return'
before it crashes.
Note I am running with a Python 2.7 script using PSS/E v33.
Any ideas?
SUBROUTINE KMODL(KM,ISLOT)
INTEGER KM,ISLOT, IDEF
KM, ISLOT, IDEF, IERR, MODE
REAL BVOLT, TOIME, RDEF
INTEGER, DIMENSION(6):: INTGAR
REAL, DIMENSION(15):: REALAR
CALL GETDEFAULTINT(IDEF)
CALL GETDEFAULTREAL(RDEF)
INTGAR = IDEF
REALAR = RDEF
IF (MODE.LT.4) THEN
CALL DSRVAL('TIME', 1, TOIME, IERR)
IF (TOIME.GT.0.15) THEN
WRITE(*, *) 'About to trip'
C INTGAR(1) = 0
C CALL BRANCH_CHNG(222, 333, '1', INTGAR, REALAR, IERR)
WRITE(*, *) 'Tripped'
END IF
END IF
WRITE(*, *) 'About to return'
RETURN
END
3 | No.3 Revision |
I made a simple miscellaneous dynamics model to trip branch 222 to 333 '1' at 0.15 seconds, this action is currently commented out to help you see where it is. The model works if these lines are commented out as I can see the print outs, so in effect, I have gotten a hello world model to work. However, when the lines are enabled (i.e. trying to get the model to do what I want), I get a crash.
returned non-zero exit status -1073741819
I believe the crash occurs after leaving the subroutine because I can see 'About to return'
before it crashes.
Note I am running with a Python 2.7 script using PSS/E v33.
Any ideas?
SUBROUTINE KMODL(KM,ISLOT)
INTEGER KM, ISLOT, IDEF, IERR, MODE
REAL BVOLT, TOIME, RDEF
INTEGER, DIMENSION(6):: INTGAR
REAL, DIMENSION(15):: REALAR
CALL GETDEFAULTINT(IDEF)
CALL GETDEFAULTREAL(RDEF)
INTGAR = IDEF
REALAR = RDEF
IF (MODE.LT.4) THEN
CALL DSRVAL('TIME', 1, TOIME, IERR)
IF (TOIME.GT.0.15) THEN
WRITE(*, *) 'About to trip'
C INTGAR(1) = 0
C CALL BRANCH_CHNG(222, 333, '1', INTGAR, REALAR, IERR)
WRITE(*, *) 'Tripped'
END IF
END IF
WRITE(*, *) 'About to return'
RETURN
END
EDIT:
I was able to trip a branch using the LINTRP model. First, I had to move the FORTRAN source code file into my PSSLIB folder, and modify as below. My .dyr file looked like:
1 'USRMSC' 'KMODL' 512 0 3 0 0 0 222 333 '1' /kmodl
SUBROUTINE KMODL(KM,ISLOT)
INCLUDE 'COMON4.INS'
IMPLICIT NONE
INTEGER:: KM, ISLOT, I, IERR
REAL:: TOIME
EXTERNAL LINTRP
I = STRTCCT(4,ISLOT)
IF (MODE.LT.4) THEN
CALL DSRVAL('TIME', 1, TOIME, IERR)
IF (TOIME.GT.0.15) THEN
WRITE(*, *) 'About to trip'
CALL LINTRP(I)
WRITE(*, *) 'Tripped'
END IF
END IF
WRITE(*, *) 'About to return'
RETURN
END
4 | No.4 Revision |
I made a simple miscellaneous dynamics model to trip branch 222 to 333 '1' at 0.15 seconds, this action is currently commented out to help you see where it is. The model works if these lines are commented out as I can see the print outs, so in effect, I have gotten a hello world model to work. However, when the lines are enabled (i.e. trying to get the model to do what I want), I get a crash.
returned non-zero exit status -1073741819
I believe the crash occurs after leaving the subroutine because I can see 'About to return'
before it crashes.
Note I am running with a Python 2.7 script using PSS/E v33.
Any ideas?
SUBROUTINE KMODL(KM,ISLOT)
INTEGER KM, ISLOT, IDEF, IERR, MODE
REAL BVOLT, TOIME, RDEF
INTEGER, DIMENSION(6):: INTGAR
REAL, DIMENSION(15):: REALAR
CALL GETDEFAULTINT(IDEF)
CALL GETDEFAULTREAL(RDEF)
INTGAR = IDEF
REALAR = RDEF
IF (MODE.LT.4) THEN
CALL DSRVAL('TIME', 1, TOIME, IERR)
IF (TOIME.GT.0.15) THEN
WRITE(*, *) 'About to trip'
C INTGAR(1) = 0
C CALL BRANCH_CHNG(222, 333, '1', INTGAR, REALAR, IERR)
WRITE(*, *) 'Tripped'
END IF
END IF
WRITE(*, *) 'About to return'
RETURN
END
EDIT:
I was able to trip a branch using the LINTRP model. First, I had to move the FORTRAN source code file into my PSSLIB folder, folder before compiling into a .dll, and modify as shown below. My .dyr file looked like:
1 'USRMSC' 'KMODL' 512 0 3 0 0 0 222 333 '1' /kmodl
SUBROUTINE KMODL(KM,ISLOT)
INCLUDE 'COMON4.INS'
IMPLICIT NONE
INTEGER:: KM, ISLOT, I, IERR
REAL:: TOIME
EXTERNAL LINTRP
I = STRTCCT(4,ISLOT)
IF (MODE.LT.4) THEN
CALL DSRVAL('TIME', 1, TOIME, IERR)
IF (TOIME.GT.0.15) THEN
WRITE(*, *) 'About to trip'
CALL LINTRP(I)
WRITE(*, *) 'Tripped'
END IF
END IF
WRITE(*, *) 'About to return'
RETURN
END
5 | No.5 Revision |
I made a simple miscellaneous dynamics model to trip branch 222 to 333 '1' at 0.15 seconds, this action is currently commented out to help you see where it is. The model works if these lines are commented out as I can see the print outs, so in effect, I have gotten a hello world model to work. However, when the lines are enabled (i.e. trying to get the model to do what I want), I get a crash.
returned non-zero exit status -1073741819
I believe the crash occurs after leaving the subroutine because I can see 'About to return'
before it crashes.
Note I am running with a Python 2.7 script using PSS/E v33.
Any ideas?
SUBROUTINE KMODL(KM,ISLOT)
INTEGER KM, ISLOT, IDEF, IERR, MODE
REAL BVOLT, TOIME, RDEF
INTEGER, DIMENSION(6):: INTGAR
REAL, DIMENSION(15):: REALAR
CALL GETDEFAULTINT(IDEF)
CALL GETDEFAULTREAL(RDEF)
INTGAR = IDEF
REALAR = RDEF
IF (MODE.LT.4) THEN
CALL DSRVAL('TIME', 1, TOIME, IERR)
IF (TOIME.GT.0.15) THEN
WRITE(*, *) 'About to trip'
C INTGAR(1) = 0
C CALL BRANCH_CHNG(222, 333, '1', INTGAR, REALAR, IERR)
WRITE(*, *) 'Tripped'
END IF
END IF
WRITE(*, *) 'About to return'
RETURN
END
EDIT:
I was able to trip a branch using the LINTRP model. First, I had to move the FORTRAN source code file into my PSSLIB folder before compiling into a .dll, and modify as shown below. My .dyr file looked like:
1 'USRMSC' 'KMODL' 512 0 3 0 0 0 222 333 '1' /kmodl
SUBROUTINE KMODL(KM,ISLOT)
INCLUDE 'COMON4.INS'
IMPLICIT NONE
INTEGER:: KM, ISLOT, I, IERR
REAL:: TOIME
EXTERNAL LINTRP
I = STRTCCT(4,ISLOT)
IF (MODE.LT.4) THEN
CALL DSRVAL('TIME', 1, TOIME, IERR)
IF (TOIME.GT.0.15) THEN
WRITE(*, *) 'About to trip'
CALL LINTRP(I)
WRITE(*, *) 'Tripped'
END IF
END IF
WRITE(*, *) 'About to return'
RETURN
END
EDIT
I'm testing on the examples that come with PSS/E. An interesting observation I made. Pausing the simulation one time-step before the tripping occurs fixes it.
Works
psspy.run(option=1, tpause=0.1)
psspy.run(tpause=0.145)
ierr = psspy.set_model_debug_output_flag(1)
psspy.run(tpause=1)
Crashes
psspy.run(option=1, tpause=0.1)
psspy.run(tpause=1)
6 | No.6 Revision |
I made a simple miscellaneous dynamics model to trip branch 222 to 333 '1' at 0.15 seconds, this action is currently commented out to help you see where it is. The model works if these lines are commented out as I can see the print outs, so in effect, I have gotten a hello world model to work. However, when the lines are enabled (i.e. trying to get the model to do what I want), I get a crash.
returned non-zero exit status -1073741819
I believe the crash occurs after leaving the subroutine because I can see 'About to return'
before it crashes.
Note I am running with a Python 2.7 script using PSS/E v33.
Any ideas?
SUBROUTINE KMODL(KM,ISLOT)
INTEGER KM, ISLOT, IDEF, IERR, MODE
REAL BVOLT, TOIME, RDEF
INTEGER, DIMENSION(6):: INTGAR
REAL, DIMENSION(15):: REALAR
CALL GETDEFAULTINT(IDEF)
CALL GETDEFAULTREAL(RDEF)
INTGAR = IDEF
REALAR = RDEF
IF (MODE.LT.4) THEN
CALL DSRVAL('TIME', 1, TOIME, IERR)
IF (TOIME.GT.0.15) THEN
WRITE(*, *) 'About to trip'
C INTGAR(1) = 0
C CALL BRANCH_CHNG(222, 333, '1', INTGAR, REALAR, IERR)
WRITE(*, *) 'Tripped'
END IF
END IF
WRITE(*, *) 'About to return'
RETURN
END
EDIT:
I was able to trip a branch using the LINTRP model. First, I had to move the FORTRAN source code file into my PSSLIB folder before compiling into a .dll, and modify as shown below. My .dyr file looked like:
1 'USRMSC' 'KMODL' 512 0 3 0 0 0 222 333 '1' /kmodl
SUBROUTINE KMODL(KM,ISLOT)
INCLUDE 'COMON4.INS'
IMPLICIT NONE
INTEGER:: KM, ISLOT, I, IERR
REAL:: TOIME
EXTERNAL LINTRP
I = STRTCCT(4,ISLOT)
IF (MODE.LT.4) THEN
CALL DSRVAL('TIME', 1, TOIME, IERR)
IF (TOIME.GT.0.15) THEN
WRITE(*, *) 'About to trip'
CALL LINTRP(I)
WRITE(*, *) 'Tripped'
END IF
END IF
WRITE(*, *) 'About to return'
RETURN
END
EDIT
I'm testing on the examples that come with PSS/E. An interesting observation I made. Pausing the simulation one time-step before the tripping occurs fixes it.
Works
psspy.run(option=1, tpause=0.1)
psspy.run(tpause=0.145)
ierr = psspy.set_model_debug_output_flag(1)
psspy.run(tpause=1)
Crashes
psspy.run(option=1, tpause=0.1)
psspy.run(tpause=1)