473,837 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

multiple level bom search

Hello:
I need to write a program that search through multiple level BOM,
get all the items. It seems like a easy enough project, but when I put
my hands on it and couple of hundred lines of codes later. It starts
look more difficult. I was hopeing someone might have a very easy way
to do it that I don't know about... The BOM structure looks like this..
Father Child
A 1
A 2
1 1.1
1 1.2
2 2.2
1.1 A1

So result search should be ... A, 1, 2, 1.1, 1.2, 2, 2.2.. (there are
unlimited amount of level and branches). I have tried with tree
collection with this, but doesn't seem to do the job... Sample code
will be much appreciated... Thank You!

Aug 2 '06 #1
3 1612

<pe******@yahoo .comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.com.. .
Hello:
I need to write a program that search through multiple level BOM,
get all the items. It seems like a easy enough project, but when I put
my hands on it and couple of hundred lines of codes later. It starts
look more difficult. I was hopeing someone might have a very easy way
to do it that I don't know about... The BOM structure looks like this..
Father Child
A 1
A 2
1 1.1
1 1.2
2 2.2
1.1 A1

So result search should be ... A, 1, 2, 1.1, 1.2, 2, 2.2.. (there are
unlimited amount of level and branches). I have tried with tree
collection with this, but doesn't seem to do the job... Sample code
will be much appreciated... Thank You!
I have no idea what a BOM is offhand, or what those specific numbers and
letters are supposed to mean (if anything), but it looks to me like a tree
structure would work fine. Perhaps if you're having trouble with some code,
you could post that code here and tell us what you think is going wrong with
it. Then we might be able to tell you why.

But you're not likely to get anyone to simply write the code for you, at
least not here. Sorry.

-Howard


Aug 2 '06 #2
pe******@yahoo. com wrote:
Hello:
I need to write a program that search through multiple level BOM,
get all the items. It seems like a easy enough project, but when I put
my hands on it and couple of hundred lines of codes later. It starts
look more difficult. I was hopeing someone might have a very easy way
to do it that I don't know about... The BOM structure looks like this..
Father Child
A 1
A 2
1 1.1
1 1.2
2 2.2
1.1 A1

So result search should be ... A, 1, 2, 1.1, 1.2, 2, 2.2.. (there are
unlimited amount of level and branches). I have tried with tree
collection with this, but doesn't seem to do the job... Sample code
will be much appreciated... Thank You!
What's a BOM?
Why does '2' appear twice in your example result?
What's the C++ question here?

It looks like you're trying to do a breadth first search on a tree. Try
google or comp.programmin g.
Aug 2 '06 #3
In article <11************ **********@m73g 2000cwd.googleg roups.com>,
pe******@yahoo. com says...
Hello:
I need to write a program that search through multiple level BOM,
get all the items. It seems like a easy enough project, but when I put
my hands on it and couple of hundred lines of codes later. It starts
look more difficult. I was hopeing someone might have a very easy way
to do it that I don't know about... The BOM structure looks like this..
Father Child
A 1
A 2
1 1.1
1 1.2
2 2.2
1.1 A1

So result search should be ... A, 1, 2, 1.1, 1.2, 2, 2.2.. (there are
unlimited amount of level and branches). I have tried with tree
collection with this, but doesn't seem to do the job... Sample code
will be much appreciated... Thank You!
It's going to depend on what you're trying to do with your tree. The
problem is pretty simple: the names in your bill of materials provide
little or no help in searching a tree -- e.g. there's no particularly
good indication (or at least doesn't seem to be) from the names that
A1 is (or would be) a descendent of 1.1.

As such, if you're going to be doing a lot of more or less random
searching in the tree, you'll probably want to create soemthing like
a binrary tree in alphabetical order -- and then you'll have to add
data to each node to indicate its parent and descended nodes, so once
you've found a node, you can figure out how it fits into things.

OTOH, if you want you tree to reflect the structureo of the BOM, you
can do that too. You're looking at a multiway tree, so you'll
probably want to ignore the trees in the standard library and build
your own instead. One obvious possbility would be for each node to
contain a vector of pointers to its children.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Aug 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4422
by: R0bert Neville | last post by:
I am having major issues in IE. This web development exercise involves learning why certain hacks work and others don't. My web page renders ok in Firefox. The main problem in my web page relates to complexity; emulating position fixed in IE. If I simplify the page, the issues subside, which does not help me learn about web development idiosyncrasies. The height %1 hack did not alleviate the situation either. Look at the CSS,...
11
5331
by: Mike | last post by:
Looking to find any information on how to properly configure multiple instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking for information on how the multiple instance settings should configured to work, how memory is shared or not, etc. I can not seem to find any good links to this information. Thanks, Mike
32
14933
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if ((someString.IndexOf("something1",0) >= 0) || ((someString.IndexOf("something2",0) >= 0) ||
2
12371
by: macyp | last post by:
I have to pass values from one aspx page to another. The controls I have in the first page are: a textbox, 3 drop down lists, and 2 check boxes, and a submit button. It is a search page, and the users need not enter values in all the controls. they can leave the textbox blank, and select values from one drop down, or any other combinations. I am trying to pass values with the help of session variables. But I have multiple if else...
9
2781
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and wizards. But, I have found that trying to do something "outside the norm" adds a rather large level of complexity and/or data replication. Background I have been commissioned to create a web-based application for a client. It has a formsaunthentication...
7
2739
by: Jeff | last post by:
I plan to write a Windows Forms MDI application for a medical office. Users must be able to select a patient and view related information on multiple forms; with1-4 forms opened at the same time for the same patient; each form showing a different type of patient-related information. After viewing information for one patient (say on 3 forms opened simultaneously), users want the ability to select another patient. Upon selection of another...
4
3568
by: RoadRunner | last post by:
Hi, I have a question. I am asked to produce a global search of a given corporate name, in more that one database. Each database has different table names and different field names in the tables. Does anyone know if this can be done? Thanks
2
3023
by: pengbsam | last post by:
Hello: I need to write a program that search through multiple level BOM, get all the items. It seems like a easy enough project, but when I put my hands on it and couple of hundred lines of codes later. It starts look more difficult. I was hopeing someone might have a very easy way to do it that I don't know about... The BOM structure looks like this.. Father Child A 1 A 2
1
4174
by: jcf378 | last post by:
Hi all-- Does anyone have any insight as to how I might create a search form that allows a user to select criteria based on any related table in the whole database. The search form I have now only allows me to filter based on variables in a single table. I would like to have a search form where I can select multiple variables (from various linked tables) to filter by, and return results based on this multi-table filter. Allen Browne...
0
9843
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10877
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10570
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10273
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7806
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7001
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5849
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4041
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.