Ask Your Question
0

I couldnt find what this functions are for in mode 5 in user model programming

asked 2019-02-14 11:12:05 -0500

marilyn3 gravatar image

updated 2019-02-14 11:18:46 -0500

CALL VLTFR6(VLTI,BASVLT(IB)) IBPTR = 0 CALL ADINTN (JJ,CB1,IBPTR) WRITE(IPRT,17) IBUS,BUSNAM(IB),VLTI,IM,J,CB1,K,L WRITE(IPRT,27) (CON(I),I=J,JJ)

this is a part of a flecs code from the maxex1 model , when mode 5 is executing , i couldnt find in the manual what this functions are and in the code it says that are external, so i would aprecciate if somebody explain this VLTFR6 function and the ADINTN function , also what is IPRT?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2019-02-15 00:35:41 -0500

perolofl gravatar image

Subroutine VLTFR6 converts the real base voltage BASVLT(IB) to a left justified character returned in string VLTI.

Subroutine ADINTN converts the integer JJ to a left justified character returned in string CB1.

VLTI and CB1 are local variables and must be declared as CHARACTER, e.g. CHARACTER*6.

The benefit is that the last CON number can be written left justified in the DOCU report, i.e. immedietaly after the minus sign, see example below, where the CON range is 1-14.

 Model GENROU Bus 101 [NUC-A       21.600] Machine "1 " :

                  C O N S     S T A T E S
                    1-14          1-6

If JJ had been written as an integer the corresponding report would look like:

 Model GENROU Bus 101 [NUC-A       21.600] Machine "1 " :

                  C O N S     S T A T E S
                    1-    14      1-    6

which is not so nice since there are several spaces between the minus sign and the value.

In mode 5, 6 and 7, dynamic models shall write to the Fortran number stored in common variable IPRT.

edit flag offensive delete link more

Comments

Thank you so much for this information , i really need some help so if you have more information about model writting i would appreciate it very much , i found another subroutine in the manual which i have no idea of the use, i only know is used in mode 6 its called CONINT

marilyn3 gravatar imagemarilyn3 ( 2019-02-15 10:18:44 -0500 )edit

and it has this format SAVE IVEC DATA IVEC/'AB'/ CALL CONINT(IVEC,1,JJ) IF (JJ.NE.0) RETURN i believe this converts charachters to integers? thanks a lot for the help

marilyn3 gravatar imagemarilyn3 ( 2019-02-15 10:20:30 -0500 )edit

@marilyn3 Hi, nice to meet you. I learn how to write a simple VSC-HVDC model. could we communicate with each other? what's your email address?Mine is 593790612@qq.com. waiting for you.

Gloria.Z gravatar imageGloria.Z ( 2019-02-16 21:22:09 -0500 )edit

Hi Gloria!! I would really appreciate the help, mine is marilyn.barragan@alumno.buap.mx

marilyn3 gravatar imagemarilyn3 ( 2019-02-16 22:22:02 -0500 )edit

The usage of CONINT is only applicable to models called by CONEC or CONET. There is no reason to write such a model today since all types of model can be called by PSSE directly, i.e. Table-driven. See POM, chapter 23.6.

perolofl gravatar imageperolofl ( 2019-02-17 15:46:03 -0500 )edit

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

2 followers

Stats

Asked: 2019-02-14 11:12:05 -0500

Seen: 1,422 times

Last updated: Feb 15 '19