Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with "default parameter sample" in Batch experiment #359

Open
ptaillandier opened this issue Oct 17, 2024 · 0 comments
Open

Problem with "default parameter sample" in Batch experiment #359

ptaillandier opened this issue Oct 17, 2024 · 0 comments
Assignees
Labels
About Batch This issue concerns batch experiments 😱 Bug The issue reveals a bug in GAMA

Comments

@ptaillandier
Copy link
Contributor

Describe the bug
In batch experiment, the proposed discret value for the parameter is wrong (with the default sample method).

To Reproduce
Steps to reproduce the behavior:

  1. Create a new model with this code:
model testsample

global {
	int nb_agents <- 100;
	float distance <- 5.0;
	list<simple_agent> neighbors;
	
	init {
		create simple_agent number: nb_agents;
	}
}

grid cell width: 100 height: 100;

species simple_agent {
	reflex spatial_computation {
		using topology(cell) {
			neighbors <- neighbors + simple_agent at_distance distance;
		}
	}
}

experiment testBatchSimple type: batch until: cycle > 10 repeat: 5{
	parameter nb_agents var: nb_agents min: 100 max: 300 step: 100;
	parameter distance var: distance min: 3.0 max: 5.0 step: 1.0;
	
	reflex end_sim {
		ask simulations {
			write "End of :" + int(self) + " " +sample(self.nb_agents) + " " + sample(self.distance) + " " + sample(self.cycle);
		}
	}
}
  1. launch the testBatchSimple experiment
  2. Click on play
  3. check the console

Expected behavior
The values for the distance variable should be: 3, 4, 5, whereas GAMA uses for values: 4, 5, 6

Desktop (please complete the following information):

  • OS: macOS
  • PC Model: MacBook Pro M2
  • GAMA version: git (2024-06 - up to date 17/10/2024)
@ptaillandier ptaillandier added 😱 Bug The issue reveals a bug in GAMA About Batch This issue concerns batch experiments labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
About Batch This issue concerns batch experiments 😱 Bug The issue reveals a bug in GAMA
Projects
None yet
Development

No branches or pull requests

3 participants