Systems Thoughts

Try to think everything systematically

This is a log for my thesis study on Stochastic Pi-Calculus Machine (SPiM).

Here is a sample code for implementing hill-type equation in SPiM:

directive sample 10.0 1000
directive plot sender();receiver()
directive graph
new comm@1.0:chan(float)
let sender(n:float) = (
!comm(n);
sender(n/2.0)
)
and receiver() = (
do delay@1.0; receiver()
or ?comm(n); delay@n
)
run (sender(1.0)|500 of receiver())

You will get a curve looks like this:

hill-type1.jpg

The receiver()’s degrade time is controlled by n which becomes half fold every stochastic time period. For more complex equations I think you can modify sender() and pass your private channel for communication though the parameters. Then the result will not be seen by any other processes, hopefully:). But I haven’t test it yet.

Related posts

Tags: , , ,
Posted by linuxcity on Tuesday, February 26th, 2008

One Response to “Stochastic Pi-calculus Machine Research - Hill Type Equation” Add your own

Post A Comment