Ask Your Question
0

Storing variable value from current time step and use it in next time step in user defined model writing

asked 2025-07-23 06:03:58 -0500

Nasika gravatar image

I am writing an user defined model which takes one of the input as deltaP (change in P of synchronous generator). I have tried using DSTATE but is giving an error saying "this name does not have a type and must have an explicit type". Can anyone please help a step by step procedure how to achieve the above requirement it would a great help.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2025-07-23 14:02:43 -0500

perolofl gravatar image

The VAR array is used for storing values between time steps. Reserve a VAR in the model. Set a value in mode 1. Use the value in mode 2 or 3 and set then the new value to be stored to the next time step.

DSTATE is the derivative of the STATE and cannot be used for this purpose to store information.

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: 2025-07-23 06:03:58 -0500

Seen: 858 times

Last updated: Jul 23