In case you missed the recent webinar on Time Series Analysis in GoldSim, visit our archive page to watch a video recording and review the model examples: https://support.goldsim.com/hc/enus/articles/360034830773

Hello Jason,
I posted the below message in the forum and may be you can help me with this.
I am new with Gold Sim modelling platform and have been facing a challenge which I am sure would be a very easy fix. I have done quite a bit of browsing to find the answer but no luck. Here is my problem.
I am running a model for two year starting from January 01, 2017 based on Calendar time. I want to run the model for 2 years but need to extract the simulation for only second year for optimization as first year has to be the model spin up/stabilization time. My all the elements in the model carries the data from January 01 2017 to December 31 2018. How can I create/which function should I use to create a new element that carries the data for only second year?
Any help would be greatly appreciated.

Hafiz,
Thank you for posting this question in the forum. I'm going to answer your question there. Please click the link below to see my answer.
https://support.goldsim.com/hc/enus/community/posts/360034522814

Hi Dave  I have a suspicion what might be the cause of the difference between the DLL correlation and the Excel value. The External Element won't be updated (and therefore the DLL function won't be called to store the new Time Series values and update the correlation calculation) on any time step where the value of neither Time Series changes. This is the case with any GoldSim Element i.e. an Element only gets an update notification if the values of one or more inputs to the Element change.
I've put together the following example to illustrate (note, this link will expire after 14 days): https://goldsim.sharefile.com/ds03cdd5d2b514d089.
The values for the two Time Series are imported from the Excel file. Run the model as is and you'll get identical correlation values from GoldSim and Excel (0.8713195). Now, do an experiment where you duplicate values on consecutive rows as in the screenshot below.
The GoldSim DLL won't store the values at time 4 days, because the External Element won't receive an update notification (since its input values don't change from 3 to 4 days). In this case, Excel calculates the correlation on the full data set and gets a value of 0.8710319. GoldSim, on the other hand, calculates the correlation on the full data set except the day 4 values and gets a value of 0.8704556.
Now, for one last test, link 'Missing2' instead of 'Missing1' as an input to the External Element in the GoldSim model. Note that this input can be used to tell the DLL what values in the data set should be treated as missing values (i.e. all those equal to or less than the specified 'Missing' value). I've set up 'Missing2' so that its value changes on every time step. This means that the External Element will always be updated, even if values for the two Time Series stay the same.
In this case, both the GoldSim DLL and Excel calculate the same correlation value of 0.8710319.

As for the fatal error, I'm not sure what might be going on. At some point after the webinar, Jason also encountered a fatal error. I was able to fix the issue in that case, but I'm not sure if you have the updated DLL. If you do have the updated DLL and you're still getting a fatal error, I'd be curious to take a look at it. If you could send me the data for the two Time Series, I could try it out with the DLL I have and see if I get a fatal error. If I do encounter the error, I'll debug the DLL and try to fix it.
Please sign in to leave a comment.
Comments
6 comments