swarm-support
[Top][All Lists]
Advanced

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

[Swarm-Support] Swarm serialization


From: Marshall, James A R
Subject: [Swarm-Support] Swarm serialization
Date: Mon, 17 Mar 2003 18:17:14 -0000

Hi,
  I've been looking through the FAQ, user-manual, etc. and haven't found
much explanation of how to do serialization in Swarm. If anyone can point me
to any docs or sample code for doing this, particularly in Java, then that
would be appreciated.
  Alternatively, if anyone can let me know the extent of serialization
support for Java in Swarm at the moment then please do (for example I turned
up an email from Marcus in the archives about Java object serialization,
which said basic Java objects could be serialized, but Java collections
couldn't. That was 2000, has anything changed?)
  Thanks in advance,
        James

---
Dr James A R Marshall
Complex Systems Modelling Group (COSMIC)
Department of Earth Science and Engineering
Imperial College London
Tel: +44 (0)20 7594 7493
Fax: +44 (0)20 7594 7444
Container World Project - http://www.ese.ic.ac.uk/research/containerworld/



-----Original Message-----
From: address@hidden [mailto:address@hidden
Sent: 12 March 2003 17:33
To: address@hidden
Cc: Eliezer Gurarie
Subject: Re: [Swarm-Support] sending messages with parameters in
ModelSwarm


Eliezer Gurarie writes:
 > I am a new Swarm user with a quick tactical programming question:  Can I 
 > send a message in my Actionlist that depends on a parameter?
 > 
 > In my Action list I would like to perform a "rearrangement" of a 
 > Discrete2D object "preyspace" - based on a paramater "preyProb" like so:
 > *
 > [modelActions createActionTo: preyspace       message: M(rearrange: 
 > preyProb)]*;
 > 
 > where "rearrange" is a standard method that takes a float "p":
 > *- rearrange: (float)p*
 > 
 > the compiler responds with:   *ModelSwarm:133: parse error before 
 > before: ")" *
 > 
 > Does Swarm just inherently forbid passing methods with parameters in the 
 > ActionList?  Do I have to define the rearrange somewhere earlier (though 
 > it feels like this is the most natural place to tell it to do the 
 > rearrange?)
 > 

If I understand what you're asking, check out:

http://www.swarm.org/swarmdocs/set/swarm.activity.actioncreatingto.protocol.
html

The syntax should be something like:

[modelActions createActionTo: preyspace message: M(rearrange:) : preyProb];

Don't forget the ":" inside the "M" macro...

-- 
glen e. p. ropella              =><=                           Hail Eris!
H: 503.630.4505                              http://www.ropella.net/~gepr
M: 831.247.7901                               http://www.tempusdictum.com

_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support


reply via email to

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