**Following my previous inquiry**
Thanks Benoit for the explanation on the batch experiment! I'm trying to do batch experiments and it improves the speed indeed.
However, the simulation output from GUI and batch experiments are totally different and I'm still not sure why.
For example, I have created a variable to count the number of agents and save the number per day to CSV file. The number of agents per day from GUI and batch experiments are totally different (please see the figure below).
I have tried without using parallelism but it didn't work. I'm creating a
scheduler species to execute the agent's behaviors in parallel - does this possibly affect the process of the batch experiment?
Here's a part of my code.
global{
int currHour;
int current_date;
bool parallel <- false;
int nb_mosquito <- 5000 update: mosquito count(each.age>=0);
init {
create scheduler;
create mosquito number: nb_mosquito ;
initializationStartTime <- machine_time;
}
reflex setDay {
currHour <- int(cycle mod 4);
if cycle > 0 and currHour 0 {
do saveOutput;
}
}
action saveOutput {
save [ current_date, nb_mosquito] to: "../result/sim" + initializationStartTime + ".csv" type: "csv" rewrite:false header:false;
}
species scheduler parallel:parallel {
reflex mosquito_scheduler {
ask mosquito parallel:: parallel {
do feeding;
}
ask mosquito parallel:: parallel {
do reproduce;
}
}
}
species mosquito skills: [moving] {
action feeding {
...
}
action reproduce {
...
}
experiment batch type: batch repeat:1 keep_seed: false until: cycle>360{
}
Any comments or ideas? Many thanks for your time and help.
Best,
Ahyoung
--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gama-platform/df50d653-45f1-45d6-bfee-75034232553bn%40googlegroups.com.