CityScope / CityMatrix_Sim_AI

Agent-Based Model of the CityMatrix
11 stars 3 forks source link

GAMA Traffic Batch Simulation Issues #29

Closed kalyons11 closed 7 years ago

kalyons11 commented 7 years ago

Creating a new issue for this bug thread, which began in commit ce42bd7.


@popabczhang

  1. I am struggling to fix that bug you mentioned in the batch simulation. Gama does not have great documentation when it comes to catching errors in their simulation script. Perhaps you could loop in @agrignard for me? Also, do you have a more specific stack trace or the file that crashed it?

    I also created a post on the GAMA forum to try and get some support.

  2. We also have the issue with the traffic pattern only being in one direction.

    First, I tried changing the search algorithm the PEV's use in the grid. The four available search algorithms in the current GAMA build are given by: ["A*", "Dijkstra", "JPS", "BF"].

    Here are my results.

    image

    image

    image

    image

    So, clearly this is not the issue.

    It may be an issue with the neighborhood parameter on the grid object and how I assign the traffic values during the simulation. This is where I am looking next...

Do you have any additional thoughts?

Thanks,

Kevin

popabczhang commented 7 years ago

Due to the limited time we have now, let's focus on the second issue for now. I will try to loop in Arnaud tomorrow! Thanks.

agrignard commented 7 years ago

Hi Guys,

Let me know if you need any GAMA helps. I know Ryan is very busy for his thesis that's why I don't interfere that much to avoid noise but we can meet if needed

Arnaud

On 11 July 2017 at 23:59, popabczhang notifications@github.com wrote:

Due to the limited time we have now, let's focus on the second issue for now. I will try to loop in Arnaud tomorrow! Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mitmedialab/CityMatrixSim/issues/29#issuecomment-314638016, or mute the thread https://github.com/notifications/unsubscribe-auth/ADvxtkPPR1IT6SnhxlpUp4XmFRTCosp8ks5sNESWgaJpZM4OVGGF .

agrignard commented 7 years ago

@popabczhang I am not sure I saw the forum issue on GAMA, where did you post it? Did you use the issue tracker here ?

https://github.com/gama-platform/gama/issues

kalyons11 commented 7 years ago

@agrignard I tried to post on the Forum twice last night but I'm not sure if it went through...

Anyway, do you know GAMA has a native try / except functionality to keep the simulation from crashing when an error is encountered? You can see the error that we are getting here.

popabczhang commented 7 years ago

@agrignard Thanks for being considerate on the "non-interfere". While now we do need some help on GAMA from you! The first priority now is figuring out why the simulation result is very much "one directional". @kalyons11 @agrignard , shall we have a meeting tomorrow? Kavin is working, so maybe an in-person meeting in the late afternoon or Skype meeting at noon or night? Thank you!

popabczhang commented 7 years ago

I'm moving the relevant information from comments to here:

" Here are three simulated results. All X direction roads have much more traffic than Y direction ones. image image image "

agrignard commented 7 years ago

@Kevisn did you try with other shortest path algorithm?

