in reply to Re: Re: Comparing a Multilevel Bill of Materials
in thread Comparing a Multilevel Bill of Materials

BoM always seem difficult!

A brute force approach is to stringify each part at each level and diff corresponding parts. As usual with brute force methods this could take more memory than you have.

You seem to talking about a flat structure. My second thought is to build the nested structure for both your BoM then walk the trees. I see it as a hash with part# as key and an array of (references to) sub-parts as the value. So, for each part#, check whether it exists, if not add it (initially with an empty value). Add (a ref to) the new part to the parent.

Does this make sense?

  • Comment on Re: Re: Re: Comparing a Multilevel Bill of Materials

Replies are listed 'Best First'.
Re: Re: Re: Re: Comparing a Multilevel Bill of Materials
by Anonymous Monk on Jun 07, 2002 at 22:24 UTC
    <html> <head> <meta name="Generator" content="Vim/6.0"> </head> <body bgcolor="#000000" text="#ffffff">
    I think that the difficulty I was having is that a PN may
    occur in several places, however all sub-part numbers should
    be the same. So I think that applying your sugestion but with
    the limitation of only associating the direct child part to
    any partnumber. I should be able to cycle through the BOM without
    generateing a hash with 20K parts.
    
    Thank you, I know this was not the best thread of comunication.
    
    
    </body> </html>