Courses: Introduction to GoldSim:
Unit 10 - Dealing with Dates and Time
Lesson 11 - Unit 10 Summary
There are two ways to carry out a dynamic simulation in GoldSim (specified by selecting the Time Basis in the Simulation Settings dialog):
- In an “Elapsed Time” simulation (the default and what we have been using so far), you specify a simulation Duration. The simulation is then tracked in terms of the elapsed time since the simulation began. When plotting a time history result, the x-axis is labeled in terms of elapsed time (and would therefore start at zero).
- In a "Calendar Time" simulation, you enter a Start Time and an End Time, and the simulation is tracked in terms of the calendar date/time (i.e., GoldSim tracks things like what hour of the day, day of the week and month it is during the simulation). When plotting a time history result, the x-axis is labeled in terms of of the date or time of day (and would start at the Start Time).
If the simulations you are running are very short (e.g., minutes or hours) or very long (e.g., hundreds of years), in most cases an Elapsed Time simulation would be appropriate. However, when your simulation time is between these two extremes, it is quite possible that you will want to run a Calendar Time simulation. This is because some inputs, or the behavior of the system itself, might depend on the time of day or the date, and hence you will want to specifically track and reference this information in your model.
This Unit described how to create models in which you specifically track and reference calendar dates or time of day.
The key points that we covered were as follows:
- Calendar-based models are defined based on a specified Start Time and an End Time (in terms of calendar date and time of day). There is considerable flexibility with Calendar Time simulations to specify calendar-based timesteps. In calendar-based models, the timestep (the Basic Step) will not necessarily be constant (e.g., if the timestep is based on calendar months).
- The x-axis for time histories is labeled in terms of the date instead of elapsed time in calendar-based simulations.
- The real power of calendar-based simulations is the ability to directly reference dates (and time of day) during a simulation using Run Properties.
- In many cases, you will want to input external time histories of data into your models; that is, a table showing how a variable will change throughout the simulation (e.g., every hour, every day). Such a table of data is referred to as a time series. When you enter a time series as an input, you are explicitly specifying how a variable will change with time during the simulation. As a result, GoldSim provides a special element (the Time Series element) that was specifically designed to define time series inputs.
- In most cases, you will want to use historic data to populate a time series. In such a case you typically would not enter the data by hand, and can instead instruct GoldSim to import the data directly from a spreadsheet.
- When you import historic data, it will be imported using calendar-based times (from the past). But most simulations look forward in time (i.e., we build simulations to predict what will happen in the future). Therefore, in order to use this data, you need to shift the data from historic dates to future dates. To support this, GoldSim provides an option to time shift the data in a specified manner.
- In many cases (particularly when running calendar-based models), you may have a short timestep (e.g., daily) but want to report results (e.g., average values) over longer specified periods (e.g., monthly, annually). To support this, GoldSim allows you to create Reporting Periods.
- Reporting Periods, among other things, allow you to take a model with a short timestep (e.g., daily), and report average values over longer specified periods (e.g., monthly, annually). In some cases, however, you may want to compute a different kind of average – a moving average. Integrator elements (a simplified version of a Reservoir element) provide the (optional) ability to compute a moving average.