Page 1 of 1

data type

Posted: Tue Jun 19, 2018 3:06 pm
by bahri
Hi,

I have searched what I need to know in this forum but no luck.
My question are:

1. How do I create variable with "data type" ?
2. Is that possible to use "accumulate function" to accumulate "a stock variable" ?
3. Is that "get data at time function" only works for "data type" ?

Re: data type

Posted: Tue Jun 19, 2018 3:11 pm
by Administrator
bahri wrote: Tue Jun 19, 2018 3:06 pm1. How do I create variable with "data type" ?
In the equation editor, there is a field titled "Type", select "Data" from here.
bahri wrote: Tue Jun 19, 2018 3:06 pm2. Is that possible to use "accumulate function" to accumulate "a stock variable" ?
To accumulate something, you use a stock.
bahri wrote: Tue Jun 19, 2018 3:06 pm3. Is that "get data at time function" only works for "data type" ?
Correct. What do you need to do?


The following might help.
http://www.vensim.com/documentation/ind ... ?usr16.htm

Re: data type

Posted: Tue Jun 19, 2018 3:13 pm
by tomfid
1. http://vensim.com/documentation/usr16.htm

2. You can use CUMULATE/CUMULATEF to calculate cumulative values of data, but it's not the same as a regular stock (INTEG). http://vensim.com/documentation/fn_cumulate.htm

3. Correct. http://vensim.com/documentation/fn_get_data_at_time.htm

Re: data type

Posted: Wed Jun 20, 2018 1:41 pm
by bahri
Hi again,

What I meant is when I choose "constant" or "auxiliary" or "level",
I can type any value(s) or expressions.
But, for "data type", I did not any spaces to type values or mathematical expressions.

Could you please tell me how to create a variable with a "data type" ?

Next, I have a stock (A) and model's time is month.
I want to get a cumulative value of A for every year.
What shall I do ?

Re: data type

Posted: Wed Jun 20, 2018 1:45 pm
by Administrator
I'd start by doing a Vensim tutorial. On this page you will find a really good Vensim PLE tutorial.
http://www.public.asu.edu/~kirkwood/sysdyn/SDRes.htm

This will teach you what you need to get started.

Re: data type

Posted: Wed Jun 20, 2018 7:38 pm
by tomfid
The user guide link above explains the data options, but the short answer is, set the Sub-Type of the data variable to "Equation" in the equation editor.

A stock is an accumulation, so I'm not quite sre what you're asking.