Also do you think you can retest it with the very last version of GAMA (I know that some optimization have been made this mont on the shortes path algo. Also it's possible to choose which one si it might solve the problem (by default it's A* but we could try with Dijkstra

On 12 July 2017 at 16:29, popabczhang notifications@github.com wrote:

I'm moving the relevant information from comments to here:

" Here are three simulated results. All X direction roads have much more traffic than Y direction ones. [image: image] https://user-images.githubusercontent.com/2801912/28068639-65712d5c-6614-11e7-8e02-8d7e2255bf44.png [image: image] https://user-images.githubusercontent.com/2801912/28068746-d94fc24c-6614-11e7-81bf-2b352172884c.png [image: image] https://user-images.githubusercontent.com/2801912/28068771-edec75ba-6614-11e7-9856-46d15fe652b7.png "

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mitmedialab/CityMatrixSim/issues/29#issuecomment-314887455, or mute the thread https://github.com/notifications/unsubscribe-auth/ADvxtktfzvd3LPywBwJU35NffyUyNI8Lks5sNSy7gaJpZM4OVGGF .

kalyons11 commented 7 years ago

@agrignard Yes, and it was the same issue for all 4 algorithms. See my first comment on this issue above.

I also updated the GAMA version to the latest release by clicking the "Get Updates" in the application itself. Still, it did not help.

Perhaps it is an issue with the neighborhood of the grid, which we had discussed a while back, or my code to update the traffic values on the matrix?

agrignard commented 7 years ago

This is strange i gave the model to a coleague and he doesn t have this strange resuls.

Can you detailed how to reproduce it?

Le jeu. 13 juil. 2017 à 07:18, Kevin Lyons notifications@github.com a écrit :

@agrignard https://github.com/agrignard Yes, and it was the same issue for all 4 algorithms. See my first comment on this issue above.

I also updated the GAMA version to the latest release by clicking the "Get Updates" in the application itself. Still, it did not help.

Perhaps it is an issue with the neighborhood of the grid, which we had discussed a while back, or my code to update the traffic values on the matrix?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mitmedialab/CityMatrixSim/issues/29#issuecomment-315049095, or mute the thread https://github.com/notifications/unsubscribe-auth/ADvxtjvLT6JBkiEltLiof9MhdHSB3buGks5sNfzxgaJpZM4OVGGF .

kalyons11 commented 7 years ago

@agrignard We just ran the CityGamatrix_PEV.gaml file with the Display experiment. This resulted in the odd output that Ryan indicated above.

agrignard commented 7 years ago

yep indeed... we are working on that with one of my fried /colleagues of the GAMA team but we didn't figure it out.

On 13 July 2017 at 12:49, Kevin Lyons notifications@github.com wrote:

@agrignard https://github.com/agrignard We just ran the CityGamatrix_PEV.gaml file with the Display experiment. This resulted in the odd output that Ryan indicated above.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mitmedialab/CityMatrixSim/issues/29#issuecomment-315136621, or mute the thread https://github.com/notifications/unsubscribe-auth/ADvxtqnuyrm4olFCODjP2eBq7khZFSlrks5sNkq0gaJpZM4OVGGF .

agrignard commented 7 years ago

the problem is that he is in vietnam so is now sleeping... so I don't think I have any new input before 4... maybe we cna postpose th emeeting if we have no solution? I think it's in the pipe on the GAMA side I hope it shoudl be fixed soon

On 13 July 2017 at 13:16, Arnaud Grignard agrignard@gmail.com wrote:

yep indeed... we are working on that with one of my fried /colleagues of the GAMA team but we didn't figure it out.

On 13 July 2017 at 12:49, Kevin Lyons notifications@github.com wrote:

@agrignard https://github.com/agrignard We just ran the CityGamatrix_PEV.gaml file with the Display experiment. This resulted in the odd output that Ryan indicated above.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mitmedialab/CityMatrixSim/issues/29#issuecomment-315136621, or mute the thread https://github.com/notifications/unsubscribe-auth/ADvxtqnuyrm4olFCODjP2eBq7khZFSlrks5sNkq0gaJpZM4OVGGF .

agrignard commented 7 years ago

actually I am not sure to really understand the problem it makes sense that at the end people are more using the road on the middle no?

On 13 July 2017 at 13:19, Arnaud Grignard agrignard@gmail.com wrote:

the problem is that he is in vietnam so is now sleeping... so I don't think I have any new input before 4... maybe we cna postpose th emeeting if we have no solution? I think it's in the pipe on the GAMA side I hope it shoudl be fixed soon

On 13 July 2017 at 13:16, Arnaud Grignard agrignard@gmail.com wrote:

yep indeed... we are working on that with one of my fried /colleagues of the GAMA team but we didn't figure it out.

On 13 July 2017 at 12:49, Kevin Lyons notifications@github.com wrote:

@agrignard https://github.com/agrignard We just ran the CityGamatrix_PEV.gaml file with the Display experiment. This resulted in the odd output that Ryan indicated above.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mitmedialab/CityMatrixSim/issues/29#issuecomment-315136621, or mute the thread https://github.com/notifications/unsubscribe-auth/ADvxtqnuyrm4olFCODjP2eBq7khZFSlrks5sNkq0gaJpZM4OVGGF .

popabczhang commented 7 years ago

Yes. The people at the end should use the road in the middle. So the roads in the middle shall have higher traffic volume. But the issue here is that only roads in x direction are getting volume, in contrast, roads in y direction are not getting volume, no matter the distribution of the population.

I suggest that we still have a quick meeting today at 4 pm to get on the same page for the issue? Thanks in advance!

kalyons11 commented 7 years ago

Yes, I will still be there!

kalyons11 commented 7 years ago

Fixed in fef8851. Closing!