[Simulation Engine] Add feed only simulation type - #3183
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 |
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.feed_only.feed_onlyrun: 445,000 kg DM stocked, 322,684 kg DM remaining (27.5% loss; alfalfa silage 51.6%, corn silage 30.8%, hay 17.7%, dry grain 1.0%).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. Measured feed module coverage in afeed_onlyrun is 67% (storage.py87%,silage.py87%,hay.py87%,feed_manager.py37%). Whether that is enough for "FeedManager only" is worth a look before merge.