How to combine results of multiple Overlays as timeframes in a Combo Overlay: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{stub}}
The [[timeframe]]s functionality of [[Grid Overlay]]s is a user-friendly way to show multiple results in succession, and most commonly used to show multiple results which follow one another across time. This functionality is built-in for time-based calculation models such as the [[Heat Stress Overlay]] or the [[Water Overlay]], but in these cases the results per timeframe are all the result of the same calculation. Leveraging this functionality to combine the results of multiple different [[Grid Overlay]]s takes a bit more setup, but is doable through a specific approach.
The [[timeframe]]s functionality of [[Grid Overlay]]s is a user-friendly way to show multiple results in succession, and most commonly used to show multiple results which follow one another across time. This functionality is built-in for time-based calculation models such as the [[Heat Stress Overlay]] or the [[Water Overlay]], but in these cases the results per timeframe are all the result of the same calculation. Leveraging this functionality to combine the results of multiple different [[Grid Overlay]]s takes a bit more setup, but is doable through a specific approach.


Line 9: Line 7:


Multiple of these entries can be combined. For example, to combine the results of 3 [[Grid Overlay]]s together, the formulas for individual checks can simply be added together:
Multiple of these entries can be combined. For example, to combine the results of 3 [[Grid Overlay]]s together, the formulas for individual checks can simply be added together:
{{code|MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,0), A ), EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,1), B ), EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,2), C )}}
{{code|ADD( 
  MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,0), A ),
  MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,1), B ),
  MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,2), C )
)}}
In which each individual check will either output the [[Grid Overlay]], if it's the correct [[timeframe]] for the [[Grid Overlay]], or 0. This will result in the timeframes computing as:
In which each individual check will either output the [[Grid Overlay]], if it's the correct [[timeframe]] for the [[Grid Overlay]], or 0. This will result in the timeframes computing as:
* Timeframe 0: A + 0 + 0
* Timeframe 0: A + 0 + 0
Line 23: Line 25:
| Set the name of the Global to something recognizable, such as "TIMEFRAMES_FOR_OVERLAY".
| Set the name of the Global to something recognizable, such as "TIMEFRAMES_FOR_OVERLAY".
| Add a [[Combo Overlay]]. Set the [[Grid Overlay]] intended for timeframe 0 to input A, the [[Grid Overlay]] intended for timeframe 1 to input B, etc.
| Add a [[Combo Overlay]]. Set the [[Grid Overlay]] intended for timeframe 0 to input A, the [[Grid Overlay]] intended for timeframe 1 to input B, etc.
| For the formula for the [[Combo Overlay]], add the formula listed above with as many individual checks as intended [[timeframe]]s and [[Grid Overlay]]s. E.g. for 3 timeframes, the formula should be:<!--
--><br>ADD(<!-- 
--><br>&nbsp;&nbsp;&nbsp;  MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,0), A ),<!-- 
--><br>&nbsp;&nbsp;&nbsp;  MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,1), B ),<!-- 
--><br>&nbsp;&nbsp;&nbsp;  MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,2), C )<!-- 
--><br>)<!--
--><br>For 4 timeframes, the formula should be:<!--
--><br>ADD(<!-- 
--><br>&nbsp;&nbsp;&nbsp;  MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,0), A ),<!-- 
--><br>&nbsp;&nbsp;&nbsp;  MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,1), B ),<!-- 
--><br>&nbsp;&nbsp;&nbsp;  MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,2), C ),<!-- 
--><br>&nbsp;&nbsp;&nbsp;  MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,3), D )<!-- 
--><br>)
| [[Recalculate]] the [[Project]].
| The [[Combo Overlay]] now has, on each of its [[timeframe]]s, the results of specific other [[Grid Overlay]]s.
}}
}}


