Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

RE: Multiple types of spatial entity

New Message Reply Date view Thread view Subject view Author view

Subject: RE: Multiple types of spatial entity
From: Nicolas Becu (becu@uni-hohenheim.de)
Date: Wed Jun 01 2005 - 09:00:26 CEST

Dear Tim,

I would suggest creating two sub-classes, River and Farmland. Now, I've just
looked in Cormas and it seems it's not possible to create subclasses of the
SpatialEntityElement class (the Cell).

Perhaps you could create a passive object (e.g. CellType) that would be
linked to the spatial entity class. That means that you have an attribute
"type" at the cell level referring to the CellType class, and an attribute
"cell" at the CellType level referring to the cell class.

Then you create two subclasses of CellType, a River and a Farmland.
You code your dynamics within each of these 2 classes and each time you want
to use a method of the cell, for example "neighbourhood", you write "self
cell neighbourhood" instead of "self neighbourhood".

For both classes you can code the method launching the dynamic, by using the
same name for the method, for example "run".
Then in the control method of your model you launch the dynamics of both
classes at the same time by the following line "self theCells do:[:c| c type
run]."

Hope this helps

Nicolas

 

-----Original Message-----
From: owner-cormas@cirad.cirad.fr [mailto:owner-cormas@cirad.cirad.fr] On
Behalf Of Tim Rowan
Sent: 01 June 2005 08:28
To: cormas@cirad.fr
Subject: Multiple types of spatial entity

Hi Everyone,

Does anyone have any hints for representing two or more types of
dynamic spatial processes using Cormas? My problem is that I have a
river and farmland, neither of which can exist in the same location, and
they also have very different dynamic relationships with their
neighbouring cells. It seems a little clumsy to have to use only one
type of spatial entity and give it the attributes and methods associated
with both river and farmland. I'm unsure if it is possible within Cormas
to define two classes of spatial entity, or if perhaps it may be possible
to have a river and farmland subclass of the single spatial entity class.

Any suggestions?

Thanks,
Tim

--
Tim Rowan
PhD Research Scholar
Room S237 Engineering South
Ph:+61 8 8303 6139
Fax: +61 8 8303 4359
Mobile: +61 (0)402 851 240

School of Civil & Environmental Engineering University of Adelaide Adelaide SA 5005 Australia

CRICOS Provider Number 00123M ----------------------------------------------------------- This email message is intended only for the addressee(s) and contains information that may be confidential and/or copyright. If you are not the intended recipient please notify the sender by reply email and immediately delete this email. Use, disclosure or reproduction of this email by anyone other than the intended recipient(s) is strictly prohibited. No representation is made that this email or any attachments are free of viruses. Virus scanning is recommended and is the responsibility of the recipient.

New Message Reply Date view Thread view Subject view Author view
 

Back to home