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
compatCompatibility (XMILE, Vensim, etc) problem or enhancementengineIssues with the rust-based simulation engineenhancementNew feature or requestepicfrontendInvolved the React-based Typescript frontend
I had written a bunch of notes on sd.js a few years ago that are relevant (more or less)
diagram changes (minimal)
figure out if it makes sense to do single-dimensional first, or multi-
dimensional from the start
parser:
array reference/slicing
transpose operator
semantic analysis/validation:
validate indexing
validate slicing
transpose using dimension names
transpose using positions
array slicing (A[1, *])
optimization?
the simple thing to do is have a nest of for loops for each individual
variable. This is simple, I worry it will be slow for large models (which
are very common users of arrays). If we're doing operations on multiple
variables with the same dimensions in a row, we can merge them into a
single loop. This is straightforward logically, but there is no
optimization framework in place yet, so that would need to be added.
codegen:
apply-to-all equations
nested for loop
non-A2A equations
non-A2A graphical functions
array slicing (A[1, *])
transpose using dimension names
transpose using positions
runtime:
know about defined dimensions + their subscripts
allocate correct amount of space for arrayed variables
be able to enumerate all subscripted values for CSV output
be able to return results for arrayed_variable[int_or_named_dimension]
right now, the runtime is pretty dead-simple. Every builtin
function expects one or more numbers as input. With the array
builtins, this is no longer the case.
index into arrays with non-constant offsets: constants[INT(RANDOM(1, SIZE(foods)))]
create slices of arrays: SUM(array[chosen_dim, *]), where chosen_dim is an auxiliary variable.
this means runtime type checking, and I think runtime memory
allocation (right now memory is allocated once, in one chunk, when a
simulation is created, which is fast and optimial).
compatCompatibility (XMILE, Vensim, etc) problem or enhancementengineIssues with the rust-based simulation engineenhancementNew feature or requestepicfrontendInvolved the React-based Typescript frontend
Activity
bpowers commentedon Dec 17, 2020
I had written a bunch of notes on sd.js a few years ago that are relevant (more or less)
dimensional from the start
A[1, *])variable. This is simple, I worry it will be slow for large models (which
are very common users of arrays). If we're doing operations on multiple
variables with the same dimensions in a row, we can merge them into a
single loop. This is straightforward logically, but there is no
optimization framework in place yet, so that would need to be added.
A[1, *])MIN,MEAN,MAX,RANK,SIZE,STDDEV,SUM.arrayed_variable[int_or_named_dimension]function expects one or more numbers as input. With the array
builtins, this is no longer the case.
constants[INT(RANDOM(1, SIZE(foods)))]SUM(array[chosen_dim, *]), wherechosen_dimis an auxiliary variable.allocation (right now memory is allocated once, in one chunk, when a
simulation is created, which is fast and optimial).
doc: record MAX_LTM_CIRCUITS removal in design plans and tech debt
doc: record MAX_LTM_CIRCUITS removal in design plans and tech debt
doc: record MAX_LTM_CIRCUITS removal in design plans and tech debt
engine: address minor review feedback on ltm tiered enumeration
doc: capture measurements and update ltm tiered enumeration docs (#482)
engine: address minor review feedback on ltm tiered enumeration