Program Graphs With Multiple Programs

1 img First, you need a program graph to work with. You can use an existing one or you can create a new program graph.

→ For creating a new program graph, right-click in the area of the program graph overview. A context menu appears. Select New program graph. We are asked for a name for the new graph. Let's call it Our program graph.

2 img Now, we have to populate the program graph with at least one program. For this, we use the Programs view.

→ Drag the Data Generator program from the programs view into the program graph. Then, drag the MyAlgorithm program into the program graph.

3 img → In the program graph, right-click on the Data Generator program. A context menu appears. Select Connect toMyAlgorithm. This establishes a connection from the output of Data Generator to the input of MyAlgorithm.

img This way, you can build arbitrary program graphs, but with the following limitations:

  • A program can be contained in arbitrarily many program graphs, but only once per graph.
  • A graph may only contain singly-linked chains of programs, that is:
    • Cycles are not allowed.
    • A program can propagate its output to only one recipient.
    • A program can receive input from only one sender.

Keep in mind that every program you add to the graph multiplies the computational costs for evaluating the complete program graph because every program parameterization must be run for every other program parameterization. Consider a program X with two parameters with 10 values each. This gives us 100 parameterizations for X, or 100 runs. If you now add another program Y also with two parameters with 10 values each, this multiplies the overall costs by 100, yielding 100 × 100 = 10,000 runs. You can try to cope with this by using the selection feature, as described in lesson Example 1: A Simple Program.

4 In order to execute jobs, you have to activate a specific program in the program graph. Jobs are then only executed for the selected program, not for the complete program graph. This is useful, because in a scenario where there are several programs, the number of overall jobs is usually large, so it makes sense to specifically select which jobs to execute.