Page 2 of 2

Re: Relation Pool Number: Caution

Posted: 21 Apr 2022 14:16
by LornaCraig
davidf wrote:
21 Apr 2022 12:54
I doubt that pool numbers are really random - otherwise we will get some occasional really high pool numbers! I suspect that there is some process to ensure that pool numbers are always a continuous list starting at one....
David, yes I'm sure the pool numbers are always a continuous list with no gaps, so there will always be some renumbering when existing pools are combined.

Your algorithm looks entirely plausible. However I guess that if you imported a Gedcom which already had several pools FH could only assign the numbers arbitrarily becasue it wouldn't know which pool had been created first. Perhaps this is the situation the Help file is referring to.

Re: Relation Pool Number: Caution

Posted: 21 Apr 2022 14:55
by davidf
I struggle with a program doing something "arbitrarily"!

When reading in a GEDCOM how could it allocate pool numbers? It has to work through all the Individual records - presumably held in some memory array - and logically it starts with the first read into the array (normally @I1 ?) puts it into Pool 1and then has to iteratively go through all that individual's relationships assigning the same pool number to all their relatives, before moving to the next individual in the array without an assigned pool number giving it the next available pool number and repeating?

Or is it more effective to initially assign everyone to their own pool (pool number = @I number), and then go through all FAMS and FAMC "records" (in GEDCOM file order) merging pools (taking the lowest pool number every time) before doing a tidy up to eliminate vacant pools (which would mean most "solo" pools are likely to end up at the end)?

Given I don't think "Pool" is a GEDCOM field and I don't see how pool numbers can persist when a File or Project is closed, this process has to operate every time FH opens a GEDCOM? So it must be a pretty efficient algorithm - far from arbitrarily

Or does it only do it when the program first "needs" Pool numbers? (At start up for me because I have "Pool" in my Record Window?)

Re: Relation Pool Number: Caution

Posted: 21 Apr 2022 14:59
by tatewise
IMO This is all just so much pointless speculation! Only CP can give you a definite answer.

Re: Relation Pool Number: Caution

Posted: 21 Apr 2022 15:07
by Gowermick
Mike,
Just had a play with the sample project and the following rules seem to apply:-

a) Pool numbers are added sequentially to the next number
b) when a pool X becomes empty, all pool numbers higher than X are decremented by 1.
c) When pool X is split, the two parts become X & X+1, and all pool numbers greater than X are incremented by 1

This latter rule explains why pool numbers are not necessarily in order of size

Re: Relation Pool Number: Caution

Posted: 21 Apr 2022 15:22
by davidf
tatewise wrote:
21 Apr 2022 14:59
IMO This is all just so much pointless speculation! Only CP can give you a definite answer.
Agreed that we probably need CP to give an answer - although Mick seems to be cracking it!

Going back several posts, I do want to know that if I format a box based on "Pool Number not 1", all non linked individuals (I won't say "relatives" - see another thread) will be subtly indicated. So not pointless to me! Perhaps I need to change it to "Same Pool as me" to avoid a possibly confusing gotcha?

Contribution is optional and I think we are still being true to the origins of the thread?

Re: Relation Pool Number: Caution

Posted: 21 Apr 2022 15:32
by tatewise
David, the expression you need is =IsTrue( RelationPool( Record(6,"I") ) = RelationPool( %INDI% ) ) where you replace the 6 with your Record Id number.

Re: Relation Pool Number: Caution

Posted: 21 Apr 2022 16:24
by davidf
Thanks, better safe than sorry at some time in the future when I might have forgotten this thread!