COMOKIT / COMOKIT-Model

A GAMA (http://gama-platform.org) model on the assessment and comparisons of intervention policies against the CoVid19 pandemics
https://comokit.org
GNU General Public License v3.0
25 stars 18 forks source link

Launch "Abstract Experiment with Parameters.gaml" throws an Exception #19

Closed benoitgaudou closed 4 years ago

benoitgaudou commented 4 years ago

When I run the Abstract Experiment with Parameters.gaml experiment, I get the following exception:

2 occurrences in 2 agents at cycle 0: Java error: nil value detected
in file<int, geometry> shp_boundary <- file_exists(dataset + 'boundary.shp') ? file<int, geometry>(dataset + 'boundary.shp') : nil ;
NullPointerException: null
msi.gama.common.util.FileUtils.findInWorkspace(FileUtils.java:157)
msi.gama.common.util.FileUtils.constructAbsoluteFilePath(FileUtils.java:134)
msi.gaml.operators.Files.exist_file(Files.java:115)
gaml.additions.GamlAdditions.lambda$578(GamlAdditions.java:635)
msi.gaml.expressions.UnaryOperator._value(UnaryOperator.java:83)
msi.gaml.expressions.AbstractExpression.value(AbstractExpression.java:70)
msi.gaml.expressions.BinaryOperator._value(BinaryOperator.java:75)
when applying the file_exists operator on ../../Datasets/Ben Tre/boundary.shp
in initializing attribute shp_boundary
in agents Simulation 0, With parameters0

Note that this is first due to the fact that all the paths are defined for experiments located in a folder in the Experiment folder, whereas Abstract Experiment with Parameters.gaml is directly located in the Experiment folder.

In addition we can also question the file_exists operator as it returns an exception in the case where the path to the folder in which could be located the file does not exist.

chapuisk commented 4 years ago

@benoitgaudou the error have been removed, when dealing with #21. However, there is a Wrong Magic Number error now @ptaillandier !!!