SPUG: meetings -- a least path analysis

William Julien moonbeam at catmanor.com
Sat Oct 16 14:58:02 CDT 1999


>
>Interesting problem. But what if you want to know the geographical
>center of the SPUG population. It seems to me you'd have to input the
>latitude and longitude of each member's starting point (just before
>a meeting). Then calculate the average lat. and long. from the entire
>database.

Hmmm... The geographical center would be an interesting statistic. But, like
Barry said, that would probably place the optimum meeting place in
the middle of Lake Washington. 

Given that the possible meeting places are finite, I would think driving
distance and time to be more practical approach. 

>
>You could also weight the average by the probability each member would
>actually attend a meeting at the population center. For example, if
>A would attend 10 out of 10 meetings and B would attend 5 out of 10,
>you could multiply A's latitude by 10 and B's by 5, then add them and
>divide by 15 (to get the weighted average latitude).

Good Idea! But I would multiply by the probability of attendance. "A" has
a probability of 1 (10/10) and "B" has a probability of .5 (5/10). 

Nomally a major consideration for me, is the length of the meeting vs
the time it takes for me to get there. I am much more likely to go to
an hour length meeting if it takes 5 minutes than if it take an hour.

So, maybe this could be used for ranking the relative worth of a meeting
location. Something like the sum of the differences between the
meeting length and the driving time. Then express this as a ratio of the
meeting length and the sum divided by the number of people.

To test this, I needed to add a few more locations in my address datafile.
I had trouble finding the "lucent" location. The only lucent I could
find on the east-side was "lucent medical". Anyway...

#
# define the meeting length
#
$meeting_length = 120;

Somewhere in the while loop...
#
# sum the difference between meeting length and driving time
#
    $timevalue{$tname} += $meeting_length - $minutes;
    $timecount{$tname} ++;

Then, at the end...
#
# print out the relative worth
#
foreach (keys %timevalue) {
    printf "The $_ location has a relative worth index of %.2f\n",
           ($timevalue{$_}/$timecount{$_})/$meeting_length;
}

yahoo_maps.pl address.txt
>From                    To                      Distance
------------------      ------------------      ------------------
William Julien          Lucent Medical Systems
213 222nd Ave. NE       135 Lake St S.
Redmond, WA 98053       Kirkland, WA 98033      9.5 miles 24 minutes

Parent's Place          Lucent Medical Systems
110 128th Ave. NE       135 Lake St S.
Bellevue, WA 98004      Kirkland, WA 98033      6.1 miles 13 minutes

Pacific Inn Pub         Lucent Medical Systems
3501 Stone Way North    135 Lake St S.
Seattle, Wa. 98103      Kirkland, WA 98033      12.5 miles 24 minutes

William Julien          Speakeasy
213 222nd Ave. NE       2304 2nd Ave
Redmond, WA 98053       Seattle, WA 98121       22.3 miles 40 minutes

Parent's Place          Speakeasy
110 128th Ave. NE       2304 2nd Ave
Bellevue, WA 98004      Seattle, WA 98121       12.5 miles 25 minutes

Pacific Inn Pub         Speakeasy
3501 Stone Way North    2304 2nd Ave
Seattle, Wa. 98103      Seattle, WA 98121       3.3 miles 9 minutes

William Julien          Fred Hutchinson
213 222nd Ave. NE       1100 Fairview Ave. N
Redmond, WA 98053       Seattle, WA 98109       21.1 miles 41 minutes

Parent's Place          Fred Hutchinson
110 128th Ave. NE       1100 Fairview Ave. N
Bellevue, WA 98004      Seattle, WA 98109       12.0 miles 26 minutes

Pacific Inn Pub         Fred Hutchinson
3501 Stone Way North    1100 Fairview Ave. N
Seattle, Wa. 98103      Seattle, WA 98109       2.3 miles 6 minutes

The Lucent Medical Systems location has a relative worth index of 0.83
The Fred Hutchinson location has a relative worth index of 0.80
The Speakeasy location has a relative worth index of 0.79

        _,'|            _.-''``-...___..--';
       /, \'.      _..-' ,      ,--...--'''
      < \   .`--'''      `     /| William Julien moonbeam at catmanor.com
       `-,;'              ;   ; ; http://www.catmanor.com/moonbeam/
 __...--''     __...--_..'  .;.'  vi is my shepherd; i shall not font.
(,__....----'''      (,..--''     
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address





More information about the spug-list mailing list