Defining time series data as a lookup table

Answered

Comments

1 comment

  • Avatar
    Jason

    Mark,

    Thanks for posting in the GoldSim Forum. This is a good question. You have some options here. One is to pre-process the data in Excel first by removing any rows with blank values and let the Time Series element linearly interpolate through those dates. Also, just yesterday, I presented a webinar on spline interpolation for missing time series data, which you can view here: Interpolation Methods for Time Dependent Data (March 2022) – GoldSim Help Center. In the case I demonstrate in that webinar, I use the value of -999 to fill in the blank values and the spline interpolation will take over.

    If it were me, I would choose the Time Series element option above and use linear interpolation by removing the bad rows if possible because that is the easiest. The Time Series element is really meant for handling time series and so it is always the best option in cases like this.

    However, there have been times when I've used a Lookup Table to represent time series data as well. It is more rare but certainly possible. You can do this by changing the date string to a julian day integer similar to what Excel uses. In Excel, if you change the date format to a number, then you get something like this:

    4/1/2022 --> 44652


    Change all of your dates to a number and GoldSim will be able to lookup values based on the current date of the simulation just fine. But you will still have the problem of blank values because a Lookup Table is not valid with blanks similar to the problem you found in the Time Series.

    I hope this helps!

    0
    Comment actions Permalink

Please sign in to leave a comment.