swarm-support
[Top][All Lists]
Advanced

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

Re: Simple Simulation problem


From: Trushar Panchal
Subject: Re: Simple Simulation problem
Date: Tue, 02 Jul 2002 04:25:58 +0100

Hi Paul,

Thanks for your advise. I am sending you the zip file as you requested. 
Also I missed to initialise the file Agent1/2.java with int a=0; which 
i have done. I use Win 2000 and java. It compiles without any problems 
and comes up with the Control Panel but the Display window and the 
Probe Windows are not coming up. Once I click 'Start' this is the two 
output i get.

address@hidden/Java/JavaSwarm/FirstSimulation] $ make
/Swarm-2.1.1/bin/javacswarm StartSimulation.java AssignValue.java 
Agent1.java Agent2.java ModelSwarm.java ObserverSwarm.java 
SwarmUtils.java

address@hidden/Java/JavaSwarm/FirstSimulation] $ javaswarm 
StartSimulation

SimpleBug number 1 has been created at 40, 0
SimpleBug number 2 has been created at 40, 80

address@hidden/Java/JavaSwarm/FirstSimulation] $

I hope this might help you to help me. This is very similar to the 
tutorial given. This simulation works if I kick out ObserverSwarm.java 
file and work only with ModelSwarm.java (making changes in 
StartSimulation.java of course).

Hope you will be able to help me out here and get me a display where I 
can see 2 agents roaming in the world. I will be really thankful if you 
can help me get through as i am struggling with this. Thanks a lot. 

Regards
Trushar

Quoting Paul E Johnson <address@hidden>:

> I'm looking at your package now.
> 
> Next time you wrap something up, delete the *.class files and save a
> 
> directory name, so that when I unzip your package, the files create
> 
> their own directory and they all stay together.
> 
> I don't understand what your command to compile this might be.
> 
> It Looks to me that nothing compiles because you have this undefined
> "a" 
> here in Agent1.java and Agent2.java:
> 
> 
>     if (assValue.getValueAtX$Y(xPos, yPos) == 1)
>              {
>                          a = assValue.getValueAtX$Y(xPos, yPos);
>                  System.out.println("Agent " + bugNumber + " has
> found 
> Content of "+ a + " at " + xPos + ", " + yPos);
>              }
> 
> 
> After I fix that (make a a double), I get some monkey business that
> 
> means trouble in my machine, I think. On RedHat linux, this indicates
> 
> some problem with the way I'm building the rpm, I think.
> 
> Is this what you do?
> 
> $ javacswarm StartSimulation.java
> 
> Look what I get! I have no idea why a c++ dependency would arise. For
> 
> c++ libraries I do have:
> 
> ./lib/libstdc++-3-libc6.2-2-2.10.0.so
> ./lib/libstdc++-libc6.2-2.so.3
> ./lib/libstdc++-3-libc6.2-2-2.10.0.a
> ./lib/libstdc++-libc6.2-2.a.3
> 
> $ javaswarm StartSimulation
> Error: failed /usr/local/j2sdk1.4.0/jre/lib/i386/client/libjvm.so, 
> because libstdc++-libc6.1-1.so.2: cannot open shared object file: No
> 
> such file or directory
> 
> So, sorry, don't know how to help.
> 
> -- 
> 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
> 
> 
>                   ==================================
>    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.
> 
> 



Mr. Trushar Panchal
    PhD Computer Science
Department of Computer Science
University of Hertfordshire
78 Telford Court, Bishops Rise
Hatfield, Herts, AL10 9BT UK

Phone : +44 (0) 1707 28 5035/5118
Mobile: +44 (0) 77 1234 3692

http://www.trushar-panchal.co.uk

Attachment: simulation.zip
Description: Zip compressed data


reply via email to

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