Hi
My question is, can I have different distribution for each of my subscript in vensim? the problem is I have three subscript and I want to define the price for each of them as random normal with different mean and std; however it causes an error. could you please guide me?
Cheers
Samira
different distribution for each subscript
-
- Junior Member
- Posts: 16
- Joined: Fri Jun 24, 2016 4:47 am
- Vensim version: DSS
-
- Super Administrator
- Posts: 4592
- Joined: Wed Mar 05, 2003 3:10 am
Re: different distribution for each subscript
It's very easy to implement. Just subscript the mean and SD as well.
What error are you getting?
And can you post the model so I can take a look?
What error are you getting?
And can you post the model so I can take a look?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Junior Member
- Posts: 16
- Joined: Fri Jun 24, 2016 4:47 am
- Vensim version: DSS
Re: different distribution for each subscript
thanks for your reply, you are right.
Then I have to define 5 new constants to the model and subscript them while I was thinking that maybe I can define it for example like this:
for three subscript:
RANDOM NORMAL(80,90,100,10,1),RANDOM NORMAL(82,95,100,10,1),RANDOM NORMAL(70,95,100,15,1)
Then I have to define 5 new constants to the model and subscript them while I was thinking that maybe I can define it for example like this:
for three subscript:
RANDOM NORMAL(80,90,100,10,1),RANDOM NORMAL(82,95,100,10,1),RANDOM NORMAL(70,95,100,15,1)
-
- Super Administrator
- Posts: 4592
- Joined: Wed Mar 05, 2003 3:10 am
Re: different distribution for each subscript
No, you cannot do that.for three subscript:
RANDOM NORMAL(80,90,100,10,1),RANDOM NORMAL(82,95,100,10,1),RANDOM NORMAL(70,95,100,15,1)
It's good practice to put any constants into a parameter of their own. For example (using your numbers),
define the following subscripted constants
Code: Select all
m[sub] = 80,82,70
x[sub] = 90,95,95
h[sub] = 100
r[sub] = 10,10,15
s[sub] = 1
Code: Select all
RANDOM NORMAL(m[sub],x[sub],h[sub],r[sub],s[sub])
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Junior Member
- Posts: 16
- Joined: Fri Jun 24, 2016 4:47 am
- Vensim version: DSS
Re: different distribution for each subscript
Thanks for your reply.
It means if I have 10 variables like this ( with different distributions for each subscript) I need to define about 50 extra variables in the model, right?
It means if I have 10 variables like this ( with different distributions for each subscript) I need to define about 50 extra variables in the model, right?
-
- Super Administrator
- Posts: 4592
- Joined: Wed Mar 05, 2003 3:10 am
Re: different distribution for each subscript
You could. But you could also just use the one noise seed for all distributions.
This would be much easier if you uploaded your model so we could take a look.
This would be much easier if you uploaded your model so we could take a look.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559