How to obtain and hold the value of STATE/VAR at a certain time?
In WECC model 'REECAU1', it shows that if voltage_dp=1, STATE(K+2) and STATE(K+3) will be frozen and the value of Iqcmd will be changed from STATE(K+3) to (STATE(K+3)+Iqv) for Thld seconds. I wonder how to achieve this in FORTRAN?
It seems that CALL DSRVAL
in API call get the certain time. However, how can I get the value of STATE at that time? IF I use VAR(L) to store the value, it would be changed over time since VAR(L) is a variable array.
As for set some value for seconds, I think it could be
IF(A<TIME<A+Thld) Iqcmd=STATE(K+3)+Iqv
Is it correct?