Back to prompt library
Build a Desalination Plant Reverse Osmosis Membrane Cleaning Scheduler — implementation
Linked challenge: Build a Desalination Plant Reverse Osmosis Membrane Cleaning Scheduler
Prompt source
implementation66 lines11 sectionsNo variables1 code block
## Build
Monitor reverse osmosis membrane pressure differentials and permeate quality to schedule clean-in-place operations. Optimize cleaning chemical usage while maintaining continuous baseline potable water production across the plant.
## User
Desalination Plant Maintenance Manager
## Workflow
1. Ingest SWRO membrane pressure drop telemetry and permeate conductivity readings.
2. Evaluate membrane fouling rates using WaterTAP module performance models.
3. Schedule staggered clean-in-place cycles across multiple RO trains to avoid complete shutdown.
4. Generate a chemical dosing and train isolation manifest for operators.
## Interface
Maintenance scheduling dashboard highlighting membrane fouling trends and recommended chemical wash timelines.
## Data
Utilize WaterTAP RO flowsheet modeling data to generate synthetic membrane fouling degradation profiles.
Starter examples below are synthetic. They are not downloaded records.
## Source
[WaterTAP treatment modeling](https://raw.githubusercontent.com/watertap-org/watertap/main/README.md)
Applies WaterTAP membrane unit models to correlate pressure differential increases with expected fouling severity.
## Tools
agno, pandas, fastapi.
Agno provides agentic reasoning capabilities to evaluate multi-train maintenance schedules against continuous production constraints.
Local or cloud LLM capable of evaluating tabular telemetry logic and generating valid JSON maintenance manifests.
## 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 membrane fouling progression from differential pressure telemetry.
- Determines the optimal clean-in-place cycle timing based on a pressure threshold limit.
- Ensures scheduled RO train outages maintain plant production constraints.
- Generates a human-reviewable chemical cleaning dispatch schedule.
## Starter Examples
```json
[
{
"input": {
"train_id": "RO-TRAIN-A",
"delta_p_bar": 2.8,
"baseline_delta_p_bar": 1.5,
"plant_demand_m3h": 5000
},
"expected_output": {
"fouling_status": "SEVERE",
"cip_required": true,
"pressure_diff_bar": 1.3,
"chemical_dosage_liters": 130,
"_note": "Simplified synthetic app record; chemical_dosage_liters = pressure_diff_bar * 100"
}
},
{
"input": {
"train_id": "RO-TRAIN-B",
"delta_p_bar": 1.7,
"baseline_delta_p_bar": 1.5,
"plant_demand_m3h": 5000
},
"expected_output": {
"fouling_status": "NORMAL",
"cip_required": false,
"pressure_diff_bar": 0.2,
"chemical_dosage_liters": 0,
"_note": "Simplified synthetic app record"
}
}
]
```
## Safety
Maintenance schedules are advisory and require human review by a certified chemical engineer before executing physical clean-in-place operations.
Use mock external writes. Require human review before any real deployment.