Page 1 of 1

Merging vectors in one vector

Posted: Tue Aug 19, 2014 3:56 pm
by sosorior
Hello, I wonder if it is possible to merge different vectors in one vector in vensim. For instance, assume I have 2 subscripts: sub 1 and sub 2.
sub1= a, b
sub2= c, d
x[sub1]=1, 2;
y[sub1]=3, 4;

So I want to create a vector, whose size would be 4 resulting from the size of sub1 and sub2. Then the resulting vector would be:
sub3= a, b, c, d;
z[sub3]=1, 2, 3, 4;

Re: Merging vectors in one vector

Posted: Tue Aug 19, 2014 5:02 pm
by Administrator
You can define sub3 as

sub3 : sub1,sub2

Then you can have multiple equations for z,
z[sub1] = x[sub1]
z[sub2] = y[sub1]