swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] model


From: Scott Christley
Subject: Re: [Swarm-Support] model
Date: Fri, 31 Aug 2007 15:11:16 -0400

There is nothing that prevents you from making the location, instance variables within the agent class.  It isn't necessary for your agents to live on a grid space; they can live in any arbitrary space you wish to define as a "location".

cheers
Scott

@interface MyClass : Swarm
{
double X;
double Y;
}
- (void)putSelfAtX:(double)xPos atY:(double)yPos
@end

@implementation
- (void)putSelfAtX:(double)xPos atY:(double)yPos
{
X = xPos;
Y = yPos;
}
@end

On Aug 31, 2007, at 4:06 AM, yuefengch wrote:

 
 
hello,
  I want to define a double environment,then put agent into its grid. I want to know whether Swarm support my idea?
  The program following:
   double x,y;
  [agent put self atX:x atY:y]; 
 

 



网 易 Yeah.net 免 费 邮 箱 全 新 改 版,珍 藏 帐 号 开 放,快 来 抢 注 >>
_______________________________________________
Support mailing list


reply via email to

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