Page 1 of 1

limit on length of equation?

Posted: Mon Apr 17, 2006 4:40 pm
by LBD
Hi,

I wanted to know if there was a limit on the size of the equations to be written for a variable in vensim. I am using Vensim DSS. If I copy the equation and paste it in a word document, the equation comes up to be 3 pages long in a 10 point font. Please advice.

Posted: Mon Apr 17, 2006 6:08 pm
by Administrator
I cannot confirm if there is a limit (Bob will), but if the equation is that big, wouldn't it be much better to break the equation up into much smaller chunks? Finding the cause of behaviour in such a large equation is likely to be impossible.

Tony.

Posted: Mon Apr 17, 2006 8:43 pm
by bob@vensim.com
There is no built in limit and the equation you sent me by email seems to work fine - but I would never write one like it.

It appears that you are trying to construct a function of three inputs that jumps to 1 when the inputs get into certain regions of that 3-d space. I can't actually make sense of the equation but if you want to explain what it is trying represent I may be able so suggest a more usable formulation. For example to check if something is near three points you could use

point : p1,p2,p3 ~~|
distance[point] = SQRT((a-afix[point])^2 + (b-bfix[point])^2+(c-cfix[point)^2) ~~|
is close enough = IF THEN ELSE(VMIN(distance[point!]) < 3,1,0) ~~|

Bob Eberlein