|
From: | Paul Johnson |
Subject: | Re: [Swarm-Support] JavaClassProxy error |
Date: | Tue, 07 Jun 2005 09:20:49 -0500 |
User-agent: | Mozilla Thunderbird 1.0.2-1.3.3 (X11/20050513) |
I don't know about the crash you are seeing, but instead of fixing it, I suggest you just redesign.
I THINK the slowdown you are noticing is recognized and can be addressed in other ways. The slowdown results from the fact that Swarm does not know what type of agents you have. So one approach is to change your model to use the homogeneous nature of the collection to accelerate processing.
http://www.ku.edu/~pauljohn/SwarmFaq/WorkingExampleCode/java/ActionForEachHomogeneous.txt Also consult here: http://www.ku.edu/~pauljohn/SwarmFaq/Memos/ See files "MarcusCreateActions..."Honestly, it might be the easiest thing to just keep your collection away from the schedule altogether. Write a method in ModelSwarm that loops over the agents. Then put that method on the schedule. This is generally much much faster than any variant of createActionForEach.
pj K a wrote:
Hello All, -Swarm2.2, Java, Windows Having built a model and run, I get the following error: ================================================== *** event raised for error: InvalidArgument *** function: _i_Object_s__doesNotRecognize_(), file: /src/swarm/src/defobj/DefObject.m, line: 825 JavaClassProxy does not recognize interact *** execution terminating due to error /src/swarm/src/defobj/Symbol.m:187 -[Error(c) _raiseEvent:] ================================================== Please could anyone advise on what is going on with this error? Note: I only get this error when, in my ModelSwarm class, I build action messages sent individually to every object in a List, using createActionTo$message. When I use createActionForEach$message on the collection, it seems to work. The reason why I'm trying with createActionTo$message is because I think my simulation runs considerably faster this way. Using the ForEach initialisation seems to be slower. Any advice welcome. Thanks a lot. Kel
-- Paul E. Johnson email: address@hidden Dept. of Political Science http://lark.cc.ku.edu/~pauljohn 1541 Lilac Lane, Rm 504 University of Kansas Office: (785) 864-9086 Lawrence, Kansas 66044-3177 FAX: (785) 864-5700
[Prev in Thread] | Current Thread | [Next in Thread] |