Category: System Dynamics # syState

Represents state element for information flows.

## Syntax

`syState(RateOfChange, DiscreteChange, InitialValue, TimeNow)`

The syState function syntax has the following arguments:

• RateOfChange: required. Rate of change as a number or a name of corresponding syLoop().
• DiscreteChange: required. Discrete change in particular timestep as a number or a name of corresponding syLoop().
• InitialValue: required. Initial state at the very beginning of simulation time.
• TimeNow: required. Reference to a cell with syClock().

Return value is current state.

## Remarks

syState provides a state variable in the model. Similar element is syStock() which is best suited to material flows modeling.

The value of the syState is changed according to the rate of change (in assumed unit of time; RateOfChange) that can be negative or positive. InitialValue is the value of syState at the start of the simulation time. At each timestep, a specific value can be added by setting DiscreteChange argument.

Feedback loops can be arranged by syLoop() elements. To implement the feedback loop, firstly refer to the model's "outcome" variables like syState and other elements in your model, by Excel formulas. These formulas should represent the system's behavior and interrelations between variables. The resulting value that directly influences the syState (rate of change or discrete change) can be provided to syState by the syLoop() element.

NOTE: If syState refers to a syLoop() that does not depend from the model, its return value is error #VALUE during simulation.

## Examples

• `=syState(0,A3,0,A1)` - Together with `=syScheduler(0.5,3,A1)` in cell A3 we arranged a simple counter of events coming from syScheduler, discretely adding events to the state variable.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8347267,"math_prob":0.90749776,"size":1769,"snap":"2023-40-2023-50","text_gpt3_token_len":386,"char_repetition_ratio":0.13087818,"word_repetition_ratio":0.046153847,"special_character_ratio":0.19841719,"punctuation_ratio":0.1373802,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98654425,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-03T11:46:23Z\",\"WARC-Record-ID\":\"<urn:uuid:2132ead8-f94c-4c93-b924-13d671642ab3>\",\"Content-Length\":\"30530\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9bb37fba-7840-4626-893b-f5228fc228e7>\",\"WARC-Concurrent-To\":\"<urn:uuid:dffaca1a-f0f7-4c15-a8ec-99e0ee10ef38>\",\"WARC-IP-Address\":\"212.44.113.144\",\"WARC-Target-URI\":\"https://sprysimulation.com/reference/syState/\",\"WARC-Payload-Digest\":\"sha1:2QO6M3ZBGWWB5ITWX6PNV4RFRX5WP5RW\",\"WARC-Block-Digest\":\"sha1:LZEIROGL72N3JUS5SUI5LPRCQR5ODUQE\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100499.43_warc_CC-MAIN-20231203094028-20231203124028-00093.warc.gz\"}"}