Skip to content

mdl: GET DATA BETWEEN TIMES and .dat data variables are unsupported #347

Open

Description

@bpowers

The engine cannot run a Vensim model that uses GET DATA BETWEEN TIMES or a data variable loaded from a companion .dat file.
The model does not compile: the MDL reader leaves those variables with empty equations, and the error the user sees is EmptyEquation instead of a message naming the unsupported feature.

Example

test/sdeverywhere/models/getdata/getdata.mdl:

Values[DimA]    ~~|      (no equation: data from getdata_data.dat)
Value at time plus half year forward[DimA] =
    GET DATA BETWEEN TIMES(Values[DimA], MIN(FINAL TIME, Time + Half year), Forward)

There are two problems:

  • GET DATA BETWEEN TIMES is not a builtin.
    The reader wraps the call as an opaque placeholder and the variable ends up with an empty equation.
  • Values has no equation; Vensim fills it at run time from a .dat file, which the engine does not look for.

The XMILE copy of the same model fails too, because xmutil drops the calls when converting.

Why it matters

The only model in the repo that uses either feature is this sdeverywhere test fixture.
No metasd or other real model in test/ does.
Nothing runs silently wrong today; the model just fails to compile.

Fix

For now, report GET DATA BETWEEN TIMES and a variable with no equation that expects run-time data as unsupported, with that name in the error.

Full support (find the companion .dat, load it through a DataProvider, add the builtin with its interpolate/forward/backward modes) can wait until a real model needs it.

Pointers

  • src/simlin-engine/src/mdl/convert/external_data.rs: is_external_data_placeholder
  • The comment above the getdata entry in src/simlin-engine/tests/integration/simulate.rs
  • src/simlin-engine/src/data_provider/

Activity

  1. added
    engine
    compat
    on Jun 8, 2026
  2. changed the title [-]engine: GET DATA BETWEEN TIMES + implicit .dat loading blocks 2 simulation tests[/-] [+]mdl: GET DATA BETWEEN TIMES and .dat data variables are unsupported[/+] on Oct 12, 2026
  3. added
    enhancement
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatengineenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions