Interface: ResolvedModelSpec
August 19, 2026 ยท View on GitHub
@sdeverywhere/build / ResolvedModelSpec
Interface: ResolvedModelSpec
Describes a model (e.g., a Vensim mdl or Stella stmx file) and the input/output variables
that should be included in the model generated by SDEverywhere. This is
largely the same as the ModelSpec interface, except this one has been
fully resolved (paths have been validated, input and output variables have
been checked, etc). This is the spec object that will be passed to plugin
functions.
Properties
inputVarNames
inputVarNames:
string[]
The input variable names for the model. This will be defined regardless
of whether ModelSpec.inputs was defined as an array of variable names
or an array of InputSpec instances. (The input variable names are
derived from the InputSpec instances as needed.)
inputs
inputs:
InputSpec[]
The input variable specs for the model.
outputVarNames
outputVarNames:
string[]
The output variable names for the model. This will be defined regardless
of whether ModelSpec.outputs was defined as an array of variable names
or an array of OutputSpec instances. (The output variable names are
derived from the OutputSpec instances as needed.)
outputs
outputs:
OutputSpec[]
The output variable specs for the model.
datFiles
datFiles:
DatFileSpec[]
The dat files that provide the data for exogenous data variables in the model.
bundleListing
bundleListing:
boolean
Whether to bundle a model listing with the generated model.
When this is true, a model listing will be bundled with the generated
model to allow the runtime package to resolve variables that are
referenced by name or identifier. This listing will increase the size
of the generated model, so it is recommended to set this to true only
if it is needed.
customConstants
customConstants:
boolean|string[]
Whether to allow constants to be overridden at runtime using setConstant.
If false, the generated model will contain a setConstant function that
throws an error, meaning that constants cannot be overridden at runtime.
If true, all constants in the generated model will be available to be overridden.
If an array is provided, only those variable names in the array will be available to be overridden.
customLookups
customLookups:
boolean|string[]
Whether to allow lookups to be overridden at runtime using setLookup.
If false, the generated model will contain a setLookup function that
throws an error, meaning that lookups cannot be overridden at runtime.
If true, all lookups in the generated model will be available to be overridden.
If an array is provided, only those variable names in the array will be available to be overridden.
customOutputs
customOutputs:
boolean|string[]
Whether to allow for capturing the data for arbitrary variables at
runtime (including variables that are not configured in the outputs
array).
If false, the generated model will contain a storeOutput function
that throws an error, meaning that the data for arbitrary variables
cannot be captured at runtime.
If true, all variables in the generated model will be available to be captured at runtime.
If an array is provided, only those variable names in the array will be available to be captured at runtime.
directData?
optionaldirectData?:object
The mapping of data tag to
Excel workbook file name, used to resolve the data for GET DIRECT DATA,
GET DIRECT CONSTANTS, and GET DIRECT LOOKUPS calls in the model.
Each key is the tag that appears in the model equation (for example, ?data), and each
value is the name of an xlsx file that is resolved relative to the model directory.
Index Signature
[dataTag: string]: string
dimensionFamilies?
optionaldimensionFamilies?:object
The mapping of dimension name to family name, used when SDEverywhere cannot infer the family for a dimension from the model alone.
Both the keys and the values use the dimension names as they appear in the modeling tool (they are converted to canonical form when the spec file is read).
Index Signature
[dimName: string]: string
specialSeparationDims?
optionalspecialSeparationDims?:object
The mapping of variable identifier to the dimension(s) on which that variable should be separated into one variable instance per subscript.
Separating a variable is sometimes necessary to break a dependency cycle that would otherwise prevent the model from being evaluated. Each value can be either a single dimension identifier or an array of dimension identifiers.
Index Signature
[varId: string]: string | string[]
separateAllVarsWithDims?
optionalseparateAllVarsWithDims?: (string|string[])[]
The dimensions for which all variables should be separated into one variable instance per subscript.
This is a convenience alternative to specialSeparationDims that avoids the need to
list each affected variable. Each entry can be either a single dimension identifier or
an array of dimension identifiers; a variable is separated only if every dimension in
the entry appears on the left-hand side of its equation.