CityScope / CityMatrix_Sim_AI

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

simualtion crashes after 1 day #9

Closed agrignard closed 7 years ago

agrignard commented 7 years ago

After 1 day (8000ish iteration) there is an error thrown in the default model.

kalyons11 commented 7 years ago

Did you record or take a screenshot of this error? And this is in CityGamatrix_PEV?

popabczhang commented 7 years ago

Memory leak?

-- YAN ZHANG "RYAN"

MASTER'S DEGREE CANDIDATE, ASSISTANT RESEARCHER MEDIA ARTS & SCIENCES, MEDIA LAB MASSACHUSETTS INSTITUTE OF TECHNOLOGY

M.S. ADVANCED ARCHITECTURE DESIGN COLUMBIA UNIVERSITY IN THE CITY OF NEW YORK

20 AMES STREET, BUILDING E15-368 CAMBRIDGE, MA 02142

1(917)767-3589 POPABCZHANG@GMAIL.COM

On Fri, Apr 7, 2017 at 2:30 PM, Kevin Lyons notifications@github.com wrote:

Did you record or take a screenshot of this error? And this is in CityGamatrix_PEV?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mitmedialab/CityMatrixSim/issues/9#issuecomment-292616067, or mute the thread https://github.com/notifications/unsubscribe-auth/ACrA-CMFBY9DKTTBw6C20nYsS-XACKeRks5rtoC9gaJpZM4MzWeB .

kalyons11 commented 7 years ago

Perhaps... let me run the simulation on my machine again and take a look.

kalyons11 commented 7 years ago

I just ran it for a day on my end and everything ran smoothly. @agrignard could you try to replicate this and send the crash error?

kalyons11 commented 7 years ago

@agrignard - were you ever able to replicate this issue? If not, can we close this on GitHub? Thanks!

agrignard commented 7 years ago

yes the problem is still here. it crashes after 8658 cycles which is one day. I have the current version of the CityGamatrix.

@kalyons11 Does it work on your computer ?

screen shot 2017-04-17 at 17 41 42
agrignard commented 7 years ago

1 occurence in Simulation 0 at cycle 8641: Java error: I/O error in save copy ; IOException: No such file or directory java.io.UnixFileSystem.createFileExclusively(Native Method) java.io.File.createNewFile(File.java:1012) msi.gama.util.file.GamaJsonFile.flushBuffer(GamaJsonFile.java:126) msi.gama.util.file.GamaFile.save(GamaFile.java:475) msi.gaml.statements.SaveStatement.privateExecuteIn(SaveStatement.java:257) msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:42) msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:43) in save copy ; in agent Simulation 0

kalyons11 commented 7 years ago

Aha, this might be an error when it tries to output the JSON for that simulation day. If you look at the output_dir variable at the top of CityGamatrix_PEV.gaml, make sure that this relative path is one that actually exists on your machine. You may have to create an output folder if not. Otherwise, you will get this Java I/O error.

Let me know if that helps!

agrignard commented 7 years ago

yep but by default any model on the github should work by themselves... so I just added a general_output folder in the github so the model can run

So now the simualtion stop (but not crashes) is it normal? Would it be possible to have a mode where the simualtion is always running?

kalyons11 commented 7 years ago

Yes, we already have this feature in place. If you set the "Continuous Demo" parameter to be true (or the looping boolean in CityGamatrix.gaml), the simulation will continue to run indefinitely.

agrignard commented 7 years ago

ok perfect. So I close this issue