Simulation Core: Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
Each Project in the Tygron Engine features its own Simulation Core, which is responsible for updating the [[Excel]] file, managing triggers, and handling grid overlays. Below is an overview of each step involved:
Each Project in the Tygron Engine 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, an API call, or when the state changes, such as the addition of a new building, while "auto update" is enabled.
* 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 full RESET indicators also executes step 1 again.
* The [[Setting]] ITERATIONS determines how many times this processes is repeated from step 2.
* Note that the initial [[New Project Wizard]] must be finished before updates can occur.
* Triggering a full RESET indicators also executes step 1.
 
* Note that the initial project creation must be finished first.
=Iterations=
The [[Setting]] ITERATIONS determines how many times this processes is repeated from step 2.


=Steps=
=Steps=
1 Simulation models for [[Overlays]] are created and most attributes are initialized. For example the Water model initialized if groundwater is active or not. Also the [[Excels]] are initialized and X-queries are created.  
Below is an overview of each step involved:
 
1 Simulation models for [[Overlays]] are created and most attributes are initialized. For example the Water model initialized if groundwater is active or not. Also the [[Excel]] files are initialized and [[X query (Excel)|X-queries]] are created.  


2 First API [[Triggers]] (with timing BEFORE) are executed.
2 The API [[Triggers]] (with timing BEFORE) are executed.


3 Then all [[TQL]] queries (with timing BEFORE) containing an UPDATE from [[Indicators]] and [[Panels]].
3 Then all [[Update (TQL)|<code>UPDATE</code>]] queries (with timing BEFORE) in the [[Excel]] files of [[Indicators]] and [[Panels]].


4 After these initial update to e.g. building attributes etc the 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.
4 After these initial update to e.g. building attributes etc the 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.
Line 21: Line 24:
7 When all jobs have finished the Simulation model compresses the resulting data into a compact format which is stored in the Overlay.
7 When all jobs have finished the Simulation model compresses the resulting data into a compact format which is stored in the Overlay.


8 Then all TQL queries (with timing AFTER) containing an UPDATE from [[Indicators]] and [[Panels]].
8 Then all [[Update (TQL)|<code>UPDATE</code>]] queries (with timing AFTER) in the [[Excel]] files of [[Indicators]] and [[Panels]].


9 The [[Indicators]], [[Panels]] and [[Globals]] are updated.
9 The [[Indicators]], [[Panels]] and [[Globals]] are updated.

Latest revision as of 11:13, 14 November 2024

Each Project in the Tygron Engine 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 full RESET indicators also executes step 1 again.
  • Note that the initial New Project Wizard must be finished before updates can occur.

Iterations

The Setting ITERATIONS determines how many times this processes is repeated from step 2.

Steps

Below is an overview of each step involved:

1 Simulation models for Overlays are created and most attributes are initialized. For example the Water model initialized if groundwater is active or not. Also the Excel files are initialized and X-queries are created.

2 The API Triggers (with timing BEFORE) are executed.

3 Then all UPDATE queries (with timing BEFORE) in the Excel files of Indicators and Panels.

4 After these initial update to e.g. building attributes etc the 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.

5 The Simulation models now contains the required grid data and may do some additional validation on them. For example are there no elevation values above 10.000 meters.

6 The Simulation model schedules jobs that are executed either on an GPU Cluster or regular CPU. The jobs are scheduled in such a way that prequel Overlays will be executed before the receiving Overlay.

7 When all jobs have finished the Simulation model compresses the resulting data into a compact format which is stored in the Overlay.

8 Then all UPDATE queries (with timing AFTER) in the Excel files of Indicators and Panels.

9 The Indicators, Panels and Globals are updated.

10 The API Triggers (with timing AFTER) are executed.

11 Finally execution times are stored and the update envelope is reset.

=> When the project contains multiple iterations the process is restarted at step 2 and loops untill all iteration have been completed.