[Crop and Soil] Enable crop and soil only simulation run#2932
[Crop and Soil] Enable crop and soil only simulation run#2932matthew7838 wants to merge 34 commits intodevfrom
Conversation
|
Current Coverage: 99% Mypy errors on separate-feed-run branch: 1198 |
|
🚨 Please update the changelog. This PR cannot be merged until |
…-feed-run # Conflicts: # RUFAS/simulation_engine.py
|
Current Coverage: 99% Mypy errors on separate-feed-run branch: 1198 |
|
🚨 Please update the changelog. This PR cannot be merged until |
…-feed-run # Conflicts: # RUFAS/simulation_engine.py
|
Current Coverage: % Mypy errors on separate-feed-run branch: 1198 |
|
🚨 Please update the changelog. This PR cannot be merged until |
|
Current Coverage: 99% Mypy errors on separate-feed-run branch: 1198 |
morrowcj
left a comment
There was a problem hiding this comment.
This looks correct to me. Well done.
I ran the model with both "example_field_only_tasks.json" and "example_field_with_storage_task.json". Those and pytest ran with no issues.
| "random_seed": 42, | ||
| "set_seed": true, | ||
| "simulation_type": "field_only", | ||
| "nutrient_standard": "NASEM", |
There was a problem hiding this comment.
As we discussed, nutrient_standard is one of the many parameters not strictly required by "field_only" (and possibly "field_and_storage"). I think this is covered by #2894, but wanted to mention it here to keep it on the radar.
|
Current Coverage: % Mypy errors on separate-feed-run branch: 1205 |
|
🚨 Flake8 linting errors were found. Please fix the linting issues. |
|
Current Coverage: 99% Mypy errors on separate-feed-run branch: 1191 |
1 similar comment
|
Current Coverage: 99% Mypy errors on separate-feed-run branch: 1191 |
|
Current Coverage: 99% Mypy errors on separate-feed-run branch: 1191 |
|
How are you handling manure applications on a farm without a manure module? |
|
|
||
| self._advance_time() | ||
|
|
||
| def _execute_field_with_storage_simulation(self) -> None: |
There was a problem hiding this comment.
How does this differ from the FIELD_AND_FEED simulation in scientific outcomes/intent?
There was a problem hiding this comment.
The intent was to have an option where ration formulation was not performed, requiring no animal or nutritiion inputs
| self._simulation_type_to_daily_simulation_function = { | ||
| SimulationType.FULL_FARM: self._execute_full_farm_daily_simulation, | ||
| SimulationType.FIELD_AND_FEED: self._execute_field_and_feed_daily_simulation, | ||
| simulation_type.FIELD_ONLY: self._execute_field_only_simulation, |
There was a problem hiding this comment.
I think for these simulations where we're isolating single parts of the model we want to be sure they can run without any other parts of the model being initialized.
FIELD_ONLY still depends on a Manure module. I know we'd talked about how to get manure applications out of the Manure module potentially - did you look into that at all?
I'm working on something that was initially separating out feed management from ration planning but has grown into initializing only modules that should be required for the simulation being run by the user. Maybe we can take a look at it and see how it can fit together with this.
Isolate the crop and soil module from the feed module simulation run.
Context
Issue(s) closed by this pull request: closes #2765
What
_execute_daily_field_only_operationsthat focuses solely on the operations of theFieldmodule, without any usage of theFeedmodule, including storage operations._execute_daily_field__operationsto_execute_daily_field_with_storage_operations. Works the same, but utilizes the extracted_execute_daily_field_only_operations._execute_field_only_simulation, which will not run any harvest storage operations._execute_field_with_storage_simulation, which will run theFieldmodule with storage operations, but will skip feed and ration planning.FIELD_ONLYandFIELD_WITH_STORAGE.Why
The Crop and Soil module should be isolable from the rest of RUFAS. This is necessary for evaluating and testing crop and soil features and would provide new simulation options for research and decision-making workflows.
How
This PR further subdivided the responsibility of each simulation type.
Test plan
Input Changes
Output Changes
Filter