Run Queries on the Total System Model Graph
- Unzip the tsm_graphdb.zip file provided with this package. Make sure that the full path of the tsm_graphdb folder does not have any spaces. For example, the following will work: C:\Users\Manas\Neo\tsm_graphdb, but the following will not work: C:\Users\Manas Bajaj\Neo 4j\tsm_graphdb
- Stop your existing Neo4j database by clicking on the Stop button.
Click the Choose button and select the tsm_graphdb folder.
Click the Start button to start the Neo4j database.
Click on the hyperlink http://localhost:7474/ or type it directly in your web browser.
Run the following Cypher query to get all nodes and edges in the TSM graph.
match (n)-[r]->(m) return n,r,m
You should see similar results as Figure 34. If you expand the node types and relationship types in the top of the Neo4j browser window, you will see SysML nodes, e.g. Requirement, and non-SysML nodes, e.g. Windchill_part.
Run the following query to get all connections between SysML and DOORS-NG
match(r)-[rel:REQUIREMENT_DOORSNG_MODEL_TRANSFORM_CONNECTION]->(x) return r,rel,x
The red nodes are SysML requirements and grey nodes are DOORS-NG elements (requirements, requirement collections, modules).
Run the following Cypher query to get all connections between SysML and DOORS-NG, including relationships between SysML elements
match(r:Requirement)-[rel:REQUIREMENT_DOORSNG_MODEL_TRANSFORM_CONNECTION|Containment]->(x) return r,rel,x
Now, you can also see containment relationships between the SysML requirements.
Run the following Cypher query to get all reference connections in the TSM graph
match(r)-[rel:REFERENCE_CONNECTION]->(x) return r,rel,x
You should see the same results as in the figure below. As shown on the top of the figure, the yellow nodes are SysML blocks, the purple nodes are JIRA tasks/issues, the red nodes are GitHub files, and the green nodes are Simulink model files. The query results indicate that each block in the SysML architecture is connected to a JIRA task/issue since JIRA is used for managing the work breakdown structure. The Flight Software and Mission Software blocks in the architecture are connected to corresponding folders/files in GitHub where the code is being version managed. The UAV block is also connected to a Simulink model that is used analyzing UAV performance.
Run the following Cypher query to get all connections to MySQL tables and rows
match()-[r:BLOCK_MYSQL_TABLE_ROW_DATAMAP_CONNECTION|BLOCK_MYSQL_TABLE_MODEL_TRANSFORM_CONNECTION]-() return r
SysML blocks (radar, video_camera, thermal_camera) are connected to corresponding tables (red nodes) in MySQL database. Two specific radars, video cameras, and thermal cameras are connected to corresponding rows (green nodes) in the tables.
Run the following Cypher query to get all connections to Windchill parts
match()-[r:BLOCK_WC_PART_MODEL_TRANSFORM_CONNECTION]-() return r
Run the following Cypher query to check if the UAV block is related to the Windchill part Electrical System (version A.1).
match(b:Block{name:"UAV"})-[r*]->(t:Windchill_part{name:"Electrical System (A.1)"}) return r
The results show that the UAV block uses the Platform block which uses an Electrical System that is connected to the given Windchill part.
- Run the following Cypher query to trace all relationships between DOORS-NG and Windchill parts within 3 degrees of separation
match(r:DOORS_NG_Requirement_Collection)-[rel*..3]-(p:Windchill_part) return r,rel,p