[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Swarm RPMs. Current. Fresh. Tasty. getCurrentValue from Sequences works
From: |
Paul E Johnson |
Subject: |
Swarm RPMs. Current. Fresh. Tasty. getCurrentValue from Sequences works too |
Date: |
Thu, 10 Jan 2002 17:28:20 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011014 |
OK, here is the good stuff today:
http://lark.cc.ukans.edu/~pauljohn/Swarm/Swarm-2.2x_RPMSforRH7.2/
You should find RPMs:
http://lark.cc.ukans.edu/~pauljohn/Swarm/Swarm-2.2x_RPMSforRH7.2/swarm-2.1.127.20020107-1.i386.rpm
http://lark.cc.ukans.edu/~pauljohn/Swarm/Swarm-2.2x_RPMSforRH7.2/swarm-gcjswarm-2.1.127.20020107-1.i386.rpm
http://lark.cc.ukans.edu/~pauljohn/Swarm/Swarm-2.2x_RPMSforRH7.2/swarm-jdk-2.1.127.20020107-1.i386.rpm
http://lark.cc.ukans.edu/~pauljohn/Swarm/Swarm-2.2x_RPMSforRH7.2/swarm-static-2.1.127.20020107-1.i386.rpm
Now, here's the really exiciting part. These include a little patch we
just discussed in swarm-support that lets you get the current values of
sequences that are being shown in a graph. So you can use them to stop a
simulation when a certain value is reached. How exciting.
So if you use this RPM, you can do things like:
id pctSeq, changeSeq;
// imagine you have an EZGraph created called "opinionGraph"
// I'm not pasting in my example because it is all junked up with
// unusual options and hdf5 save stuff.
// now add a sequence, and catch the return as "pctSeq"
pctSeq = [opinionGraph createSequence: "Opinion = YES"
withFeedFrom: [modelSwarm getInfluenceGrid]
andSelector: M(getPctTypeOne)];
// add an average sequence too!
changeSeq = [opinionGraph createAverageSequence: "Opinion Changed"
withFeedFrom: [modelSwarm getCitizenList]
andSelector: M(getChanged)];
After that, calls like [pctSeq getCurrentValue] and [changeSeq
getCurrentValue] work, i.e., you get back a double from them you can
test. I hope you find this as delightful as I do. Until now, I was
keeping a separate set of records on the variables that the sequences
represent in order to stop the sim at the right time.
pj
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 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.
- Swarm RPMs. Current. Fresh. Tasty. getCurrentValue from Sequences works too,
Paul E Johnson <=