Recent

Author Topic: How to show product routing from database to program?  (Read 1561 times)

Jonvy

  • Jr. Member
  • **
  • Posts: 68
How to show product routing from database to program?
« on: October 03, 2022, 04:31:07 pm »
Hello all,

In database, I have a table t_simo saved the prodcut routing information, each row in the table means one step.
Column et_modeop means the current product step, column et_modeop_pere means the step before current step.
If  et_modeop_pere is null, this row means the beginning of the product step.

Product should go according to this table.
The target is to show the product routing in program, like the attachment drawing, it is what I what to show.

In some point, the product can go to different way, such as point 8685 to 8499, 8685 to 8555, it means product can go to station 8555 or 8599(these 2 are same function machine).Same situation as point 8865 to 8525 or 8865 to 8579.
Final station are 8531 and 8585.
All these process step also can be find in table t_simo.

I just don't know how to analysis this table t_simo and make it show in program, can anyone give me some ideas?


Thanks,
Jonvy
« Last Edit: October 05, 2022, 02:11:10 pm by Jonvy »

BrunoK

  • Sr. Member
  • ****
  • Posts: 364
  • Retired programmer
Re: How to show product routing from database to program?
« Reply #1 on: October 03, 2022, 04:51:40 pm »
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.

Zvoni

  • Hero Member
  • *****
  • Posts: 1543
Re: How to show product routing from database to program?
« Reply #2 on: October 04, 2022, 10:08:30 am »
With SQL you could do a "Count" on the second column. That way you would see if for any current steps they may have the same parent

That's just out of my sleeve. Would have to analyze further
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Jonvy

  • Jr. Member
  • **
  • Posts: 68
Re: How to show product routing from database to program?
« Reply #3 on: October 04, 2022, 03:51:16 pm »
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.

OK, here I attach the CSV file, also in the file, I add 2 part no.,Part number 100458 and 171995(with different value in et_nomen), id_simo is not null id segment in table.

Zvoni

  • Hero Member
  • *****
  • Posts: 1543
Re: How to show product routing from database to program?
« Reply #4 on: October 04, 2022, 04:19:37 pm »
Code: SQL  [Select][+][-]
  1. SELECT DISTINCT et_nomen,et_modeop, COUNT(et_modeop_pere) AS Cnt FROM t_simo_Part100458_Part171995 GROUP BY et_nomen,et_modeop
  2.  
The Problem i see: How to find out, if the two processes meet again into a single one (Say "packaging" at the end of assembly lines)

EDIT: After thinking about it: How about turning it around?
Currently you have a step with its "parent"
Have you thought about:
You have current step, and in the second column you have the "next" step
That way each "current" step would propagate the next step, meaning: If you have two consecutive steps which have the same et_modeop, then it's a split.
If two "threads" have the same "next"-step they meet again
« Last Edit: October 04, 2022, 04:28:29 pm by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

dseligo

  • Hero Member
  • *****
  • Posts: 814
Re: How to show product routing from database to program?
« Reply #5 on: October 04, 2022, 04:26:09 pm »
I just don't know how to analysis this table t_simo and make it show in program, can anyone give me some ideas?

Are you asking how to do visual representation of your data only or you need some additional operations on analyzed data as well?
Do you already have solution for displaying data?

Jonvy

  • Jr. Member
  • **
  • Posts: 68
Re: How to show product routing from database to program?
« Reply #6 on: October 04, 2022, 04:54:27 pm »
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.
Especially at split point.

Zvoni

  • Hero Member
  • *****
  • Posts: 1543
Re: How to show product routing from database to program?
« Reply #7 on: October 04, 2022, 05:42:43 pm »
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.
Especially at split point.
And there’s your problem: you‘re looking back for each current step, instead of forward (see my alternative approach)
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Jonvy

  • Jr. Member
  • **
  • Posts: 68
Re: How to show product routing from database to program?
« Reply #8 on: October 07, 2022, 06:19:49 am »
I think firstly I can quere distinct value from column et_modeop, so I can get 36 steps, this means it needed to drawing 36 circles on the form.
And the database has 40 records means totally 40 arrow lines needed to connected between them.
But how to arrange the layout in the form for 36 circles?It  is difficult.Especially circles after split point(point 8685, step 24)?

Zvoni

  • Hero Member
  • *****
  • Posts: 1543
Re: How to show product routing from database to program?
« Reply #9 on: October 07, 2022, 09:44:52 am »
Wrong. You have to walk singlestep through et_modeop, checking first if it has more than one NEXT step (I'm coming from my approach. Your approach by looking back will not work).
If it has one next step, draw your shape and an arrow right of it pointing to the next step (which is not painted yet)
If it has more than one step it's a split.
That way you'll know that the next step(s) have to be painted with a vertical offset
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

dseligo

  • Hero Member
  • *****
  • Posts: 814
Re: How to show product routing from database to program?
« Reply #10 on: October 07, 2022, 12:29:21 pm »
What in reality represents these 'steps' (8685, 8499, 8685, 8555, ...)?
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)?

Zvoni

  • Hero Member
  • *****
  • Posts: 1543
Re: How to show product routing from database to program?
« Reply #11 on: October 07, 2022, 12:37:35 pm »
What in reality represents these 'steps' (8685, 8499, 8685, 8555, ...)?
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)?
Think "assembly-line" in a manufacturing plant (e.g. automotive production-line)
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

BrunoK

  • Sr. Member
  • ****
  • Posts: 364
  • Retired programmer
Re: How to show product routing from database to program?
« Reply #12 on: October 07, 2022, 12:56:02 pm »
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.

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 ?).

dseligo

  • Hero Member
  • *****
  • Posts: 814
Re: How to show product routing from database to program?
« Reply #13 on: October 07, 2022, 01:11:28 pm »
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.

BrunoK

  • Sr. Member
  • ****
  • Posts: 364
  • Retired programmer
Re: How to show product routing from database to program?
« Reply #14 on: October 07, 2022, 01:16:02 pm »
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.

 

TinyPortal © 2005-2018