Skip to content

deebuls/sa_tool_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SaTool-python:

Structural Analysis Tool

SaTool-python is an open-source implementation of the tool, for doing structural analysis. The implementation is inspired on the SATOOL developed by Blanke et. all. ”SATOOL - A Software Tool for structural analysis of complex automation systems ”[1] , introduces a tool for structural analysis, the use of the Matlab - based 3 implementation is presented and special features are intro- duced, which were motivated by industrial users.

Installation

Installation using pip

The code requires networkx development version ( for implementation of bipartite maximal algorithm). Networkx development can be installed by follwoing command

pip install git://github.com/networkx/networkx.git#egg=networkx

Installation from github

Please refer [Networkx Development installation]{http://networkx.github.io/documentation/development/install.html}

Code Example

Creating the Bipartite Graph from the incidence matrix

    B = nx.Graph(name="Example 5.17")
    B.add_nodes_from(['x1', 'x2', 'x3', 'x4', 'x5'], bipartite=0, color='r') # Add the node attribute "bipartite"
    B.add_nodes_from(['c1','c2','c3', 'c4', 'c5', 'c6'], bipartite=1, color='b')
    B.add_edges_from([('x1','c1'),('x1','c2'),('x1','c4') ])
    B.add_edges_from([('x2','c2'),('x2','c5')])
    B.add_edges_from([('x3','c2'),('x3','c3')])
    B.add_edges_from([('x4','c3'),('x4','c4'),('x4','c6') ])
    B.add_edges_from([('x5','c5'),('x5','c6')])
    

Calling the sa tool for analyis

    sa1 = sa_tool.SATool(B)
    

Visualizing the Bipartite Graph

    sa1.visualize_bipartite()
    

![bipartite](images/Example 5.17.png)

Calculating the Maximum Matching

    sa1.calculate_maximum_matching()
    

Visualizing the Matching

    sa1.visualize_bipartite(with_matching=True)
    

![bipartite](images/Example 5.17MaxMatching.png)

Calculating the Orientation

    sa1.calculate_orientation()
    

Visualizing the Orientation

    sa1.visualize_bipartite(with_orientation=True)
    

![bipartite](images/Example 5.17WithOrientation.png) [1] Denmark, K. (2006). Satool-a software tool for structural analysis of complex auomation systems.

Documentation link for BLANKE satool

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.199.6246&rep=rep1&type=pdf

color codings and their meanings

structure graph: color --> meaning green --> unknown variables yellow --> constraints Navy blue --> known variables Red --> Unmatched constraint

Structure graph with maximal matching color --> meaning black --> Normal edge Sky Blue --> Matched edge

Structure graph with maximal matching and orientation color --> meaning Multiple Thick Black lines --> Parity relation

About

Structural Analysis tool for Fault Diagnosis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages