RUFAS.EEE.tractor module#
- class RUFAS.EEE.tractor.Tractor(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)#
Bases:
objectA class to represent the specifications of a tractor. The tractor’s specifications are determined based on its size or the size of the herd it is intended to work with.
- __init__(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#
Initializes the Tractor object with the tractor size or calculates it based on the provided herd size. If tractor_size is not provided, the size is inferred using the herd_size argument.
Parameters#
- operation_eventFieldOperationEvent
The type of field operation for which the tractor is intended.
- crop_typestr | None, optional
The type of crop for which the tractor is intended.
- tractor_sizeTractorSize | None, optional
The size of the tractor as a TractorSize enum value.
- herd_sizeint | None, optional
The size of the herd to determine the tractor size if tractor_size is not provided.
- application_depthfloat | None, optional
The depth of the application (cm).
- tillage_implementTillageImplement | None, optional
The type of tillage implement used for the operation.
- harvest_typeHarvestOperation | None, optional
The type of harvest operation for the operation.
Raises#
- ValueError
If neither tractor_size nor herd_size is provided.
- herd_size_to_tractor_size(herd_size: int) TractorSize#
Assign a Tractor Size based on the number of cows Implements Helper Function 420 in EEE Functions file.
- determine_operation_type(application_depth: float | None = None) List[OperationType]#
Assigns a specific field operation based on the general name for the operation and the crop type for harvest operations or depth for nutrient application. Implements Helper Function 421 in EEE Functions file.
- _determine_fertilizer_application_operation_types(application_depth: float | None) list[OperationType]#
Determines the types of fertilizer application operations required based on the application depth.
Returns#
- list[OperationType]
A list of operation types required for the fertilizer application.
- _determine_manure_application_operation_types(application_depth: float | None) list[OperationType]#
Determines the types of manure application operations required based on the application depth.
Returns#
- list[OperationType]
A list of operation types required for the manure application.
- _determine_harvest_operation_types() list[OperationType]#
Determines the types of harvest operations required based on the crop type.
Returns#
- list[OperationType]
A list of operation types required for harvesting the crop.
- property PTO_kW: float#
Constants 589, 592, 595 in EEE Functions file
- property power_available_kW: float#
Constants 590, 593, 596 in EEE Functions file, calculated based on PTO
- property mass_kg: float#
Constants 591, 594, 597 in EEE Functions file
- property speed_km_hr: float#
Constant 598 in EEE Functions file
- calculate_axel_power(implement: TractorImplement) float#
Calculates total Axle Power (kW) required by tractor wheels to move the tractor (and implement if applicable). Implements Helper Function 413 in EEE Functions file.