[Simulation Engine] Add feed only simulation type - #3183
matthew7838 wants to merge 48 commits into
Conversation
Adds a `feed_only` SimulationType that runs the Feed Storage module without the crop and soil, animal, or manure modules. Feed storages are given their starting contents through a new optional initial feed storage contents input, since there is no crop and soil module to harvest anything into them. Contents are stocked through `Storage.receive_crop`, so capacity checks and arrival losses apply. Extracts `_execute_feed_storage_upkeep` from `_execute_feed_planning` so storage reporting and degradations can run on days that feed planning does not. Call order is unchanged for existing simulation types.
97575fc to
2ee5011
Compare
2ee5011 to
350c9b5
Compare
|
Current Coverage: % Mypy errors on feed-only-simulation-2988 branch: 1139 |
|
🚨 Some tests have failed. |
|
Current Coverage: 99% Mypy errors on feed-only-simulation-2988 branch: 1139 |
dcc4040 to
77806d6
Compare
|
Current Coverage: 99% Mypy errors on feed-only-simulation-2988 branch: 1139 |
|
Current Coverage: 99% Mypy errors on feed-only-simulation-2988 branch: 1138 |
|
Current Coverage: 99% Mypy errors on feed-only-simulation-2988 branch: 1138 |
|
Current Coverage: 99% Mypy errors on feed-only-simulation-2988 branch: 1137 |
|
Current Coverage: 99% Mypy errors on feed-only-simulation-2988 branch: 1133 |
|
Current Coverage: 99% Mypy errors on feed-only-simulation-2988 branch: 1164 |
|
Current Coverage: 99% Mypy errors on feed-only-simulation-2988 branch: 1164 |
|
Current Coverage: 99% Mypy errors on feed-only-simulation-2988 branch: 1164 |
Resolves conflicts with the manure only simulation, which added a SimulationType alongside this branch's. Both simulation types are kept: the enum members, the daily simulation function map, the daily routines, the simulation_type pattern, the example task entries, and the tests all carry manure_only and feed_only.
|
Current Coverage: 99% Mypy errors on feed-only-simulation-2988 branch: 1164 |
|
Current Coverage: 99% Mypy errors on feed-only-simulation-2988 branch: 1164 |
Adds a
feed_onlysimulation type so the Feed Storage module can run on its own.Context
Issue(s) closed by this pull request: closes #2988
What
SimulationType.FEED_ONLY("feed_only") and its daily routine.Storage.stock_initial_contents()andFeedManager.stock_initial_storage_contents().SimulationEngine._execute_feed_storage_upkeep()out of_execute_feed_planning().feed_onlyexample scenario, registered inavailable_simulation_tasks.json.Why
How
Storage.receive_crop, so capacity checks and grain / high moisture arrival losses still apply.ideal_feeds_to_purchaseis always empty, so the purchasing path is a no-op.Test plan
Storage.stock_initial_contents,FeedManager.stock_initial_storage_contents,_gather_initial_feed_storage_contents, and the feed only daily routine.Input Changes
input/data/feed_management/example_feed_only_initial_contents.json.input/data/config/example_feed_only_config.json,input/metadata/example_feed_only_metadata.json,input/data/tasks/example_feed_only_task.json.initial_feed_storage_contents_propertiesandfeed_onlyto thesimulation_typepattern indefault.json.feed_onlyentry toavailable_simulation_tasks.json.Output Changes
feed_onlyscenario reports existing feed storage variables only.Filter
Notes for reviewers
FeedManager's feeding, purchasing, and inventory projection paths are never reached.