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

solara: Add virus_on_network network example #56

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

rht
Copy link
Contributor

@rht rht commented Aug 17, 2023

Waiting until projectmesa/mesa#1767 is merged and we have a release.

@rht rht force-pushed the network branch 2 times, most recently from 9592ab8 to 67bfde6 Compare August 21, 2023 13:09
@rht rht changed the title solara: Add virus_on_network network example [DONOTMERGE] solara: Add virus_on_network network example Sep 25, 2023
@rht
Copy link
Contributor Author

rht commented Sep 25, 2023

This is ready to merge.

Copy link
Contributor

@Corvince Corvince left a comment

Choose a reason for hiding this comment

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

You need to change from viz to model, otherwise just some minor suggestions.

examples/virus_on_network/app.py Outdated Show resolved Hide resolved

width = [] # edge width
edge_color = []
for u, v in graph.edges():
Copy link
Contributor

Choose a reason for hiding this comment

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

u, v, w and ec are quite not-descriptive. Maybe call it edge_width, edge_color here and above edge_colorss and edge_widths ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

edge_color in NetworkX is a list of edge colors. As much as this is confusing, I have to stay consistent with NetworkX. Ditto with the plural for edge_width.

u, v should be fine for undirected graph, just like i, j for 2D grid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

examples/virus_on_network/app.py Outdated Show resolved Hide resolved
@rht
Copy link
Contributor Author

rht commented Sep 26, 2023

You need to change from viz to model, otherwise just some minor suggestions.

Fixed.

@Corvince Corvince merged commit 59ab01f into projectmesa:main Sep 26, 2023
2 checks passed
@rht rht deleted the network branch September 26, 2023 09:23
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

Successfully merging this pull request may close these issues.

2 participants