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

Model Following Paths is broken when shape files not kept in memory #309

Open
AlexisDrogoul opened this issue Sep 2, 2024 · 5 comments
Open
Assignees
Labels
About Driving Skill About Models Library This issue or request concerns the models shipped with GAMA 😱 Bug The issue reveals a bug in GAMA Priority High

Comments

@AlexisDrogoul
Copy link
Member

Describe the bug
Independently from #259 , whenever I try to run Following Paths, I get the following error:

2 occurrences in 2 agents at cycle 0: vehicle_following_path0 occupies 1 lanes, and it is unable to enter road163 where there are only 0 lane(s) available
in Simulation 0
in agents vehicle_following_path0, Simulation 0
in do drive ;
in reflex commute when: current_path != nil  {
	do drive ;
}

To Reproduce
Steps to reproduce the behavior:

  1. Run the model from the library

Expected behavior
No error.

Screenshots

Driving Ski… 2024-09-02 20-18-31

** gama.info **
GAMA VERSION: 0.0.0 commit Not available (Git version)
COMPUTER: Mac OS X 14.6.1 on aarch64 (16 cores, 128 GB)
VIRTUAL MACHINE: OpenJDK 64-Bit Server VM Eclipse Adoptium version 21.0.3+9-LTS
AVAILABLE MEMORY: 3.5 GB / 4 GB
GRAPHICS CARD: Apple M3 Max by Apple (GL version: 2.1 Metal - 88.1)
MONITOR #0: 2056x1329 zoom 200% (primary)
MONITOR #1: 3440x1440 zoom 100%

@AlexisDrogoul AlexisDrogoul added 😱 Bug The issue reveals a bug in GAMA About Models Library This issue or request concerns the models shipped with GAMA Priority High About Driving Skill labels Sep 2, 2024
@ptaillandier
Copy link
Contributor

I was not able to reproduce this bug (GAMA git 2024 up to date, new workspace, default preferences). Did you modify something in your preference?

@AlexisDrogoul
Copy link
Member Author

Indeed -- reverting my preferences to their defaults solved the issue. However, I do not know which preference may have caused that 🤔 ?

@AlexisDrogoul
Copy link
Member Author

OK. I found the guilty one (but still have to understand why):

Monosnap 2024-09-03 13-06-19

When it is false, I obtain the error. If I set it to true the error vanishes. Do you have the same problem ?

@AlexisDrogoul AlexisDrogoul changed the title Model Following Paths is broken Model Following Paths is broken when shape files not kept in memory Sep 3, 2024
@AlexisDrogoul
Copy link
Member Author

Doing further investigations, I discovered that the issue is with the attribute memoryMapped of ShapefileDataStore. When it is set to false (through the preference or directly in the code of GamaShapeFile), the model stops working. When set to true it works again.
@lesquoyb @RoiArthurB do you observe the same behavior on Windows and Linux ? Because the only information I could find is that it is better to turn it off on Windows ... (see https://gis.stackexchange.com/questions/245536/why-is-the-use-of-memory-mapped-buffers-in-shapefile-data-stores-not-recommended).

@AlexisDrogoul
Copy link
Member Author

I reactivate this one as it is simply a matter of checking if the same behavior occurs on Windows and Linux ( @lesquoyb & @RoiArthurB ) -- if yes, then we will not play with this variable and leave it true all time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
About Driving Skill About Models Library This issue or request concerns the models shipped with GAMA 😱 Bug The issue reveals a bug in GAMA Priority High
Projects
None yet
Development

No branches or pull requests

4 participants