Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > Functions > Lookups

WITH LOOKUP(x,(l#)) auxiliary WITH LOOKUP of the y value corresponding to x in the xy pairs l#

Scroll Prev Top Next More

Specifies a nonlinear relationship between the input x and the output by passing the input through a series of x,y pairs specified as numbers.  It is the same as L(x) where L is defined by the equation L(L#).

Restrictions:Must appear first on the right hand side of the equation and can not be followed by anything else.

The WITH LOOKUP function is a convenient way to specify a nonlinear relationship without explicitly naming the Lookup function to be used.  This can reduce clutter and be somewhat quicker than naming a separate Lookup variable but is not as flexible.

Units:WITH LOOKUP(dmnl,#) --> units

Just as for normal Lookup usage the x argument is expected to be dimensionless.  If not, a warning is issued, but not an error.  The output units are those for the left hand side variable.

Example

X=WITH LOOKUP(1.5,((0,1),(1,1),(2,2)) is equal to 1.5.

 

See also: VECTOR LOOKUP, LOOKUP AREA et seq., Lookups

Sample model: WITH LOOKUP.mdl in FunctionExamples