Hello,
I have the following data to import in my model:
time(days), concentration
0, 0.0959
0.13, 0.0838
0.29, 0.0746
0.51, 0.0663
1.01, 0.0586
2.02, 0.0443
3.02, 0.0381
3.03, 0
3.23, 0
3.4, 0
6.06, 0.0117
This data is driving my model and I want to interpolate between the datapoints. Linearl interpolation is fine, I just need values at the times in between.
I did not find linear interpolation in SIMILE, so I did the interpolation in external software (ModelMaker) and then produced a file with the interpolated data at a timestep of 1 minute (8726 timesteps).
Now, whenever I run the model, it is extremely slow. The file parameters dialogue takes very long (3-4 minutes to import the data). Is there any way to make this faster? Or how to interpolate the original data in SIMILE?
Thank you for your help.
:)
Roman
Importing data/ interpolating/ very slow
I see what you mean. Simile should be able to load large parameter arrays somewhat quicker than that; it's probably checking for changes in the entry field when it doesn't need to. I'll get that fixed in a patch release.
Adding an interpolation function to the time series loader will probably have to wait for the next major release, but I have created a model fragment that will do it for you. Include this in your model, and make sure the submodel 'Datapoint' is set to the same number of instances as you have time points in your file.
Load the two fixed parameters with the data from your columns of time points and values respectively. Hint: if you do not drag any headings into the indices table, it will use the row number as the index. The rest of the model segment works out the interpolated value for the current time by finding the indices of the last and next time points and scaling the values at those times.
I've tried it with your data above and it interpolates it nicely. Let me know if you have any trouble getting this working.
Cheers
--Jasper
Importing data/ interpolating/ very slow
Drat, can't attach files here! I'll stick it on the website and post again.
Importing data/ interpolating/ very slow
Jasper,
thanks, I'll try your submodel as soon as I get it.
cheers,
Roman
Importing data/ interpolating/ very slow
Jasper,
you could send the submodel via email if that's easier for you.
r dot ashauer at csl dot gov dot uk
Roman
Importing data/ interpolating/ very slow
OK, I've put it on our website with a brief description at
http://simulistics.com/examples/TimeSeries/timeseries.htm
Importing data/ interpolating/ very slow
Thanks, it works!
:-)
cheers
Roman
Now let's see if I get the parameter estimation running...