Hi all,
as you in this video, I was able to use Roassal to visualize a
multi-agent simulation in a grid.
https://www.youtube.com/watch?v=EXvsdL5sTRw
Now I would like to do animate the simulation without using I/O from user.
I try to use the VIVA framework without any success ...
Basically, I'm doing one step of the model, modify the elements of the
view and do a signalUpdate on the view.
|choosenModel aModel nbSteps |
choosenModel := ECEC.
nbSteps := 200.
aModel := choosenModel initialize;new.
aModel initSimulation.
v := RTView new.
b := RTMenuBuilder new view:v.
n := (RTMultiLinearColor new) colors: (ColorPalette sequential colors:
9 scheme: 'Greens').
c := n
command: [:cells| (cells biomass)/10.0.].
b menu: 'step' background: Color red callback:[
|es|
aModel runStep.
v removeAllElements.
es := (RTBox new color: c; size: 25) elementsOn: aModel theVegetationUnits.
v addAll: es.
RTGridLayout new
gapSize:0;
lineItemsCount: aModel spaceModel column;
on: v elements.
v signalUpdate.
].
v
Any hints ?
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/