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

[GS] Unable to set parameters when loading a simulation in GUI #394

Open
lesquoyb opened this issue Jan 7, 2025 · 0 comments
Open

[GS] Unable to set parameters when loading a simulation in GUI #394

lesquoyb opened this issue Jan 7, 2025 · 0 comments
Assignees
Labels
About GAMA Server This issue concerns GAMA server usage 😱 Bug The issue reveals a bug in GAMA

Comments

@lesquoyb
Copy link
Contributor

lesquoyb commented Jan 7, 2025

Describe the bug
When using the load command of gama-server in GUI, only two parameters are taken into account: the path of the file and the experiment name. This is indeed the minimum needed to run an experiment, but the protocol defines a lot more of options as redirecting errors to the client or not or setting the values for the simulation parameters, you can find the complete list here.

All those parameters are working in headless mode and are specific to GUI loading. This is caused by the call to different functions in GUI and headless:

  • in GUI we are calling the method LOAD defined in DefaultServer.java
  • in headless we are calling the execute method defined in LoadCommand.java

The common parts of those method should probably be refactored.

To Reproduce
Steps to reproduce the behavior:

  1. Create this model:
global {
	int var1 <- -100;
	
	init {
		write var1;
	}

}

experiment exp{
	parameter "param" var:var1;
}
  1. Create a client that sends a load command for this model and tries to set var1 to any other value using the parameters field
  2. Run gama-server in headless, connect the client and observe that var1 is set to the correct value
  3. Now do the same but by connecting to gama in GUI mode and observe that var1 has not been set to the new value.

Expected behavior
All the parameters in load are taken into account in GUI as it's the case in headless

Additional context
This is a sub-task of #1

@lesquoyb lesquoyb added 😱 Bug The issue reveals a bug in GAMA About GAMA Server This issue concerns GAMA server usage labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
About GAMA Server This issue concerns GAMA server usage 😱 Bug The issue reveals a bug in GAMA
Projects
None yet
Development

No branches or pull requests

2 participants