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

Add Mesa example #335

Merged
merged 5 commits into from Dec 16, 2023
Merged

Add Mesa example #335

merged 5 commits into from Dec 16, 2023

Conversation

steipatr
Copy link
Contributor

Adds a simple example for controlling Mesa models with the Workbench, using the Virus on a Network model. The integration was originally developed by myself and @mikhailsirenko for the Social Simulation Festival 2021. If accepted, this closes #102 .

steipatr and others added 2 commits December 14, 2023 16:05
Adds a simple example for controlling Mesa models with the Workbench, using the Virus on a Network model.
@coveralls
Copy link

coveralls commented Dec 14, 2023

Coverage Status

coverage: 80.335%. remained the same
when pulling 36e4f08 on steipatr:patch-1
into f3c9674 on quaquel:master.

Copy link
Owner

@quaquel quaquel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this! just a few minor tweaks and it is ready to merge

ema_workbench/examples/example_mesa.py Show resolved Hide resolved

# Define model outcomes
model.outcomes = [
TimeSeriesOutcome("TIME"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you include time here?

and since you use a replicator model, these should all be replaced with ArrayOutcomes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a dim recollection of some EMA plotting functions breaking (or giving a warning?) if there is no TIME dimension, so this was probably included to preclude that.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With ArrayOutcomes these will break anyway. Also, the time problem is now fixed and only will give a warning.

@EwoutH
Copy link
Collaborator

EwoutH commented Dec 14, 2023

Looks great, thanks a lot!

To fully close #102 I think we should also add a simple model to the basic tutorial (here on GitHub). Then from there we can link to this as a more extensive example. But that can be done in a separate PR.

Copy link
Collaborator

@EwoutH EwoutH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runs and reasonably well documented, so aside the comments from Jan, LGTM!

Thanks!

@quaquel quaquel merged commit 5409942 into quaquel:master Dec 16, 2023
12 checks passed
@EwoutH EwoutH added the docs label Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MESA example
4 participants