Solenopsis is a platform for the development and deployment of distributed (ant-based) algorithms.
Java source code: SolenopsisII_20100728.tar.gz (Rev. 20100728)
License: GPL3
Requirements: Java JRE 6
Brocco, Amos, Hirsbrunner, Béat and Courant, Michèle, Solenopsis: A Framework for the Development of Ant Algorithms, in: Swarm Intelligence Symposium, pages 316-323, IEEE, SIS, Honolulu, Hawaii, April, 2007.
java shell.Shell --script [scriptfile]The script file for node alpha, saved as alpha.dlisp is as follows:
(platform::init { "codepath" : "path where the ant code is found", "port" : 56335 }) (var d (platform::addDaemon "alpha")) (platform::call d "ants::new" "pingpong.ant" { "$target" : "bebop://localhost:56336/beta" }) (platform::run)The call to the platform::init function initializes the execution platform. The dictionary parameter is used to define some options like the codepath, which sets the path where the ant code is to be found, and port, which defines the listening port for the platform's mail server (where incoming ant are received).
(platform::init { "codepath" : "path where the ant code is found", "port" : 56336 }) (var d (platform::addDaemon "beta")) (platform::run)The code for the ant itself, saved as pingpong.ant, is:
(virtual $target) (while 1 (begin (var source (migrate $target)) (print "Hello beta!") (migrate source) (print "Hello alpha!")))To run the example do:
java shell.Shell --script beta.dlisp java shell.Shell --script alpha.dlisp