Skip to content

How to import external data and define as model attributes at each step? #201

@qiuriyi

Description

@qiuriyi

Thanks for developing this great ABM framework in Python. I am trying to transfer my model from NetLogo to Mesa. It is a model that simulates trading in stock market. I have historical stock prices and other information as input (model level attributes), and based on the information, calculate some derived model level attributes. Each step after the model level attributes are imported and calculated, then each agent start trading according to the model level attributes and its own preference.

To start with, I only tried to import model level information and computed one of the derived attributes. I used data collector and chart visualization to check if my codes worked. However, it seemed that I did not import the data successfully. So my question for now is that how to import external data and define as model attributes? I also upload my code here. Thanks.
bac_model1.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions