EPIC: Determining P&ID topology from SFTs
Idea 1
Nearest-neighbour. establish initial connections based on depth from originating BE/Gate.
Idea 2
Parallel / Serialisation? Using MCSs (which is basically using gate types to your advantage). Basically, each MCS's BEs map to components that should be parallel. Once these edges are established, you can apply idea 1 to determine whether the P&ID components are in series.
We can also do it the other way around. Connect all components with all components and eliminate connections based on MCSs.
Idea 3
When there are n > 1 number of SFTs for one page/P&ID. How to combine?
Idea 4
EXPSA Interaction Rules. Each class has a section with a number of interaction rules. Parse rules to FO logic and reverse? Complex. Requires parsing FIGARO.
Process
Two or three phases.
- establish initial connections.
- refine existing connections. ( 3) remove connections )?
Idea workouts and pseudocode
Idea 1 extension:
pseudo-code neighbour i = 1. i = distance between two BEs.
required: exists mapping/function from (BE in SFT) to (Component in P&ID) which is injective.
for s in sfts
for be in sft
source_component = getcomponent()
neighbours = getneighbours()
nbcs = getneighbourcomponents(neighbours)
for nbc in nbcs:
addpipetopnid(source_component, nbc)
Idea 2 extension: requires each len(mcs) > 1
for mcs in mcss:
for (be1, be2) in mcs
remove_connection_from_pnid(getcomp(be1), getcomp(be2))