Replies: 1 comment
-
@nik1393 I am sorry for the delay, for some reason I was not getting alerts to my email. The direct question is what file is
stored in? Is it at the bottom of the MoneyModel.py If so my assumption is that your files are stored in a subfolder and not |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone!
I am very new in Python, and maybe my question is caused by the fact that I just know some basics. However, I need to try Mesa to potentially use it in my research.
I was following the Introductory Tutorial, and reached this part: "If you’ve been working in an interactive session, you can create a model object directly. Otherwise, you need to open an interactive session in the same directory as your source code file, and import the classes. For example, if your code is in..." and the following exercise. I am not sure that I understand how to run the following lines suggested in this tutorial:
from MoneyModel import MoneyModel
empty_model = MoneyModel(10)
empty_model.step()
I write the script in Atom (code is written in accrodance with pp. 14 and 15 in Mesa Documentation), and then I try to run it in the Command Prompt. Before I installed pip, pipenv and mesa. I also run pipenv shell, so the virtual environment is created.
Then I try to run this script in Command Prompt:
(nikul-wdmqY-z5) C:\Users\nikul>python MoneyModel.py
But I get nothing after it.
Would you be so kind to explain me (I am a complete beginner, who only worked with Netlogo before) what should be written in my scrypt in Atom and what should I type in the Command Prompt to get the following result (p.15 in Mesa Documentation):
Hi, I am agent 2.
Hi, I am agent 9.
Hi, I am agent 5.
Hi, I am agent 3.
Hi, I am agent 7.
Hi, I am agent 0.
Hi, I am agent 4.
Hi, I am agent 6.
Hi, I am agent 8.
Hi, I am agent 1.
If there any useful videos with tutorials for Mesa, please let me know. It will be super useful for me!
Thank you in advance for help!
Beta Was this translation helpful? Give feedback.
All reactions