In some cases, you may want to create smaller timesteps over a defined period of your simulation. For example, if you know that early in your simulation, variables will change rapidly, you may want to use a small timestep initially. To support this, GoldSim allows you to select periods during your simulation in which the timestep is decreased for a specified duration, before returning to the timestep defined via the Basic Step (or Reporting Period).
These periods during which the timestep is shorter are defined at the top of the Advanced Time Settings page (accessed via the Advanced… button on the Time tab of the Simulation Settings dialog):
You can add a new time period with a shorter timestep by pressing the Add… button. When you do so, a dialog for specifying the period will be displayed. The dialog differs based on whether the Time Basis is Elapsed Time or Calendar time.
If you are carrying out an Elapsed Time simulation, the dialog looks like this:
The elapsed Start Time and End cannot overlap with another defined period. The Period Timestep must divide evenly into the Basic Step (if one is defined), or the shortest Reporting Period (if there is no Basic Step). It must be smaller than the period it is dividing. The Start Time, End Time and Period Timestep can be defined using any time unit. This can be specified as a number or an equation (but you cannot link to an element).
If you are carrying out a Calendar Time simulation, the dialog looks like this:
The Start Time and End Time are specified as dates/times cannot overlap with another defined period. The Period Timestep must divide evenly into the Basic Step (if one is defined), or the shortest Reporting Period (if there is no Basic Step). If the Basic Step is defined as a calendar duration (e.g., Calendar months), then the Period Timestep must divide evenly into a day. The Period Timestep must be smaller than the period it is dividing. It can be defined using any time unit. This can be specified as a number or an equation (but you cannot link to an element).
Note: If you press the Show Scheduled Updates… button at the top of the Time tab, all of the scheduled timesteps in the model will be displayed. Because Period Timesteps add scheduled timesteps, you can use this to see exactly where they will be added.
It is important to understand how GoldSim actually schedules these Period Timesteps, and this can best be done by considering an example. Consider a 100 day simulation with a 20 day basic timestep. By default, scheduled updates would then occur at 0, 20, 40, 60, 80 and 100 days. Now assume that we schedule a Period Timestep that looks like this:
When would the updates occur? In this case, they would occur at 0, 20, 28, 32, 36, 40, 60, 80 and 100 days. Note that there is not a step at 25 days. The first shortened step occurs at 28 days. GoldSim simply adds timesteps at all multiples of the Period Timestep (in this case 4 days) that fall within the Period (in this case 25 to 40 days). The first multiple of 4 that falls within the Period is 28.
By default, Period Timesteps are not saved as part of time history results. However, if you check Include in Time Histories, these scheduled timesteps will be saved. In this case, the Save Every option on the main Time tab applies to these shorter steps. For example, if you have a 100 day simulation, a 5 day basic step, a 1 day step applied for the first 10 days, and Save Every is set to 2, then GoldSim would save time history results at 0, 2, 4, 6, 8, 10, 20, 30, 40, 50, 60, 70, 80 90, and 100 days.
Once you have added a Period Timestep, you can edit it by pressing the Edit button, or delete it by pressing the Remove button.
Note: In addition to allowing you to create a predefined schedule of timestep changes using Period Timesteps, you can also instruct GoldSim to dynamically adjust the timestep during a simulation based on the values of specified parameters in your model, or adjust the timestep locally within different portions of your model.
A simple example file illustrating adding shorter timesteps over defined periods (PeriodsWithShorterSteps.gsm) can be found in the Running subfolder of the the General Examples folder in your GoldSim directory (accessed by selecting File | Open Example... from the main menu).
Learn more about:
Defining the Time Basis and Simulation Duration
Specifying When Time History Results Will Be Saved