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

Density visualisation fails for BasicExample #9

Open
jugdemon opened this issue Dec 6, 2017 · 6 comments
Open

Density visualisation fails for BasicExample #9

jugdemon opened this issue Dec 6, 2017 · 6 comments

Comments

@jugdemon
Copy link
Collaborator

jugdemon commented Dec 6, 2017

The visualisation was never fast, but when I just merged in the Master branch it came to a halt. To make sure it was not my fault, I opened the BasicExample and it freezes the visualisation as well.

@PeterMKielar
Copy link
Collaborator

PeterMKielar commented Dec 6, 2017

Well, I made an update to the visualization reduce some loading race-condition and it works for me.

grafik

A freeze indicates that the background thread that loads the data somehow does not provide the data and the main thread believes that it is not ready, you may check if it stops in
CoreController function waitUntilReadersReady line 227 thread.sleep.
If it does, can you send the layout, cvs and index file?

Edit:
Also, make sure that your code was compiled with the new version. Sometimes, eclipse misses to exchange the files (f5, auto-build).

Edit1:
Your bug may happen if you use ctrl+u (clean current visualization). It looks like we do not clean up the data correctly in the sequence load, unload and load.

@jugdemon
Copy link
Collaborator Author

jugdemon commented Dec 7, 2017

I run the basic example from StartHere (the same that you show), but with the updated Master branch now it fails even at simulation with the following exception:

Thread failed due to:
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.utility.lattice.CellGrid.getCell(CellGrid.java:96)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.utility.lattice.Lattice.getCellNumberValue(Lattice.java:595)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.utility.lattice.Lattice.breshamLineCast(Lattice.java:1508)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.model.perceptional.bresenhamPerceptionModel.BresenhamPerceptionModel.isVisible(BresenhamPerceptionModel.java:198)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.model.perceptional.bresenhamPerceptionModel.BresenhamPerceptionModel.isVisible(BresenhamPerceptionModel.java:182)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.model.perceptional.bresenhamPerceptionModel.BresenhamPerceptionModel.isVisible(BresenhamPerceptionModel.java:170)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.model.tactical.routing.RoutingModel.findNavigationStartPoint(RoutingModel.java:246)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.model.tactical.routing.dijkstraModel.DijkstraTactical.callPedestrianBehavior(DijkstraTactical.java:83)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.model.tactical.TacticalModel.callTacticRouteBehavior(TacticalModel.java:445)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.model.tactical.TacticalModel.callPedestrianBehavior(TacticalModel.java:342)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.model.PedestrianBehaviorModel.execute(PedestrianBehaviorModel.java:154)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.model.PedestrianBehaviorModel.execute(PedestrianBehaviorModel.java:1)
2017-12-07 10:01:33 INFO - tum.cms.sim.momentum.infrastructure.execute.threading.TaskRunnable.run(TaskRunnable.java:71)
2017-12-07 10:01:33 INFO - java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2017-12-07 10:01:33 INFO - java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2017-12-07 10:01:33 INFO - java.lang.Thread.run(Thread.java:748)

I did a refresh and clean on the momentum projects to no avail.

@PeterMKielar
Copy link
Collaborator

Ups, I got x and y wrong. I pushed the fix.

@jugdemon
Copy link
Collaborator Author

jugdemon commented Dec 7, 2017

@PeterMKielar: This works much better. But there seems to be an issue with the density. I just loaded the pedestrians and it runs smoothly, more so than before, but in contrast to be fore the density still does not work at all. It is just completely stuck. Since this is the tutorial file, you can try to test this for yourself. For now I will work without density, but it would be nice to see it as well.

@PeterMKielar
Copy link
Collaborator

Thank you @jugdemon, I missed to check if the timestep of the input data (density) matches the pedestrian time step data. In case it does not match, the main thread can ignore it.
The quick-fix works with the example data.
grafik

@jugdemon
Copy link
Collaborator Author

jugdemon commented Dec 7, 2017

This looks good, but I could not get it to work. It still freezes and does not start for density. For now, I will do things without density.

@PeterMKielar PeterMKielar changed the title Updated to Master and visualisation fails for BasicExample Density visualisation fails for BasicExample Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants