Skip to content

Add Mesa example#335

Merged
quaquel merged 5 commits intoquaquel:masterfrom
steipatr:patch-1
Dec 16, 2023
Merged

Add Mesa example#335
quaquel merged 5 commits intoquaquel:masterfrom
steipatr:patch-1

Conversation

@steipatr
Copy link
Copy Markdown
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 .

Patrick Steinmann 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
Copy Markdown

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
Copy Markdown
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


# Define model outcomes
model.outcomes = [
TimeSeriesOutcome("TIME"),
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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