-
Notifications
You must be signed in to change notification settings - Fork 18
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
Use projet_path to redefine all the global variable #21
Comments
|
I have almost finish struggling with path dependency but still have a strange behavior: see the TODO in |
@ptaillandier found a workaround applying the |
It is a bit obscure, but I guess the order in which the variables are initialised plays a role here. I would bet that GAMA does not find the dependencies between the call to
Tell me if any of these changes modify the behaviour. |
@AlexisDrogoul I already try these two solutions: for the first one, variable are nil whatever I can do, whereas the second solution is ok but does not provide a solution. The main issue is when you try to give non constant variables (case_study and datasets_folder) a value which is partly recognize by Gama ... I push the model as it is, so you can try by yourself (with nasty write statement in build_data_set_path) |
No, the issue is in the computation of dependencies between the variables, which determines the order in which they are initialised. That's why the second solution works: you force the order of initialisation explicitly by using the two constants in the call to the function (these 2 constants must be initialised before calling the function, whereas they must not if they are simply used in the function). This is a bug in GAMA, but the second solution should work well while I'm figuring out how to fix it in GAMA (w/o breaking the compilation phase with recursive functions). |
Bug fix (gama-platform/gama@81f6d2f) |
Up to now, all the file paths are determined from the location of the experiment that is launched.
To avoid error and give more flexibility to modeler in their definition of experiment,
we should use project_path to define path.
The text was updated successfully, but these errors were encountered: