[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SWARM problems (followup question)
From: |
Paul Johnson |
Subject: |
Re: SWARM problems (followup question) |
Date: |
Wed, 24 Jun 1998 20:39:02 -0500 (CDT) |
Dear Doug:
Thanks for sharing that code. I understood almost all, except
I wonder what offsetof( x, y ) is. Is that a ordinary c function
you have written? What is its purpose?
What job are you aiming to get done with the customization of the list,
I guess I wonder.
What purpose do you serve by
aZone=[self getZone]; ???
Can't learn if I don't ask questions, you know!
pj
On Wed, 24 Jun 1998, Doug Donalson wrote:
> Here is create end where I set up the four lists.
>
> -createEnd
> {
> id listType;
> id aZone;
>
> active=1;
> aZone=[self getZone];
>
> listType = [List customizeBegin: [self getZone]];
> [listType setIndexFromMemberLoc: offsetof( AdultAphytis, listMember )];
> listType = [listType customizeEnd];
>
> adultAphytisList = [listType create: [self getZone]];
>
> listType = [List custiomizeBegin: [self getZone]];
> [listType setIndexFromMemberLoc: offsetof( AdultRedScale, listMember )];
> listType = [listType customizeEnd];
>
> adultRedScaleList=[listType create: [self getZone]];
>
> listType = [List customizeBegin: [self getZone]];
> [listType setIndexFromMemberLoc: offsetof( JuvenileAphytis, listMember )];
> listType = [listType customizeEnd];
>
> juvenileAphytisList = [listType create: [self getZone]];
>
> listType = [List customizeBegin: [self getZone]];
> [listType setIndexFromMemberLoc: offsetof( JuvenileRedScale, listMember )];
> listType = [listType customizeEnd];
>
> juvenileRedScaleList=[listType create: [self getZone]];
>
>
> return self;
> }
>
> I hope this helps a little?
>
> Cheers,
>
> D3
>
>
> Laurence wrote:
>
> > Hi,
> >
> > I'm currently working on a model of chemotaxis using SWARM, and need some
> > advice. I use objects to represent enzymes / proteins in the system that
> > signal each other. I have different classes to represent each type of
> > component, and the present program contains 1 object of each class. I now
> > need to extend it so that each protein type is represented in it's relative
> > concentration.
> >
> > 1) How can I create / manage a population of objects of different classes?
> > Do I need to use lists? Do I need a seperate list to hold the objects of
> > each class? Can you point me in the direction of some code that does similar
> > stuff?
> >
> >
> >
> > Best wishes, Laurence (address@hidden)
> > ---------------------
> > http://www.csc.liv.ac.uk/~laurence
> >
> > ==================================
> > 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.
> > ==================================
>
>
>
> --
> ************************************************************************
> * Doug Donalson * Office: (805)
> 893-2962
> * Ecology, Evolution, and Marine Biology * Home: (805) 961-4447
> * UC Santa Barbara * email
> address@hidden
> * Santa Barbara Ca. 93106 *
> ************************************************************************
> *
> * The most exciting phrase to hear in science, the one that
> * heralds new discoveries, is not "EUREKA" (I have found it) but
> * "That's funny ...?"
> *
> * Isaac Asimov
> *
> ************************************************************************
>
>
>
> ==================================
> 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.
> ==================================
>
Paul E. Johnson address@hidden
Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn
University of Kansas Office: (913) 864-9086
Lawrence, Kansas 66045 FAX: (913) 864-5700
==================================
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.
==================================