Skip to content

[EEE][Tractor][No Animals] Enable Running a No Animals Simulation that still allows Tillage #3093

@ew3361zh

Description

@ew3361zh

If you run a simulation with no animals, you should still be able to initialize a Tractor to do tillage.

There are a few aspects to this issue:

  1. To initialize a Tractor, you need EITHER herd_size OR tractor_size.
    In the Tractor class, the first step in the init method is:
if not tractor_size and not herd_size:
    raise ValueError("At least one of `tractor_size` or `herd_size` must be given.")

In the init, both herd_size and tractor_size are optional parameters:

class Tractor:
...
def __init__(
        self,
        operation_event: FieldOperationEvent,
        crop_type: str | None = None,
        tractor_size: TractorSize | None = None,
        herd_size: int | None = None,
        application_depth: float | None = None,
        tillage_implement: TillageImplement | None = None,
        harvest_type: HarvestOperation | None = None,
    ) -> None:
  1. We don't have a current way to NOT have animal herd_num (aka herd_size) in the IM pool.
    There is a default of 100 for herd_num and a minimum of 6. This means if you set it to 0 or leave it out altogether, it will be 100. The problem is that this could lead to silent emissions/energy use outside of tillage/tractor calculations that someone running a simulation without animals would not be expecting and could have misleading results/outputs.

Ideally if there aren't animals in the simulation, we should be checking to make sure there is a tractor_size in the inputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EEEInvolves Economics, Enery, and/or Emissionsdev-teamThings that dev team is working on

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions