Design and Implementation of a Smart Routing and Process Validation Engine for a Process Flow Diagram (PFD) Tool
The existing Chemical-PFD-Web-Desktop platform allows users to design Process Flow Diagrams (PFDs). However, the current system lacks intelligent routing and validation capabilities.
Objective
Develop a Smart Process Logic Engine that enhances diagram intelligence using algorithmic logic.
Task 1 — Smart Auto-Routing Algorithm
When a user connects two components:
- The connection line should automatically:
- Avoid overlapping with other components
- Avoid intersecting existing connections
- Take the shortest valid orthogonal path (horizontal/vertical)
- The connection should dynamically adjust when components are moved.
Participants must design their own routing logic (grid-based, pathfinding, etc.).
Task 2 — Process Validation Engine (Graph-Based)
Treat the PFD as a directed graph and implement validation checks:
- Detect isolated components (not connected)
- Detect invalid circular loops without processing unit
- Ensure at least one inlet and one outlet exist
- Validate that all components are part of a continuous process flow
Participants must:
- Convert the diagram into a graph structure
- Use graph traversal algorithms (DFS/BFS or equivalent)
- Provide real-time validation feedback in UI
Expected Deliverables
- Working implementation integrated into the existing codebase
- Documentation explaining:
- Algorithm design
- Data structures used
- Complexity considerations
- Demonstration with test cases
Evaluation Criteria
- Correctness of routing logic
- Accuracy of validation engine
- Efficiency of algorithms
- Code quality and modularity
- UI feedback clarity
Additional Guidelines
Scope:
Participants may choose either:
- Web version (React-based)
- Desktop version (PyQt-based)
or implement in both for bonus evaluation.
Constraints:
- No external auto-routing libraries allowed.
- Core algorithm must be implemented manually.
- AI tools may be used for guidance, but logic explanation is mandatory.