CityScope / CityMatrix_Sim_AI

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

Strange behavior with particular configuration #1

Closed agrignard closed 7 years ago

agrignard commented 7 years ago

When modifying the grid physically and putting a building at an intersection there is a problem in the model all The PEV get stucked at some point.

They should be "smart" enough to recompute their path and find another one.

kalyons11 commented 7 years ago

I see. So you are directly editing the grid and placing a building at an intersection.

Do all of the PEV's get stuck, or just some of them?

agrignard commented 7 years ago

I have to double check they seems quiet stuck all of them

agrignard commented 7 years ago

Actually it might be link to issue #2 it seems ok now.

However with surround set to false it should work also no?

kalyons11 commented 7 years ago

Yes, it should work without the surrounding road too. We can take a look tomorrow to see where it went wrong.

popabczhang commented 7 years ago

Is the problem happening in "Dynamic Grid Editing" mode or even in static mode?

agrignard commented 7 years ago

dynamic one

kalyons11 commented 7 years ago

I just ran the online grid on my machine. This is what I am seeing.

image

As you can see, we have a road segment that is not accessible by any other segment. Thus, when a PEV sets its target to enter the segment, it is unable to proceed and stops.

My latest commit adds a check to see if this occurs. If we have a null path to a target, I simply stop the simulation and return it as a "bad configuration."

Is this the behavior we want?

agrignard commented 7 years ago

yes i think its a good behavior. I agree this is not a "valid" city configuration but a user might design this