Ask Your Question
0

Changing VAR(L) during dynamic simulation

asked 2014-02-20 09:08:34 -0600

Diz gravatar image

Hello everyone, Is it possible to input the time series value in VAR (L) in a model during dynamic simulation ? I am trying to do a manipulation where I want to have my reference VAR(1) value equal to the input value to make the error zero. It can be done manually but its a problem when you have large data.

edit retag flag offensive close merge delete

Comments

thanks yfwing for your response. I am not sure how to call a user-defined model in conec.flx, is it just like below Subroutine conec C include 'common4.ins' C call PVEU1 C return where PVEU1 is the model. If above is correct, then how to enter the data file ? Any example if you have ?

Diz gravatar imageDiz ( 2014-02-20 14:21:22 -0600 )edit

yfwing, I appreciate your response. Can you add a comment line in each code to explain what each line is doing ?

Diz gravatar imageDiz ( 2014-02-25 15:56:35 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-02-20 13:43:32 -0600

yfwing gravatar image

updated 2014-02-25 15:03:27 -0600

I believe that you can modify your conec.flx to call a user-defined model and in the model you can read your data file and set the var values.

An example as follows,

`      SUBROUTINE CONEC
C
      INCLUDE 'COMON4.INS'
      INTEGER IU
C
      IF (MODE.NE.2) RETURN
      IU = 10
      CALL GENCHK(1, '1', II, 'IN CONEC')
      IF (II.EQ.0) RETURN
      OPEN(UNIT=IU, ACCESS= 'APPEND', FILE = 'output.txt')
      WRITE(IU, 5) TIME, PMECH(II), (VAR(JJ), JJ=100, 103)
5     FORMAT(F10.5, F5.2, 4F10.5)
      CLOSE(IU)
C
      RETURN
      END

`

edit flag offensive delete link more
0

answered 2014-02-21 12:31:39 -0600

EBahr gravatar image

I am not sure exactly what you are trying to do, or if you are working with a normal model or a user model, but I would take a look at the API and look at the ierr = psspy.change_var(number, newval) function. You might need to do some DOCU parsing to get the VAR number if you want it to be automatic.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2014-02-20 09:08:34 -0600

Seen: 1,421 times

Last updated: Feb 25 '14