Two sample programs are given below:
state center
|
state source
|
Circle.cpa | Line.cpa |
Now write the SIM file for combining these programs. The overall format of
the SIM file is the same as for running single programs except where you list
the starting state for the cell. Since the cell will run more than one program,
it will start in more than one state. Where you had <state>
you
will now have ( <statelist> )
where statelist is just the
list of starting states seperated by a space.
0: new ( center source ) 0 0 0
|
Circle_Line.sim |
To start the simultor and combine these programs:
java gui.GUI Circle_Line.sim Circle.cpa Line.cpa
![]() |
University of Virginia Department of Computer Science Programming the Swarm |
|
David Evans evans@cs.virginia.edu Selvin George selvin@cs.virginia.edu |