jakobaxelsson / sossim

A system-of-systems (SoS) simulator
MIT License
0 stars 0 forks source link

Find better solution to handle Mesa dependency #8

Closed jakobaxelsson closed 10 months ago

jakobaxelsson commented 1 year ago

The simulator is using the Mesa agent-based simulation package. However, Mesa has some dependencies that are not compatible with running it in the browser. Those dependencies are only in parts that we will not be using anyway. For this reason, the few files that are needed from Mesa is currently copied into this repository. This has several problems:

jakobaxelsson commented 11 months ago

Another issue with Mesa is that it does not typecheck well. Partly, this is because some incompatible assumptions are hardcoded, such as that agent positions should always be int, whereas SoSSim assume them to be tuple[int, int].

jakobaxelsson commented 10 months ago

Mesa is apparently in active development, and is now at version 2.1.1, whereas the current version in SoSSim is 1.2.1. Significant changes include that tornado dependency is now moved to a separate package, that is included with mesa. However, there is now also a different visualization option, so probably tornado is on its way out.

jakobaxelsson commented 10 months ago

I workaround was suggested by the mesa maintainers, allowing mesa to be installed from PyPI using pyodide's micropip.install. This has been implemented, and the mesa copy has been removed. As a consequence, the mesa version is now also upgraded to the latest release.