Skip to content

[SimulationEngine] Disentangle module data sharing in SimulationEngine#2939

Draft
ew3361zh wants to merge 18 commits intodevfrom
sim-eng-data-disentanglement
Draft

[SimulationEngine] Disentangle module data sharing in SimulationEngine#2939
ew3361zh wants to merge 18 commits intodevfrom
sim-eng-data-disentanglement

Conversation

@ew3361zh
Copy link
Copy Markdown
Collaborator

@ew3361zh ew3361zh commented Apr 8, 2026

Context

Issue(s) closed by this pull request: closes #2855 closes #2858

What

  • Moves/creates key feed/ration data structures to allow for disentanglement of Feed and Animal modules
  • Creates SimulationType properties to group simulation types by which modules are needed
  • Refactors SimulationEngine.initialize_simulation() to only initialize necessary modules based on these SimulationType property groupings
  • Disentangles ration formulation from feed degradation processing
  • Only runs end-of-simulation reporting for specific modules if they were a part of the simulation.

TODOs remaining:

  • Update E2E results - e.g. we should be expecting no results for animal module (and eventually Manure module) when FIELDS_AND_FEEDS simulation type runs
  • Move/amend assembling crops_to_get_next_harvest_dates (needs FeedManager) in SimulationEngine._build_harvest_schedule() (a FieldManager operation)
  • Figure out how to generate manure application results when there is no manure module initialized
  • Move/amend storing harvested crops to FeedManager in SimulationEngine._execute_daily_field_operations() (a FieldManager operation)
  • Reinstate check on whether to initialize the manure module in SimulationEngine._initialize_simulation()

Why

This is a key set of steps necessary to be able to isolate each RuFaS biophysical module and allow them all to run individually.

How

See What section and Files changed tab for now.

Test plan

So far have just run example_freestall and example_field_and_feed tasks on this branch but both seem successful.

Input Changes

Output Changes

  • N/A

Filter

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Current Coverage: %

Mypy errors on sim-eng-data-disentanglement branch: 1274
Mypy errors on dev branch: 1191
83 more errors on sim-eng-data-disentanglement branch

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

🚨 Please update the changelog. This PR cannot be merged until changelog.md is updated.
🚨 Flake8 linting errors were found. Please fix the linting issues.
🚨 Some tests have failed.

@github-actions
Copy link
Copy Markdown
Contributor

Current Coverage: %

Mypy errors on sim-eng-data-disentanglement branch: 1218
Mypy errors on dev branch: 1191
27 more errors on sim-eng-data-disentanglement branch

@github-actions
Copy link
Copy Markdown
Contributor

🚨 Please update the changelog. This PR cannot be merged until changelog.md is updated.
🚨 Flake8 linting errors were found. Please fix the linting issues.
🚨 Some tests have failed.

@github-actions
Copy link
Copy Markdown
Contributor

Current Coverage: %

Mypy errors on sim-eng-data-disentanglement branch: 1218
Mypy errors on dev branch: 1191
27 more errors on sim-eng-data-disentanglement branch

@github-actions
Copy link
Copy Markdown
Contributor

🚨 Please update the changelog. This PR cannot be merged until changelog.md is updated.
🚨 Flake8 linting errors were found. Please fix the linting issues.
🚨 Some tests have failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant