swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Concurrent Groups & Randomized Default Order for ActionGroups


From: glen e. p. ropella
Subject: Re: Concurrent Groups & Randomized Default Order for ActionGroups
Date: Wed, 13 May 1998 07:41:34 -0600

Parviez,

I don't recall seeing any responses to your message, so I thought
I'd chime in.

The best thing to do would be to send a patch to the SFI team
so that they can evaluate your method to see if it can be
generalized or if it's the right way to implement Randomized
action groups.

An alternative, which I prefer, is to send a patch file to the
mailing list so that others can incorporate it if they dare
(and need it).  This allows us (the users) to bear some of 
the burden for verifying code rather than putting all of the
burden on the SFI team.

So, *please* send the changes to the list.  I like patches;
but, straight copies work, as well.

At 12:57 PM 5/11/98 -0700, you wrote:
>I thought this might be useful to others, but I didn't know how best to 
>spread the method, as it requires editting source code and recompiling 
>swarm itself.
>
>Mechanically it randomizes the nextAction call within the ActionGroup
>setting. It doesn't randomize calls within a ForEach type call -- (that
>would require making an analogous change, but I don't understand that
>call's methodology as well). 
>
>For autoDropping actionGroups it works as a without replacement 
>randomization, but for non-autoDropping groups it is a with replacement 
>call, meaning that several actions of one type may occur before the next 
>occurance of another.
>
>Essentially the only user difference is: 
>-(void)setDefaultOrderRandomizedWithGenerator:(id)Generator;
>message which sets the bit, and sets a new generator variable --
>I had to add a new message, rather than use the old one to set the generator.
>so the concurrentgrouping would look like:
>   concurrentGroupType = [ConcurrentGroup customizeBegin: aZone];
>  [concurrentGroupType setDefaultOrderRandomizedWithGenerator: ranNumGen];
>  concurrentGroupType = [concurrentGroupType customizeEnd];
> ...
> [modelSchedule setConcurrentGroupType: concurrentGroupType];
>
>Generator here is a random number generator, although it could be 
>anything that responds to -getDoubleSample. (I think).
>
>Would this be useful for others, and how do I make it available?
>I've tested it as a Concurrent Group, and an ActionGroup, 
>both autoDropping and non-autoDropping, but it is a hack, so I can't make 
>any promises!


glen

glen e. p. ropella         =>Hail Eris!<=         <address@hidden>
The Swarm Corporation                             (505) 424-0448

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]