VMax Help
Posted: Wed Apr 08, 2009 12:02 pm
I am new to Vensim and trying to compare multiple variables to each other to find the maximum value. Currently I am doing this by using MAX(Var 1, MAX(Var 2, Var 3)) but want to be able to get the maximum of (Var 1, Var 2, Var 3). I believe that VMAX can be use to do this, but have not had success so far in using VMAX. Do the variables that VMAX is comparing have to be is a specific format, such as a subscripted or scripted variables.
VMAX(X[r!])† Takes the maximum of X over the subscript range r.
VMAX†(x[i!]) MAXimum Over Subscript Range
Returns the maximum value of the elements of an array over the Subscript Range(s) marked with exclamation ! marks.
Units: VMAX(unit) --> unit (the output has same units as the input)
Example
VMAX (x[i!]) is equal to MAX(x[one] , MAX(x[two] , MAX..., x[n]))...).
VMAX(X[r!])† Takes the maximum of X over the subscript range r.
VMAX†(x[i!]) MAXimum Over Subscript Range
Returns the maximum value of the elements of an array over the Subscript Range(s) marked with exclamation ! marks.
Units: VMAX(unit) --> unit (the output has same units as the input)
Example
VMAX (x[i!]) is equal to MAX(x[one] , MAX(x[two] , MAX..., x[n]))...).