You are here

Loading external multiple time series for multiple instances

It is not clear from the online documentation how to load multiple timeseries for multiple instances of a submodel from an external data file or files. The "File...Parameters" menu does not allow me to choose multiple columns to represent the multiple timeseries for each instance of the submodel but states that I need (TIME x 3 of REAL).

In other words, for submodel instance 1 I have timeseries 1, for submodel instance 2 I have timeseries 2 and for submodel instance 3 I have timeseries 3.

I know when loading a timeseries in general the format is 1 line of header and then time,variable. I set up my csv file for the multiple instance submodel in the way described under Case 4 of "Using the scenario file mechanism" web page, i.e.

time,name1,name2,name3
0,value0_timeseries1,value0_timeseries2,value0_timeseries3
1,value1_timeseries1,value1_timeseries2,value1_timeseries3
2,value2_timeseries1,value2_timeseries2,value2_timeseries3
3,value3_timeseries1,value3_timeseries2,value3_timeseries3
etc...

Is this the proper format? SIMILE does not seem to like this and I could not find a more explicit description in the documentation how to specify in the File...Parameters (and eventually an .spf file) the 3 separate timeseries?

Thanks,

Amy

Forums: 

Hi Amy,

You have to have an index for the submodel instance so the correct format for Simile is:

time,instance,name
0,1,value_timeseries
0,2,value_timeseries
0,3,value_timeseries
1,1,value_timeseries
1,2,value_timeseries
1,3,value_timeseries
2,1,value_timeseries
2,2,value_timeseries
2,3,value_timeseries
3,1,value_timeseries
3,2,value_timeseries
3,3,value_timeseries
etc

Jonathan.

 

An example: the model (MIsubmodel.sml) has a fixed instance submodel with three instances containing variable paramter var1.

A data file, timeseriesfor3instances.csv, with values for the three instances and time 0,1..10.

Time, instance, value
0,1,0
0,2,0
0,3,0
1,1,1
1,2,2
1,3,3
2,1,2
2,2,4
2,3,6
3,1,3
3,2,6
3,3,9
......

 

The model file is a package with integral paramter file (spf) but TableDataDialogue3instance.png is also included to show the table data dialog when setting up the parameters.