Simulation Core: Difference between revisions
No edit summary |
|||
| Line 35: | Line 35: | ||
'''Step 5:''' Update Calculators: | '''Step 5:''' Update Calculators: | ||
* All Calculators ([[Indicators]], [[Panels]] and [[Globals]]) execute all their TQL queries simultaneously. | * All Calculators ([[Indicators]], [[Panels]] and [[Globals]]) execute all their TQL queries simultaneously. | ||
* Update calculators without a <code>SCORE</code> query. | * 5A: Update calculators without a <code>SCORE</code> query. | ||
* Sequentially update all calculators containing a <code>SCORE</code> query. | * 5B: Sequentially update all calculators containing a <code>SCORE</code> query (calculated in step 5A). | ||
'''Step 6:''' The API [[Triggers]] (with timing AFTER) are executed. | '''Step 6:''' The API [[Triggers]] (with timing AFTER) are executed. | ||
Revision as of 13:31, 10 August 2025
- Steps are a list. Use built-in list syntax
- Use article-end template with a notes section for notes, rather than "=>"
- Improve consistency in how terms are written. ("full RESET indicators", for example)
- Improve sentence structure. ("For example the Water model initialized if groundwater is active or not.", for example. )
- Separate operation and state in explanation, and make consistent how these are described. (2 X is done, 3 then Y [is done?], 4 after this Z begins, 5 situation is now A, 6 something now does B.)
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
ITERATIONSdetermines how many times this processes is repeated from step 2. - When the Overlay has a
ITERATION_ACTIVEattribute, only the iteration numbers set in this attribute will be executed. For exampleITERATION_ACTIVE: 0 5will only calculate in iteration 0 and 5.
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 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 and Panels and Globals with a query.
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 contains the required grid data and may do some additional validation on them. For example are there no elevation values above 10.000 meters.
- 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.
- 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 and Panels and Globals with a query.
Step 5: Update Calculators:
- All Calculators (Indicators, Panels and Globals) execute all their TQL queries simultaneously.
- 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.
=> When the project contains multiple iterations the process is restarted at step 1 and loops untill all iteration have been completed.
