Working with external data : Scenario file : Case 2

Case 2: Providing a set of values for a variable in a fixed-membership multiple-instance submodel: values stored in the scenario file

This case applies when you have a variable in a fixed-membership submodel which has a small number of instances. A typical example might be a submodel whose job is to hold the values for each of several crop types. The number of crop types is probably small.

On the model diagram

  1. Open up the equation dialogue for the variable, by double-clicking on it.
  2. Click the radio button labelled "File Parameter".
  3. Close the equation dialogue window.

Note that the variable now appears with a tail, showing the change in its status. Note also that it is black, even though you have not supplied a value for it.

When you come to run the model

Simile will produce a File Parameter dialogue window, and this will contain an entry for this variable.

  1. Click in the associated edit field, and type in a n pairs of values, where n is the number of submodel instances. The first value of each pair should be the number 1, 2, 3, etc. The second should be the value you wish to assign to that instance. Thus, if the submodel has 4 instances, and you want to assign the values 4, 5, 6 and 9 to the 4 instances, then you should type in:

    1 4 2 5 3 6 4 9

    just like that (i.e. with no brackets, commas or whatever).

  2. Click Save if you wish to save this setting (along with any others), and specify a file to save it in.
  3. Click OK when you wish to proceed with the simulation.

In: Contents >> Working with external data >> Using scenario files