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

Cash balance #3

Open
ysaikai opened this issue Apr 10, 2016 · 6 comments
Open

Cash balance #3

ysaikai opened this issue Apr 10, 2016 · 6 comments

Comments

@ysaikai
Copy link
Owner

ysaikai commented Apr 10, 2016

For some reason, the update of cash balance (L.369 main.py) fails erratically. It seems to me literally erratic. When it happens, I terminate the process in the console and re-run it (i.e. main.py, schedule.py, and reload http:localhost:8888). This does not necessarily fix it, but sometimes do. I have no idea what is going on...

@elansegarra
Copy link
Collaborator

It seems like mesa (or perhaps the visualizer) is getting ahead of itself or is not completely flushing old data. This abnormality could be related to why hitting the reset button does not completely update everything.

@ysaikai
Copy link
Owner Author

ysaikai commented Apr 11, 2016

It seems the 'reset flow' (from Javascript to def reset_model() in ModularVisualization.py) tries to do what it is supposed to. I do not think Mesa itself stores any data beyond the temporary process. My guess is the culprit is what Mesa import, esp. tornado. We may ask the developers.

@ysaikai
Copy link
Owner Author

ysaikai commented Apr 13, 2016

Does giving -B option (e.g. python -B ./server.py) works? In my environment, it is not perfect but appears to do. But, we still have the 'reset issue'; i.e. when keep resetting, it gradually reduces the number of survivors. See the log file.

@ysaikai
Copy link
Owner Author

ysaikai commented Apr 13, 2016

The cause of dwindling survivors seems to be a failure of initializing the prices. L.70 main.py, we set them equal to 2, but as we keep resetting, it seems Step1 prices start with something increasingly smaller than 2. hmm...

@elansegarra
Copy link
Collaborator

Looking through the log you sent, it appears that when the model is reset,
suppliers that had died in the previous world start with prices equal to
the price they had in the period when they died in the previous
incarnation. This would lead toward smaller and smaller initial prices and
thus smaller and smaller prices over time (especially since they have no
opportunity to ever raise them). Given that you set prices based off of the
initialized model price vector (in L. 152) I don't know why this would be
happening...

On Tue, Apr 12, 2016 at 11:33 PM, Yuji Saikai [email protected]
wrote:

The cause of dwindling survivors seems to be a failure of initializing the
prices. L.70 main.py, we set them equal to 2, but as we keep resetting, it
seems Step1 prices start with something increasingly smaller than 2. hmm...


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#3 (comment)

@ysaikai
Copy link
Owner Author

ysaikai commented Apr 24, 2016

I have got, thus far, the best statistic. When the anomaly happens, close and relaunch the shell. This fixes it so far 100%. It seems like due to the Python interpreter. We are closing in.

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