{"action":"created","issue":{"url":"https://api.github.com/repos/gama-platform/gama/issues/2262","repository_url":"https://api.github.com/repos/gama-platform/gama","labels_url":"https://api.github.com/repos/gama-platform/gama/issues/2262/labels{/name}","comments_url":"https://api.github.com/repos/gama-platform/gama/issues/2262/comments","events_url":"https://api.github.com/repos/gama-platform/gama/issues/2262/events","html_url":"https://github.com/gama-platform/gama/issues/2262","id":263616624,"number":2262,"title":"A genetic Batch model throw exception in headless mode","user":{"login":"hqnghi88","id":6105384,"avatar_url":"https://avatars2.githubusercontent.com/u/6105384?v=4","gravatar_id":"","url":"https://api.github.com/users/hqnghi88","html_url":"https://github.com/hqnghi88","followers_url":"https://api.github.com/users/hqnghi88/followers","following_url":"https://api.github.com/users/hqnghi88/following{/other_user}","gists_url":"https://api.github.com/users/hqnghi88/gists{/gist_id}","starred_url":"https://api.github.com/users/hqnghi88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hqnghi88/subscriptions","organizations_url":"https://api.github.com/users/hqnghi88/orgs","repos_url":"https://api.github.com/users/hqnghi88/repos","events_url":"https://api.github.com/users/hqnghi88/events{/privacy}","received_events_url":"https://api.github.com/users/hqnghi88/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-07T04:50:26Z","updated_at":"2017-10-07T16:23:02Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Steps to reproduce\r\n1.\r\n\r\n```\r\nmodel HB\r\n\r\nglobal\r\n{\r\n \t\r\n\tfloat weight_profit <- 0.7 parameter:true;\r\n\tfloat weight_risk <-0.6 parameter:true;\r\n\tfloat weight_implementation <-0.7 parameter:true;\r\n\tfloat weight_suitability <-0.7 parameter:true;\r\n\tfloat weight_neighborhood <-0.0 parameter:true;\r\n\tfloat weight_transition_tax <- 0.9 parameter: true;\r\n\tfloat weight_lu_tax <- 0.8 parameter: true;\r\n\tfloat probability_changing <- 1.0 parameter: true;\r\n\tfloat probability_risk <- 1.0 parameter: true;\r\n\t\r\n}\r\nexperiment Calibration type: batch keep_seed: true repeat: 1 until: cycle>2 {\r\n\tparameter weight_profit  var:weight_profit min: 0.0 max: 1.0 step: 0.1;\r\n\tparameter weight_risk  var:weight_risk min: 0.0 max: 1.0 step: 0.1;\r\n\tparameter weight_implementation  var:weight_implementation min: 0.0 max: 1.0 step: 0.1;\r\n\tparameter weight_suitability  var:weight_suitability min: 0.0 max: 1.0 step: 0.1;\r\n\tparameter weight_neighborhood  var:weight_transition_tax min: 0.0 max: 1.0 step: 0.1;\r\n\tparameter weight_transition_tax  var:weight_transition_tax min: 0.0 max: 1.0 step: 0.1;\r\n\tparameter weight_lu_tax  var:weight_lu_tax min: 0.0 max: 1.0 step: 0.1;\r\n\tparameter probability_changing var:probability_changing min: 0.0 max: 1.0 step: 0.1;\r\n\tparameter probability_risk var:probability_changing min: 0.0 max: 1.0 step: 0.1;\r\n\r\n\r\n\r\n\tmethod genetic pop_dim: 10 crossover_prob: 0.7 mutation_prob: 0.1 improve_sol: true stochastic_sel: false\r\n\tnb_prelim_gen: 1 max_gen: 20  maximize: kappa_sim ;\r\n\t\r\n}\r\n```\r\n\r\n2. \r\n```\r\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n    <Simulation id=\"2\" driver=\"msi.gama.headless.runtime.GamaSimulator\" sourcePath=\"batch_headless.gaml\" finalstep=\"3\" experiment=\"Calibration\">\r\n    <Parameters>\r\n    </Parameters>\r\n    <Outputs>\r\n    </Outputs>\r\n    </Simulation>\r\n```\r\n\r\n### Expected behavior\r\nTell us what should happen (include all relevant expectations)\r\nthe batch explore all params combinations\r\n### Actual behavior\r\nTell us what happens instead (include relevant information, like logs, snapshots, etc.)\r\nI've got this exception after 1 simulation\r\n\r\n```\r\nException in thread \"Thread-5\" java.lang.ArrayIndexOutOfBoundsException: -1\r\n\tat java.util.ArrayList.elementData(ArrayList.java:418)\r\n\tat java.util.ArrayList.get(ArrayList.java:431)\r\n\tat msi.gama.kernel.batch.InitializationUniform.initializePop(InitializationUniform.java:52)\r\n\tat msi.gama.kernel.batch.GeneticAlgorithm.findBestSolution(GeneticAlgorithm.java:201)\r\n\tat msi.gama.kernel.batch.ParamSpaceExploAlgorithm.run(ParamSpaceExploAlgorithm.java:112)\r\n\tat msi.gama.kernel.experiment.BatchAgent.step(BatchAgent.java:157)\r\n\tat msi.gama.headless.core.Experiment.step(Experiment.java:93)\r\n\tat msi.gama.headless.job.ExperimentJob.doStep(ExperimentJob.java:293)\r\n\tat msi.gama.headless.job.ExperimentJob.play(ExperimentJob.java:272)\r\n\tat msi.gama.headless.job.ExperimentJob.playAndDispose(ExperimentJob.java:247)\r\n\tat msi.gama.headless.runtime.LocalSimulationRuntime$FakeApplication.run(LocalSimulationRuntime.java:206)\r\n```\r\n\r\n\r\n### System and version \r\nWhich version of GAMA, JDK, OS ... (if necessary, copy Help>Installation Details>Configuration in GAMA)\r\ngama git\r\n"},"comment":{"url":"https://api.github.com/repos/gama-platform/gama/issues/comments/334947130","html_url":"https://github.com/gama-platform/gama/issues/2262#issuecomment-334947130","issue_url":"https://api.github.com/repos/gama-platform/gama/issues/2262","id":334947130,"user":{"login":"AlexisDrogoul","id":579256,"avatar_url":"https://avatars3.githubusercontent.com/u/579256?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexisDrogoul","html_url":"https://github.com/AlexisDrogoul","followers_url":"https://api.github.com/users/AlexisDrogoul/followers","following_url":"https://api.github.com/users/AlexisDrogoul/following{/other_user}","gists_url":"https://api.github.com/users/AlexisDrogoul/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexisDrogoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexisDrogoul/subscriptions","organizations_url":"https://api.github.com/users/AlexisDrogoul/orgs","repos_url":"https://api.github.com/users/AlexisDrogoul/repos","events_url":"https://api.github.com/users/AlexisDrogoul/events{/privacy}","received_events_url":"https://api.github.com/users/AlexisDrogoul/received_events","type":"User","site_admin":false},"created_at":"2017-10-07T16:23:02Z","updated_at":"2017-10-07T16:23:02Z","author_association":"OWNER","body":"Does the same model run in GUI ?\r\n\r\nI dont really understand what it is supposed to do, but I find it odd that different parameters point to the same variable:\r\n\r\n```\r\n\tparameter probability_changing var:probability_changing min: 0.0 max: 1.0 step: 0.1;\r\n\tparameter probability_risk var:probability_changing min: 0.0 max: 1.0 step: 0.1;\r\n```\r\n\r\nor \r\n\r\n\r\n```\r\n\tparameter weight_neighborhood  var:weight_transition_tax min: 0.0 max: 1.0 step: 0.1;\r\n\tparameter weight_transition_tax  var:weight_transition_tax min: 0.0 max: 1.0 step: 0.1;\r\n```\r\n\r\n"}}
{"actor":{"display_login":"AlexisDrogoul"}}