Simulation Core: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Each Project in the {{software}} features its own Simulation Core, which is responsible for updating the [[Excel]] file, managing [[ | Each Project in the {{software}} features its own Simulation Core, which is responsible for updating the [[Excel]] file, managing [[Trigger]]s, and handling [[Grid Overlay]]s. | ||
* An update is initiated by a User via the [[Editor]], an [[API]] call, or when the state changes, such as the addition of a new building, while "auto update" is enabled. Triggering a [[Calculation_panel#Reset_X-Queries|Reset X-Queries]] also executes '''Init''' again. | * An update is initiated by a User via the [[Editor]], an [[API]] call, or when the state changes, such as the addition of a new building, while "auto update" is enabled. Triggering a [[Calculation_panel#Reset_X-Queries|Reset X-Queries]] also executes '''Init''' again. | ||
| Line 8: | Line 8: | ||
Below is an overview of each step involved: | Below is an overview of each step involved: | ||
'''Init:''' Simulation models for [[ | '''Init:''' Simulation models for [[Overlay]]s are created and most attributes are initialized. For example, the Water model is initialized if groundwater is active or not. Also the [[Excel]] files are initialized and [[X query (Excel)|X-queries]] are created. | ||
'''Step 1:''' The API [[Triggers]] (with timing BEFORE) are executed. | '''Step 1:''' The API [[Triggers]] (with timing BEFORE) are executed. | ||
'''Step 2:''' Then all [[Update (TQL)|<code>UPDATE</code>]] queries (with timing BEFORE) of [[ | '''Step 2:''' Then all [[Update (TQL)|<code>UPDATE</code>]] queries (with timing BEFORE) of [[Indicator]]s, [[Panel]]s and query [[Global]]s. | ||
'''Step 3:''' Grids are calculated: | '''Step 3:''' Grids are calculated: | ||
* [[Rasterization]] starts: All polygon data ([[ | * [[Rasterization]] starts: All polygon data ([[Building]]s, [[Terrain]]s, [[Area]]s, etc) is converted into grid data. This process is shared by all active [[Overlay]]s for faster execution and is also the reason why all active Overlays must have the same cell size. | ||
* The Simulation models now | * The Simulation models now contain the required grid data and may do some additional validation on them. For example, ensuring there are no elevation values above 10,000 meters. | ||
* The Simulation model schedules jobs that are executed either on | * The Simulation model schedules jobs that are executed either on a [[GPU Cluster]] or regular CPU. The jobs are scheduled in such a way that [[Prequel]] Overlays will be executed before the receiving [[Overlay]]. | ||
* When all jobs have finished the Simulation model compresses the resulting data into a compact format which is stored in the Overlay. | * When all jobs have finished the Simulation model compresses the resulting data into a compact format which is stored in the Overlay. | ||
| Line 37: | Line 37: | ||
=Iterations= | =Iterations= | ||
{{technical|type=section}} | {{technical|type=section}} | ||
* The [[Setting]] <code>ITERATIONS</code> determines how many times this | * The [[Setting]] <code>ITERATIONS</code> determines how many times this process is repeated from step 2. | ||
* When the [[Grid Overlay]] has a [[Iteration active (Grid Overlay)|ITERATION_ACTIVE]] attribute, only the iteration numbers set in this attribute will be executed. For example <code>ITERATION_ACTIVE: 0 5</code> will only calculate in iteration 0 and 5. | * When the [[Grid Overlay]] has a [[Iteration active (Grid Overlay)|ITERATION_ACTIVE]] attribute, only the iteration numbers set in this attribute will be executed. For example <code>ITERATION_ACTIVE: 0 5</code> will only calculate in iteration 0 and 5. | ||
| Line 46: | Line 46: | ||
{{article end | {{article end | ||
|notes= | |notes= | ||
* When the project contains multiple iterations the process is restarted at step 1 and loops | * When the project contains multiple iterations the process is restarted at step 1 and loops until all iterations have been completed. | ||
|seealso= | |seealso= | ||
* [[Calculation panel]] | * [[Calculation panel]] | ||
* [[Limit Map]] | * [[Limit Map]] | ||
* [[Iteration active (Grid Overlay)|ITERATION_ACTIVE]] | * [[Iteration active (Grid Overlay)|ITERATION_ACTIVE]] | ||
|api= | |||
[[Api session event editor update]] | |||
}} | }} | ||
Latest revision as of 15:49, 2 July 2026
Each Project in the Tygron Platform features its own Simulation Core, which is responsible for updating the Excel file, managing Triggers, and handling Grid Overlays.
- An update is initiated by a User via the Editor, an API call, or when the state changes, such as the addition of a new building, while "auto update" is enabled. Triggering a Reset X-Queries also executes Init again.
- Note that the initial New Project Wizard must be finished before updates can occur.
- The area of calculation can be limited using a Limit Map.
Steps
Below is an overview of each step involved:
Init: Simulation models for Overlays are created and most attributes are initialized. For example, the Water model is initialized if groundwater is active or not. Also the Excel files are initialized and X-queries are created.
Step 1: The API Triggers (with timing BEFORE) are executed.
Step 2: Then all UPDATE queries (with timing BEFORE) of Indicators, Panels and query Globals.
Step 3: Grids are calculated:
- Rasterization starts: All polygon data (Buildings, Terrains, Areas, etc) is converted into grid data. This process is shared by all active Overlays for faster execution and is also the reason why all active Overlays must have the same cell size.
- The Simulation models now contain the required grid data and may do some additional validation on them. For example, ensuring there are no elevation values above 10,000 meters.
- The Simulation model schedules jobs that are executed either on a GPU Cluster or regular CPU. The jobs are scheduled in such a way that Prequel Overlays will be executed before the receiving Overlay.
- When all jobs have finished the Simulation model compresses the resulting data into a compact format which is stored in the Overlay.
Step 4: Then all UPDATE queries (with timing AFTER) of Indicators, Panels and query Globals.
Step 5: Update Calculators:
- All Calculators (Indicators, Panels and Globals) execute all their TQL queries simultaneously (note: simultaneously means that you cannot update an attribute in one calculator and fetch it in the other).
- 5A: Update calculators without a
SCOREquery. - 5B: Sequentially update all calculators containing a
SCOREquery (calculated in step 5A).
Step 6: The API Triggers (with timing AFTER) are executed.
Finally: execution times are stored and the update envelope is reset.
Limit Map
- Limit Map determines the rectangle that will be part of the simulation, when empty the entire map is used.
- When you do not want to calculate the entire map (e.g. due to memory limits or performance) but only a rectangle subsection use this option.
Iterations
- The Setting
ITERATIONSdetermines how many times this process is repeated from step 2. - When the Grid Overlay has a ITERATION_ACTIVE attribute, only the iteration numbers set in this attribute will be executed. For example
ITERATION_ACTIVE: 0 5will only calculate in iteration 0 and 5.
Rasterization
- The Rasterization determines how polygons are converted to grid cells.
- By default the combined option is selected.
Notes
- When the project contains multiple iterations the process is restarted at step 1 and loops until all iterations have been completed.