You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #307, when diagnosing differences between in output between SDEverywhere and Vensim, it's helpful to be able to compare variables in the order that they are evaluated in the code generated by the SDEverywhere compiler.
Currently there are two limitations that make it difficult to do this sort of comparison:
The JSON listing contains variables in roughly the order of evaluation, but they are not exactly grouped according to the exact order of evaluation. Ideally we would have the variable instances grouped by type.
It is necessary to get the "subscript indices" needed to access these internal variables at runtime, but currently the only way to get these is to do some complex expansion of the dimensions and variables objects to derive the correct subscript indices. Ideally we would expose the specific details for each variable instance so that no post-processing is needed to access the information.
To address these limitations, I'm going to add a new varInstances field to the JSON listing that includes grouped arrays that are in evaluation order, one object per variable "instance", to make it relatively easy to request the data at runtime for a specific subscripted instance of a variable:
As mentioned in #307, when diagnosing differences between in output between SDEverywhere and Vensim, it's helpful to be able to compare variables in the order that they are evaluated in the code generated by the SDEverywhere compiler.
Currently there are two limitations that make it difficult to do this sort of comparison:
dimensions
andvariables
objects to derive the correct subscript indices. Ideally we would expose the specific details for each variable instance so that no post-processing is needed to access the information.To address these limitations, I'm going to add a new
varInstances
field to the JSON listing that includes grouped arrays that are in evaluation order, one object per variable "instance", to make it relatively easy to request the data at runtime for a specific subscripted instance of a variable:Here's an example item:
These groupings match the order of execution/evaluation in the generated model:
const
only, called for t=0 only)lookup
only, called for t=0 only)data
only, called for t=0 only)initVars
, a mix of initial, aux, and level vars, called for t=0 only)level
only; called beforeevalAux
for t>0)aux
only)The text was updated successfully, but these errors were encountered: