Skip to content

[batch] simulation duration increases steadily over time #291

Description

@lesquoyb

Is your request related to a problem? Please describe.
I noticed that the duration of the exact same simulation was constantly increasing as it is simulated again in a batch experiment.
For example with this model:

/**
* Name: keepsim
* Based on the internal empty template. 
* Author: baptiste
* Tags: 
*/


model keepsim

global{
	float seed <- 3.1415;
	float start;
	init {
		start <- gama.machine_time;
	}
	reflex d {
		int size <- 100;
		let m <- matrix_with({size,size}, rnd(0,255));
		m <- shuffle(m);
		loop i from:0 to:size-1 {
			loop j from:0 to:size-1 {
				m[i,j] <- rnd(255);
			}
		}
	}
	
	reflex s when:cycle=99{
		save [int(self), gama.machine_time - start] to:"logs/simulationDuration.csv" rewrite:false;
	}
	
}

experiment simulationBase type: batch repeat:500 parallel:1 keep_simulations:false until:cycle=100;

The duration looks like this:
image
There's a clear linear-like increase in time

Describe the improvement you'd like
The duration of a same simulation should be somewhat constant in a batch experiment

Metadata

Metadata

Assignees

No one assigned

    Labels

    About BatchThis issue concerns batch experimentsEnhancementThis is a request for enhancement

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions