PlantComponent:UserDefined ems control

Hi everyone, I'm using the PlantComponent:userdefined input object to model a new storage system. I'm learning about Ems and was wondering what's the ems syntax for updating a variable value based values from previous time steps? Say I have a variable x representing the state of charge, and C representing my rate of charge, i want my ems charging script to translate the following:

X(0)=0 ! Initial state of charge

For t from 1 to 7am

X(t)=X(t-deltat)+C*deltat !current state of charge at time t

Any insights? Thank you,

HoussemYounes's avatar
271
HoussemYounes
asked 2021-11-07 18:55:12 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2022-02-23 13:35:57 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments