Returning the Minimum or Maximum Value of the Dependent Variable

Sometimes you may want to return the minimum or maximum value of the dependent variable defined in your Lookup Table.

GoldSim provides two special functions to support this. To illustrate their use, consider the following 1-D Lookup table:

Table

Description automatically generated

The special functions that are provided require as their argument the name of the Lookup Table element.  In this example, the name of the element is Elevation.

Tablemin(Elevation) would return 0 m

Tablemax(Elevation) would return 100 m

We could combine this with the Inverse Lookup functionality when referencing a Lookup Table to return the the independent variable associated with the minimum or maximum value of the dependent variable. For example,

Elevation(Tablemin(Elevation), TBL_INVERSE) would return 0 m3

Elevation(Tablemax(Elevation), TBL_INVERSE) would return 1000 m3 m

Note that these two functions (Tablemin and Tablemax) can be used with 1-D, 2-D and 3-D Lookup Tables.

An example model which illustrates these functions (TableFunctions.gsm) can be found in the General Examples/LookupTable folder in your GoldSim directory (accessed by selecting File | Open Example... from the main menu).

Related Topics…

Learn more about: