gama-platform / gama.old

Main repository for developing the 1.x versions of GAMA
GNU General Public License v3.0
300 stars 99 forks source link

Bug with the AStar and Bellmann shortest path algorithms #1911

Closed nbecu closed 8 years ago

nbecu commented 8 years ago

Steps to reproduce

1. Update model library and open Goto Network.gaml (Library Models/Features/Agent movement/models/Goto Network.gaml )

2. Run the model with the parameter 'Type of Optimzer" set to "Djikstra", "Floyd Warshall" -> It works perfectly

3. Set the parameter 'Type of Optimzer" to "AStar" or "Bellmann", and run again the simulation -> It Bugs

Expected behavior

-> The model should run with "AStar" or "Bellmann" optimizers

System and version

GAMA 1.7

AlexisDrogoul commented 8 years ago

Which symptoms (error messages, problems, runtime errors) ?

nbecu commented 8 years ago

It's Error Messages

2 occurrences in 2 agents at cycle 1: java.lang.NullPointerException in java.lang.NullPointerException msi.gama.util.GamaListFactory.create(GamaListFactory.java:112) msi.gama.util.graph.GamaGraph.computeBestRouteBetween(GamaGraph.java:850) msi.gama.metamodel.topology.graph.GraphTopology.pathBetweenCommon(GraphTopology.java:268) msi.gama.metamodel.topology.graph.GraphTopology.pathBetween(GraphTopology.java:155) msi.gaml.skills.MovingSkill.primGoto(MovingSkill.java:411) gaml.additions.GamlAdditions$987.run(GamlAdditions.java:1028) gaml.additions.GamlAdditions$987.run(GamlAdditions.java:1) msi.gaml.statements.PrimitiveStatement.privateExecuteIn(PrimitiveStatement.java:81) msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:42) msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:43) msi.gaml.statements.DoStatement.privateExecuteIn(DoStatement.java:187) msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:42) msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:43) msi.gaml.statements.AbstractStatementSequence.privateExecuteIn(AbstractStatementSequence.java:55) msi.gaml.architecture.reflex.ReflexStatement.privateExecuteIn(ReflexStatement.java:57) msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:42) msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:43) msi.gaml.architecture.reflex.ReflexArchitecture.executeReflexes(ReflexArchitecture.java:74) msi.gaml.architecture.reflex.ReflexArchitecture.executeOn(ReflexArchitecture.java:65) msi.gama.runtime.AbstractScope.execute(AbstractScope.java:515) msi.gama.metamodel.agent.MinimalAgent.step(MinimalAgent.java:251) msi.gama.metamodel.agent.MinimalAgent.step(MinimalAgent.java:222) msi.gama.runtime.AbstractScope.step(AbstractScope.java:596) msi.gama.metamodel.population.GamaPopulation.step(GamaPopulation.java:176) msi.gama.runtime.AbstractScope.step(AbstractScope.java:596) msi.gama.metamodel.agent.GamlAgent.stepSubPopulations(GamlAgent.java:72) msi.gama.metamodel.agent.MinimalAgent.step(MinimalAgent.java:253) msi.gama.kernel.simulation.SimulationAgent.step(SimulationAgent.java:205) msi.gama.metamodel.agent.MinimalAgent.step(MinimalAgent.java:222) msi.gama.kernel.simulation.SimulationPopulation$1.call(SimulationPopulation.java:142) java.util.concurrent.FutureTask.run(Unknown Source) java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.lang.Thread.run(Unknown Source) in agents people0, Simulation 1

ptaillandier commented 8 years ago

Note that I have fixed this error... however, there are still problems with AStar (sometimes the agents do not find a path whereas there is at least one) and Bellmann (sometimes the agent flies)