-
Notifications
You must be signed in to change notification settings - Fork 13
Simulation Clock Advancement Modes
Maggie Sullivan edited this page Jun 13, 2023
·
10 revisions
Once you start a simulation run in Alfalfa, the clock will always advance in 1 minute timesteps, and all output variables will be available at this interval. However, Alfalfa has 3 parameters available when starting a run which impact the rate at which the simulation clock advances: timescale, externalClock, and realtime. These modes are described below:
- In this scenario, the model will only advance when explicitly told to advance by an external call. It has no regard for real time passing but sits in an idle state until told to advance. The simulation starts at the specified start time.
- Upon call to advance, Alfalfa will look for any points written from external sources, write these into the simulation, and advance the simulation one time step (1-minute in model time).
- It then waits to advance until the next call is made.
- It will stop if the model has advanced enough times such that the end datetime has passed or if it is specifically told to stop.
- In this scenario, the timescale parameter is used to control the rate at which the internal clock advances through the simulation. It represents the integer ratio of model_time:real_time. For example, a value of 5 means that the simulation will advance at 5x the rate of real time. In other words, one minute of simulation time will occur every 12 seconds of real time.
- Regardless of the start time specified for the run, the simulation will begin running.
- Upon reaching the time to advance, Alfalfa will look for any points from external sources, write these into the simulation, and advance the simulation one time step (1-minute in model time).
- It then waits X time in real time before advancing through the next time step.
- It will proceed until it has reached the specified end datetime or if it is specifically told to stop.
- If the simulation falls more than 2 timesteps behind it will throw an error and kill the simulation.
- This scenario is similar to the timescale with the following caveats.
- The timescale parameter is always one (i.e. the model advances one minute in model time for every one minute that passes in real time).
- If the specified model start time has already passed in real time, the start time will be overwritten to the current time and the simulation will begin. However, if the specified model start time has not already passed in real time, the simulation will not begin until that time in real time is reached.
- It will then proceed until it has reached the specified end datetime or if it is specifically told to stop.
- All external calls to advance the simulation are ignored.
- Getting Started with Model Measures Part 1: Creating Inputs and Outputs
- Getting Started with Model Measures Part 2: Creating Actuators
- Getting Started with EnergyPlus Measures Part 1: Creating Inputs and Outputs
- Getting Started with EnergyPlus Measures Part 2: Creating Actuators
- How to Configure an OpenStudio Model
- How to Configure Measures for Use with Alfalfa Ruby Gem
- How to Create Inputs and Outputs With Measures
- How to Run URBANopt Output Models in Alfalfa
- How to Migrate EnergyPlus Python Plugins
- How to Integrate Python based Electric Vehicle Models with OpenStudio Workflows
- How to Locally Test OpenStudio Models
- Required Structure of OpenStudio Workflow
- List of Automatically Generated Energyplus Points
- Alfalfa EnergyPlus Mixin Methods
- Getting Started with Uploading and Running a Model Using Python
- Getting Started with Uploading and Running a Model Using the UI
- How to Install Alfalfa Client
- How to Preprocess and Upload a Model
- How to Step Through a Simulation
- How to View Historical Data in Grafana
- How to Configure an Alias
- How to Troubleshoot Models