Skip to content

Supported Vensim Functions

Chris Campbell edited this page Oct 25, 2024 · 13 revisions

The following table lists the Vensim functions that are currently supported by SDEverywhere.

Notes:

  • This is a subset of the full list of Vensim functions that can be found in the Vensim help documentation.
  • The "C" column shows which functions are supported when C is the code generation target.
  • The "JS" column shows which functions are supported when JavaScript is the code generation target.
  • If you have a model that uses a function that is not currently supported, contributions are welcome! Consult with the maintainers on the SDEverywhere discussion board for assistance.
  • Refer to the Sample Models page for more details on sample models included in this repository that are used to validate SDEverywhere's handling of these functions.
Function C JS Notes
ABS
ACTIVE INITIAL
ALLOCATE AVAILABLE See caveats for SDEverywhere's implementation of this function
ARCCOS
ARCSIN
ARCTAN
COS
DELAY1
DELAY1I
DELAY3
DELAY3I
DELAY FIXED
DEPRECIATE STRAIGHTLINE ⚠️ The fisc (fiscal period) argument is not currently supported.
ELMCOUNT
EXP
GAME Full support for the GAME function was added in August 2024.
See #483 for more details.
GAMMA LN
GET DATA BETWEEN TIMES
GET DIRECT CONSTANTS
GET DIRECT DATA
GET DIRECT LOOKUPS
GET DIRECT SUBSCRIPT ⚠️ ⚠️ Currently only csv files are supported for this function (no xlsx support yet).
IF THEN ELSE
INITIAL
INTEG
INTEGER
LN
LOOKUP BACKWARD
LOOKUP FORWARD
LOOKUP INVERT
MAX
MIN
MODULO
NPV
POWER
PULSE
PULSE TRAIN
QUANTUM
RAMP
SAMPLE IF TRUE
SIN
SMOOTH
SMOOTHI
SMOOTH3
SMOOTH3I
SQRT
STEP
TAN
TREND
VECTOR ELM MAP
VECTOR SELECT ⚠️ ⚠️ Currently the only supported numerical_action values are 0 (sum) and 3 (max).
VECTOR SORT ORDER
VMAX
VMIN
WITH LOOKUP
XIDZ
ZIDZ
Clone this wiki locally