If you provided a testable .csv / .txt file for [et_modeop, et_modeop_pere] array, maybe one might help you.
In general, throwing screen captures to the forum is probably not going to stimulate anybody to try to make suggestions.
I just don't know how to analysis this table t_simo and make it show in program, can anyone give me some ideas?
I need more support for visual display the data, currently I can draw shape and show station text, but I don't know how to link station with arrow line.And there’s your problem: you‘re looking back for each current step, instead of forward (see my alternative approach)
Especially at split point.
What in reality represents these 'steps' (8685, 8499, 8685, 8555, ...)?Think "assembly-line" in a manufacturing plant (e.g. automotive production-line)
You mention 'station' and 'same function machine'.
But, if they are same function machine, why after steps 8499 and 8555 doesn't go back to one machine?
Is there a chance of repeating machine (i.e. step 8451, 8453 and then again 8451 for some additional operation after 8453)?
What fails me is that there is no way, in the .csv file data supplied, to determine that the graphic steps in 29 to 30 can be permuted. Each has only one et_modeop_pere so it is not possible to know if an et_modeop can go to an alternative et_modeop thru the et_modeop_pere relation.
There are two entries with et_modeop 8585, one has et_modeop_pere 8525 and the other one has et_modeop_pere 8579.Missed that, will take a further look.
What fails me is that there is no way, in the .csv file data supplied, to determine that the graphic steps in 29 to 30 can be permuted. Each has only one et_modeop_pere so it is not possible to know if an et_modeop can go to an alternative et_modeop thru the et_modeop_pere relation.Bruno, that's why i said, his mistake is "looking back".
Saying an et_modeop can go to an alternative et_modeop means you have to build a down line from et_modeop_pere to its et_modeop. That would be best done with specialised class being fed from the source data by et_nomen identity (product nr ?).
Before engaging with such a problem the OP must give more information about it. The two columns define a graph, presumably directed, but no more info is available.There is no loops, only one directly,from beginning to the end.
Can there be loops? Obviously the start node is the first one. Are there terminal nodes? Are there other restrictions?
Bruno, that's why i said, his mistake is "looking back".
Look at my approach (looking forward)
Before engaging with such a problem the OP must give more information about it. The two columns define a graph, presumably directed, but no more info is available.There is no loops, only one directly,from beginning to the end.
Can there be loops? Obviously the start node is the first one. Are there terminal nodes? Are there other restrictions?
For the terminal nodes, should judge from data, if one value only appears in column et_modeop, not in et_modeop_pere, then this node is terminal nodes.
No other restrictions.
...
Right, it is acyclic graph then. You should perform topological sort on the nodes first and then it will be easy to make the layout
https://rosettacode.org/wiki/Topological_sort#Object_Pascal
Apologies for the over-complicated sort example in my previous post.
...