swarm-support
[Top][All Lists]
Advanced

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

NSelect working?


From: Rick Riolo
Subject: NSelect working?
Date: Sun, 1 Feb 1998 17:59:33 -0500 (EST)

I tried to use the NSelect class (in simtools) as follows:
  ...
  initSwarm(argc, argv);
  bugList = [List create: globalZone];
  bugList1 = [List create: globalZone];
  ...
  // Use the NSelect object and see how that goes:
  printf("\nNSelect all the agents:\n");
  [NSelect select: [bugList getCount] from: bugList into: bugList1];
  for ( i = 0; i < 10; ++i )
          printf("-> Bug %d.\n", [[bugList atOffset: i] getID]);
  
  printf("\nAnd again NSelect:\n");
  ...

bugList has some objects added to it before the NSelect,
and bugList1 is empty.
WHen I run it I get this:
....
NSelect all the agents:
*** event raised for error: InvalidCombination
UniformDoubleDist: getDoubleSample: parameters have not been set
*** execution terminating due to error

Do I need to do something else to use NSelect?
Or is there a bug (!) in there somewhere?
(From the message it looks like NSelect is maybe not using 
the random lib stuff correctly...)

Thanks.
 - r

Rick Riolo                           address@hidden
Program for Study of Complex Systems (PSCS)
4068 Randall Lab                
University of Michigan         Ann Arbor MI 48109-1120
Phone: 313 763 3323                  Fax: 313 763 9267
http://www.pscs.umich.edu/PEOPLE/rlr-home.html


                  ==================================
   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]