{{article end
{{article end
|notes=
|notes=
* Since all results are displayed with the same [[legend]] of the [[Combo Overlay]], using this method to combine results into one [[Combo Overlay]] across multiple [[timeframe]]s is primarily only useful when the data of the individual [[Grid Overlay]]s is of the same type, and in the same order of magnitude.
* A maximum of 10 [[Grid Overlay]]s can be combined in this way.
* A maximum of 10 [[Grid Overlay]]s can be combined in this way.
** More [[Grid Overlay]]s can be combined in "batches" of 9 at a time, by creating a [[Combo Overlay]] which combines 9 results, storing each on a separate timeframe, then adding that [[Combo Overlay]] as input for another [[Combo Overlay]] and reading out the first [[Combo Overlay]] multiple times, each time a different timeframe. This way the 9 [[Grid Overlay]]s providing input for the first [[Combo Overlay]] only take up one Input Overlay slot in the second [[Combo Overlay]], freeing up room for 9 more.
** More [[Grid Overlay]]s can be combined in "batches" of 9 at a time, by creating a [[Combo Overlay]] which combines 9 results, storing each on a separate timeframe, then adding that [[Combo Overlay]] as input for another [[Combo Overlay]] and reading out the first [[Combo Overlay]] multiple times, each time a different timeframe. This way the 9 [[Grid Overlay]]s providing input for the first [[Combo Overlay]] only take up one Input Overlay slot in the second [[Combo Overlay]], freeing up room for 9 more.
* If the [[Global]] has more values than [[Grid Overlay]]s, more [[timeframe]]s will be created than strictly necessary. If it has fewer values, the [[Combo Overlay]] will have insufficient [[timeframe]]s.
| seealso=
* [[Combo Overlay]]
* [[Timeframe]]
* [[Global]]
}}
}}
[[Category:How-to's]]

Latest revision as of 13:29, 30 January 2024

The timeframes functionality of Grid Overlays is a user-friendly way to show multiple results in succession, and most commonly used to show multiple results which follow one another across time. This functionality is built-in for time-based calculation models such as the Heat Stress Overlay or the Water Overlay, but in these cases the results per timeframe are all the result of the same calculation. Leveraging this functionality to combine the results of multiple different Grid Overlays takes a bit more setup, but is doable through a specific approach.

Formula

The formula used in the Combo Overlay will consist of individual checks of which Grid Overlay's results to add to which timeframe. The formula for an individual check will be structured as follows:

MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,0), A )

In which "0" is the intended timeframe, A is the intended Grid Overlay, and TIMEFRAMES_FOR_OVERLAY is a Global which lists timeframes.

Multiple of these entries can be combined. For example, to combine the results of 3 Grid Overlays together, the formulas for individual checks can simply be added together:

ADD(  
   MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,0), A ),
   MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,1), B ),
   MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,2), C )
)

In which each individual check will either output the Grid Overlay, if it's the correct timeframe for the Grid Overlay, or 0. This will result in the timeframes computing as:

  • Timeframe 0: A + 0 + 0
  • Timeframe 1: 0 + B + 0
  • Timeframe 2: 0 + 0 + C

Steps

Editor → Current Situation (Ribbon tab) → Overlays (Ribbon bar)
How to combine results of multiple Overlays as timeframes in a Combo Overlay:
  1. Have Grid Overlays present in the Project, the results of which should be combined in a Combo Overlay.
  2. Add a Global to the Project, with a global array value of "0 1 2 3" etc. The amount of numbers should match the amount of intended timeframes.
    (e.g. if there are 3 intended timeframes, set the value of the Global to "0 1 2".
  3. Set the name of the Global to something recognizable, such as "TIMEFRAMES_FOR_OVERLAY".
  4. Add a Combo Overlay. Set the Grid Overlay intended for timeframe 0 to input A, the Grid Overlay intended for timeframe 1 to input B, etc.
  5. For the formula for the Combo Overlay, add the formula listed above with as many individual checks as intended timeframes and Grid Overlays. E.g. for 3 timeframes, the formula should be:
    ADD(
        MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,0), A ),
        MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,1), B ),
        MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,2), C )
    )
    For 4 timeframes, the formula should be:
    ADD(
        MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,0), A ),
        MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,1), B ),
        MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,2), C ),
        MUL( EQ(GLOBAL_TIMEFRAMES_FOR_OVERLAY,3), D )
    )
  6. Recalculate the Project.
  7. The Combo Overlay now has, on each of its timeframes, the results of specific other Grid Overlays.

Notes

See also