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

Circular issue between vegetation model and cache generation #24

Open
github-actions bot opened this issue Jan 14, 2025 · 0 comments
Open

Circular issue between vegetation model and cache generation #24

github-actions bot opened this issue Jan 14, 2025 · 0 comments

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Jan 14, 2025

manually trigger `_on_start` for now to ensure init is the same as before,

but we ideally want this to not kick when the solara viz is created. I suppose

maybe we need an `_on_viz` hook or something?

# TODO: Circular issue between vegetation model and cache generation
# Issue URL: https://github.com/SchmidtDSE/mesa_abm_poc/issues/24
# manually trigger `_on_start` for now to ensure init is the same as before,
# but we ideally want this to not kick when the solara viz is created. I suppose
# maybe we need an `_on_viz` hook or something?

        return portrayal


# TODO: Circular issue between vegetation model and cache generation
# Issue URL: https://github.com/SchmidtDSE/mesa_abm_poc/issues/24
# manually trigger `_on_start` for now to ensure init is the same as before,
# but we ideally want this to not kick when the solara viz is created. I suppose
# maybe we need an `_on_viz` hook or something?
vegetation_model = Vegetation(bounds=TST_JOTR_BOUNDS)
cache_manager = CacheManager(bounds=TST_JOTR_BOUNDS, epsg=4326, model=vegetation_model)

<<<<<<< HEAD
tree_management = GeomanDrawControl(
    drag=False, cut=False, rotate=False, polyline={}, circlemarker={}
)
tree_management.on_draw(model.add_agents_from_management_draw)
=======
cache_manager.populate_elevation_cache_if_not_exists()
vegetation_model._on_start()

tree_management = GeomanDrawControl(drag=False, cut=False, rotate=False, polyline={})
tree_management.on_draw(vegetation_model.add_agents_from_management_draw)
>>>>>>> dev

## TODO: Solara only works after first auto-reload
#Issue URL: https://github.com/SchmidtDSE/mesa_abm_poc/issues/21

page = SolaraViz(
    vegetation_model,
    name="Veg Model",
    components=[
<<<<<<< HEAD
        make_geospace_component(cell_portrayal, zoom=14, controls=[tree_management]),
=======
        make_simple_raster_geospace_component(
            cell_portrayal, zoom=14, controls=[tree_management]
        ),
>>>>>>> dev
        make_plot_component(
            [
                "Mean Age",
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

No branches or pull requests

0 participants