Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

Can instance variable be a sortedcollection?

New Message Reply Date view Thread view Subject view Author view

Subject: Can instance variable be a sortedcollection?
From: Miao Wang (Miao.Wang1@newcastle.ac.uk)
Date: Tue May 09 2006 - 01:42:27 CEST

Hi!
 
I want to let my agents to visit several targets. I want to set a instance variable of agent to make a record of whether a agent has been to the targes.
 
For example there are 5 targets(T1,T2,...T5) for each agent to go. Then the instance variable named 'Record' should be a sortedcollection(R1,R2,...R5), the initial value of R are all 0, then if the agent has been to target T1, then R1=1, if he has been to target T2, then R2=1, In this way the agent can have a memory and not to go to a target more than one time.( Target in my model is a kind of attribute of spatial entity-Cell, I don't want to change it's target attribute)
 
Can instance variable be a sortedcollection? if it is possible, how can I connected sortedcollection T(T1,T2,...Tn) with sortedcollection R(R1,R2,...Rn)?
 
It would be very appriciated if anyone can help me. Great thanks!!
 
Forgive me for lacking knowledge of smalltalk!
 
 
Mira
 
Miao Wang at Geomatics
School of Civil Engineering and Geosciences
G.19, Cassie Building,
University of Newcastle Upon Tyne, NE1 7RU
England
Email: miao.wang1@ncl.ac.uk

New Message Reply Date view Thread view Subject view Author view
 

Back to home