You are on page 1of 8

1

Signal Flow Graph Solver Application

By : Aya Abdel Moniem (ID 5)


Mahmoud Atef (ID 63)

Problem Statement
Given: Signal flow graph representation of the system. Assume that total
number of nodes and numeric branches gains are given.
Required:
1- Graphical interface.
2- Draw the signal flow graph showing nodes, branches, gains,
3- Listing all forward paths, individual loops, all combination of n nontouching loops.
4- The values of D1 , , Dm where m is number of forward paths.
5- Overall system transfer function.

Main Features
1- user friendly GUI that allows the user to enter Vertices and Edges with
the ability to
Delete or add any edge or vertex at any time .
a- press change mode the choose Editing

b- right Click on any vertex or Edge then choose Delete .


Edit the Weights of edges at any time .
a- press change mode the choose Editing.
b- right Click on any Edge then choose Edit Edge properties
Delete .
Selecting one or more vertex to Edit their locations using
selecting then Drag and drop.
a- press change mode the choose Picking.
b- Select the Vertices to be move then Drag the mouse to
the required to move them.
Transforming the Whole Graph from one position to another
using Drag and Drop
a- press change mode the choose Transforming .
b- Using the mouse move the graph to any position.
2- Computing the results
By pressing Analyze Graph Button All the outputs of the
Current entered graph will be displayed on the Right of the Screen
3- Animation
The Application Provides Also Displaying the Forward Paths ,
Loops and the Untouched Loops using Animation
The Animation plays Repeatedly
Using the Stop Animation Button the user can stop the
Current animation at any time.
All Modes of Editing and transforming Still work during the
animation so the user can Move one or more Vertices of the graph
while the Animation plays ! .
4- Screen Shot
The Application Provides the ability to take a screenshot for
the Graph at any moment and its saved as a PNG image with
names that shows the order of Screenshots taken .

Data Structures
1- Adjacency List and Adjacency Matrix to store the graph
2- Hash Maps to Map the Vertices numbers to their actual indices used
during the algorithm.

3- Different Dimensions of Array Lists


1D lists to store the Deltas and Gains of loops and forward
paths
2D lists to store the forward paths and loops.
3D list to store the combinations of the untouched loops
where the first dimension corresponds to combinations of i loops
and the second dimension corresponds to the jth combination of
i loops and the third dimension corresponds to the kth loop in
the jth combination of i loops

Main Modules
1- SignalFlowGraphBackEnd : this class is responsible for the algorithm
of computing the results and store them in appropriate data structures.
2- SignalFlowGraphFrontEnd : this class is responsible for the GUI and
getting inputs and displaying the outputs and the animation process.

Algorithms Used
The Main algorithm runs in specified steps
1. Initialize the data structures
2. Generate the forward paths using dfs
3. Generate the loops using dfs
4. Delete any equivalent loops found (Example 1-2-3-1 and 23-1-2)
procedure : a - Double the first loop 1-2-3-1-2-3
b- search for the second loop in the doubled loop if
its found then they are equivalent
5. Find the Untouched combinations of loop using a recursive
method that finds all combinations of size (1 to n ) then after a
combination is built its check to find if there are any touching
loops if any touching pair is found the combination is refused .
6. compute the forward paths gains using 2 nested loops
7. compute the Loops gains using 2 nested loops.

8. compute Delta
9. compute Delta i
10. compute overall transfer functions

Sample Runs
1- Changing Modes :

2- Deleting vertex :

3- Edit Edge :

Simple Animation for a forward path:


Green node shows the forward path in each step .
a- node 0 (source)

b- node 2

c- node 3 (sink)

Moving the Blue Vertices (2,3) to a lower position.

Notes And Assumptions :


1- User guide is Included in the Main features section of the report.
2- Source node is Always the vertex with minimum number and the sink
node is Always the node with the maximum number.
3- All edges have numeric values.

You might also like