Home > Calculations > User Defined Functions

 User Defined Functions                                                                                              

Example Functions
Using Functions for Capital
Using Lookup Tables in User Functions
Shared Functions - Function Library
Using Custom Variables - Time Series in Functions
Reporting On User Functions
Units in Calculations
Error Messages - User Functions
Function Reference Library



WellSpring allows entry of user defined functions in certain fields within WellSpring.  They include:

Where a function is available for input, there is a green "fn" beside the text box. 



Clicking on the "fn" will bring up the function builder:


 

Functions can be typed into a reference cell in Wellspring any place where there is a "Fn" symbol.  You can also use the function builder to assemble complex functions, as well as test them.

The function builder can also be useful where the formula arguments are codes rather than strings.  For example, Capital classes are represented in the equations as codes, not text.

To create a formula from the function editor:

Select the formula that you wish to use and click on it.  In this example we are using the @DataWI function which has arguments of "Products List", "Data Type", and "Index".




Position the cursor in the first argument field, and click "Oil" from the Products List.  In this case, we could optionally type in "Oil", but not all arguments are equal to their text.



Lastly, type in the Index, or another formula to calculate the index for you.



After the project has been calculated, this function can be tested by hitting the "Test" button.  If this project started in January of 2009, then 11 represents the 12th time step, or January of 2010. 

If the test generates a red error message, refer to Error Messages - User Functions

Note: The index starts at zero.

Note: Calculations are done in metric default units, while monetary units are in dollars.  Refer to the units table in the Units in Calculations table.

 

 

See Example Functions for some example equations in the function builder.


See also



Calculation Options
Errors and the Calculation Log
Improving Calculation performance
WellSpring Optimizer and Options
Risk
Sensitivity Analysis
Scenario Analysis