Skip to main content

Load CIN Files

With CIN files, you can dynamically choose a set of values that get assigned to the model constants before you start a run.

This approach is in contrast to loading data from Excel or text files, which must be hard-coded into the Vensim model.

Important

To ensure you can choose CIN files at runtime, avoid saving a CIN filename in the model itself.

Configure your project to use CIN files

To use CIN files in a project created with the Epicenter JS libraries:

  • Place the CIN files in the /model directory next to your model file.
  • When creating a run, pass an ExecutionContext object as part of RunCreateOptions in the optionals parameter.
  • Your execution context should contain a VensimModelTool in the tool property.
  • List the CIN file names in the cinFiles property of VensimModelTool.
Learn more

For details on creating a run with the JS libraries, see the Run adapter reference.