I used the Objective-C version of swarm in my doctorate thesis because it was free software and was not an interpreted language, like java. The model that I was developing was quite complex and I thought that running it through an interpreted language would be slower than running a compiled binary. I thought Swarm was a good choice. However, after finishing my doctorate, I translated my model into C++ and it became about 2-3 times faster than the one written in Objective-C with swarm. Thus, now I plan to continue the development of my virtual anthropoids in C++, without any agent based model toolkit. I still have to compare C++ with java, since java has many performance optimizations that might make the model run faster than when written in C++. Anyway, I still keep here the quick guide to build Objective-C Swarm and the packages for Debian and Ubuntu.
sudo apt-get update
sudo apt-get install gobjc gperf libxpm-dev libpng12-dev \
automake emacs21-nox libhdf5-serial-dev blt-dev \
autoconf libtool make xfonts-75dpi xfonts-100dpi
wget http://pj.freefaculty.org/Swarm/swarm-2.2.4.tar.gz tar -xzf swarm-2.2.4.tar.gz cd swarm-2.2.4
./autogen.sh
./configure --with-pic --enable-onelib --with-gnu-ld \
--disable-jar --with-tcl=/usr/lib/tcl8.4/ \
--without-jdkdir --with-tk=/usr/lib/tk8.4/
make
sudo make install
Note: If you are using a version of Ubuntu older than 8.04 you will have to
pass different parameters to the configure script.
/usr, but since we
installed it at /usr/local, we need to inform the Makefiles about
this:
export SWARMHOME=/usr/localIn addition to putting the above line in your ~/.bashrc, copy and paste it in your terminal too. When you logoff and login again the .bashrc will be re-read and the SWARMHOME environment variable automatically will be active.
wget http://ftp.swarm.org/pub/swarm/apps/objc/sdg/swarmapps-objc-2.2-3.tar.gz tar -xvzf swarmapps-objc-2.2-3.tar.gz cd swarmapps-objc-2.2-3/heatbugs/ make ./heatbugs
sudo apt-get install build-essential dpkg-dev debhelper fakeroot wget http://pj.freefaculty.org/Swarm/swarm-2.2.4.tar.gz -O swarm_2.2.4.orig.tar.gz wget http://jalvesaq.googlepages.com/swarm_2.2.4-1.diff.gz wget http://jalvesaq.googlepages.com/swarm_2.2.4-1.dsc dpkg-source -x swarm_2.2.4-1.dsc cd swarm-2.2.4 dpkg-buildpackage -rfakeroot -uc -us cd .. sudo dpkg -i libswarm_2.2.4-1*.deb libswarm-dev_2.2.4-1*.debNOTE: Debian/Ubuntu and Red Hat/Fedora use different file system hierarchies. If you are using the Debian package, you'll have to change one line of the Makefiles of your swarm applications from:
include $(SWARMHOME)/etc/swarm/Makefile.applto
include /usr/share/libswarm/etc/Makefile.applIf you just want to run a precompiled model, you don't need neither libswarm-dev nor libswarm-dbg, and if you don't want to build swarm yourself, you can use the binaries I've built for:
| Ubuntu 8.04 (Hardy Heron) i386: | md5sum |
|---|---|
| libswarm_2.2.4-1_Hardy_i386.deb | 26fa93a5393c463c8924458bc8f3da30 |
| libswarm-dev_2.2.4-1_Hardy_i386.deb | 67a9bf87dcd8bf013839e703fa5bdf11 |
| libswarm-dbg_2.2.4-1_Hardy_i386.deb | 4a84cf4ae5ff654c40bee2665aa52151 |
| Ubuntu 8.04 (Hardy Heron) amd64: | md5sum |
| libswarm_2.2.4-1_Hardy_amd64.deb | 5284702387314276e13b15cf08dd309e |
| libswarm-dev_2.2.4-1_Hardy_amd64.deb | 42c9f0d16c4dc70c1e50fefb653d9fc3 |
| libswarm-dbg_2.2.4-1_Hardy_amd64.deb | d4a087f42429cae666c5baac60872a0e |
| Debian Etch (4.0) | md5sum |
| libswarm_2.2.3-1_Etch_i386.deb | 22001507e06d8880df53379e7d5e9e61 |
| libswarm-dev_2.2.3-1_Etch_i386.deb | 33958c3f836cc4b3854e66f617df4341 |
| libswarm-dbg_2.2.3-1_Etch_i386.deb | 9349bc381b5e6a51643439614d238d3c |