5.21.5. Loop Anatella Graphs

<< Click to Display Table of Contents >>

Navigation:  5. Detailed description of the Actions > 5.21. TA - System Tools >

5.21.5. Loop Anatella Graphs

 

Icon: ANATEL~4_img269

 

Function: loopAnatellaGraphs

 

Property window:

 

ANATEL~4_img268

 

Short description:

 

Loop an anatella graph on a global paramater.

 

Long Description:

 

The ANATEL~4_img269 loopAnatellaGraph action executes a given “sub-graph” (i.e. a given .anatella file) several times “in a loop”. At each iteration of the loop, the ANATEL~4_img269 loopAnatellaGraph action sets a different value for one Global Parameter (whose name is, by default, “gpname”) that is used inside the “sub-graph”. The number of iterations is equal to the number of rows in the input table.

 

If you can execute all the different “sub-graph(s)” in any order (i.e. when there are no depencies towards previous iteration of the loop), then you can execute several “sub-graphs” in parallel (simultaneously): Just set the parameter “Run N graph(s) in parallel. N=?” to a higher value. This allows to easily use the several cores available inside your CPU. If you have limited RAM (or if you are on 32-bit PC), be carefull to not use a large value (“1” is our safest option).

 

Loops are probably the trickiest operations in anatella, but no worries, this is still manageable without any line of code.

 

One way to introduce “loops” inside Anatella is to “code” them in JavaScript, R, or Python as these languages offer complete freedom to code whatever you need/want. This is not always the best option as those languages will process data much slower than standard anatella components. When speed and scalability matters, it’s usually better to avoid Javascript, R or Python and use the loop functionality from Anatella. You’ll find more information and a detailed example on how to make loops in Anatella inside the next section 5.21.6 and sections 7.6. and 7.7.