Skip to main content
FluidEarth Portal Header version 3

FluidEarth Portal

Go Search
FluidEarth Portal > FluidEarth Discussions > Design of Wrapped PointTimeSeries Component > Design of Wrapped PointTimeSeries Component  

FluidEarth Discussions: Design of Wrapped PointTimeSeries Component


Yes, you are using PerformTimestep() to feed out your data one timestamp at a time even though you actually hold data for the whole time horizon within an array.
It is worth noting that a future development of the SDK will make this implementation even more simple.  It will allow you to populate the array and pass that array out to the SDK in one go rather than having to use PerformTimestep.
Another issue to bear in mind is that the SDK will use linear interpolation to calculate a value at the time required by the requesting component.  The requesting component is the model that has an input exchange item linked to the output exchange item of your component (yellow box in Configuration Editor).  The result of connecting your component to a model running on a much finer timestep could be an undesired smoothing of the data.

From: Qharpham
Posted: Tuesday, October 07, 2008 10:49 AM
Subject: Design of Wrapped PointTimeSeries Component

By set up I really mean "prepare configuration file". Certainly, Initialise() will read all of this data.
So with this example, where all of the data is retrieved from a live source, there is no indicative time-step. The timestepping function merely goes to the next array item for which there is data.

From: JMauz
Posted: Tuesday, October 07, 2008 10:39 AM
Subject: Design of Wrapped PointTimeSeries Component

Set Up and On Initialise as described above should be combined and coded in the Initialise() method.  As stated the return value will be the first timestamp (converted to a double).
In PerformTimestep() return a timestamp as a double and  populate the double array dataOut with the value for that timestamp.  In your code you will need to keep track of which timestamp you last returned so that you can increment to the next timestamp in the next call of PerformTimestep().
Content Type: Message
Created at 07/10/2008 11:08  by JMauz 
Last modified at 07/10/2008 11:08  by JMauz