Build a Solar Farm Cleaning Robot Battery and Wash Scheduler — implementation
Linked challenge: Build a Solar Farm Cleaning Robot Battery and Wash Scheduler
Prompt source
implementation108 lines11 sectionsNo variables1 code block
## Build
Coordinate automated dry-cleaning robot deployments across utility solar arrays. Optimize schedules based on robot battery state-of-charge, dock availability, and string soiling losses to maximize recovered energy yield.
## User
Solar PV Plant Operations Engineer
## Workflow
1. Ingest dry-cleaning robot battery telemetry and specific array string soiling data.
2. Calculate optimal cleaning paths using pvlib to prioritize strings with the highest generation deficit.
3. Match cleaning tasks to available robots ensuring adequate charge to return to base docks.
4. Generate a dispatch matrix for the robotic fleet supervisory controller.
## Interface
Fleet management dashboard displaying robot state-of-charge, string soiling levels, and active cleaning dispatch matrices.
## Data
Generate synthetic string telemetry and robot battery data, representing simplified synthetic app records rather than official schema files.
Starter examples below are synthetic. They are not downloaded records.
## Source
[PVLib solar modeling](https://raw.githubusercontent.com/pvlib/pvlib-python/main/README.md)
Uses pvlib to model string generation deficits due to soiling, identifying high-priority tasks for the robotic fleet.
## Tools
mastra-ai, pvlib, fastapi.
Mastra AI provides workflow orchestration to match robot state-of-charge constraints with dynamic solar performance models.
Local or hosted LLM with strong JSON array generation for robotic task assignments.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Calculates generation deficit for each string using pvlib to rank priority.
- Verifies selected robots have sufficient battery state-of-charge for assigned strings plus return transit.
- Produces a formatted JSON dispatch matrix assigning tasks to capable robots and flags unserviced strings.
## Starter Examples
```json
[
{
"input": {
"fleet_id": "FLEET-A",
"robots": [
{
"id": "R1",
"soc": 90
},
{
"id": "R2",
"soc": 30
}
],
"tasks": [
{
"string_id": "S1",
"loss_pct": 5,
"required_charge_pct": 40
},
{
"string_id": "S2",
"loss_pct": 12,
"required_charge_pct": 60
}
],
"note": "Simplified synthetic app records"
},
"expected_output": {
"assignments": [
{
"robot_id": "R1",
"string_id": "S2",
"starting_soc": 90,
"ending_soc": 30
}
],
"charging_robots": [
"R2"
],
"unassigned_tasks": [
"S1"
]
}
},
{
"input": {
"fleet_id": "FLEET-B",
"robots": [
{
"id": "R3",
"soc": 15
}
],
"tasks": [
{
"string_id": "S3",
"loss_pct": 8,
"required_charge_pct": 20
}
],
"note": "Simplified synthetic app records"
},
"expected_output": {
"assignments": [],
"charging_robots": [
"R3"
],
"unassigned_tasks": [
"S3"
],
"alert": "Insufficient charge across fleet."
}
}
]
```
## Safety
Decision-support dispatch tool only; does not directly override robot low-level safety controllers or send physical actuation commands.
Use mock external writes. Require human review before any real deployment.