Recommendations
Generate Recommendations
Generate intelligent tractor recommendations for a specific terrain and implement
POST
Overview
Generates smart tractor recommendations by analyzing terrain characteristics, implement requirements, and available tractors. The algorithm evaluates each tractor using a multi-criteria scoring system and returns the top 5 ranked recommendations.This endpoint validates that the terrain belongs to the authenticated user.
Authentication
Requires JWT authentication token in the Authorization header.Request Body
ID of the terrain where the work will be performed. Must belong to the authenticated user.
ID of the implement to be used.
Working depth in meters. If not provided, uses the implement’s default working depth.
Type of work to be performed.Options:
tillage, planting, harvesting, transport, generalResponse
Indicates if the request was successful.
Success message.
Algorithm Details
The recommendation engine follows this workflow:- Validates terrain ownership (must belong to authenticated user)
- Calculates minimum power required for the implement on the terrain
- Analyzes terrain characteristics (slope, soil type)
- Evaluates each available tractor with multi-criteria scoring:
- Efficiency: Optimal power utilization
- Traction: Compatibility with slope and soil
- Soil: Adequacy for terrain type
- Economic: Cost-benefit ratio
- Availability: Tractor status
- Returns top 5 ranked tractors with detailed explanations
- Persists top 3 recommendations to database
Classification Labels
- OPTIMAL: Perfect power fit for the task
- GOOD: Good balance between power and need
- ACCEPTABLE: Functional but not ideal
- OVERPOWERED: Oversized for the task
Source Code Reference
- Route:
src/routes/recommendation.routes.js:139 - Controller:
src/controllers/recommendationController.js:141 - Service:
src/services/recommendationService.js
