Different behaviour for Vector Select function when compiled

Use this forum to post Vensim related questions.
Post Reply
Posts: 40
Joined: Wed Mar 25, 2009 1:10 pm

Different behaviour for Vector Select function when compiled

Post by drw »

Hi Folks,

Investigating compiled versus non-compiled for our rather large energy model, and was noticing some output differences between compiled versus non-compiled. I managed to track it back to some equations that were using the VECTOR SELECT function which was using double subscript variables. Essentially, in the compiled version it seems like only the second subscript variable was utilised in the function and the first subscript was ignored (the queried, not compiled module behaved as expected). This was using 64 bit DSS v8.06 on Windows 10.

So for example say the first subscript has an array of 3 elements [1,2,4] and the second subscript has weightings (let's make them all 1 for convenience e.g. [1,1,1]). Then a vector select function using the sum action would return 7 (1*1 + 2*1 + 4*1) in the non compiled version as expected. In the compiled version it would return 3 (1 + 1 + 1) and ignore the first set of subscript values.

I have included a sample model with results and dll which illustrate the issue. Wondering if this is a known bug? (Note, I haven't tested it on the 32-bit version of Vensim).

(56.46 KiB) Downloaded 29 times

Super Administrator
Posts: 3624
Joined: Wed Mar 05, 2003 3:10 am

Re: Different behaviour for Vector Select function when compiled

Post by Administrator »

Thanks for this report. This bug has been present in Vensim for a long time.

I'll get back to you as soon as I have a solution.
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!

Post Reply