Back to Prompt Library
implementation
Build the application
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: Build a District Cooling Thermal Energy Storage Night-Chilling Optimizer
Format
Code-aware
Lines
83
Sections
11
Linked challenge
Build a District Cooling Thermal Energy Storage Night-Chilling Optimizer
Prompt source
Original prompt text with formatting preserved for inspection.
83 lines
11 sections
No variables
1 code block
## Build
Model district cooling plant chiller load shifting and stratified thermal storage tank charging during off-peak night hours. Reduce peak-demand electrical charges while guaranteeing daytime cooling tonnage.
## User
District Cooling Operations Lead
## Workflow
1. Ingest commercial customer cooling load forecasts and thermal energy storage (TES) state-of-charge.
2. Retrieve time-differentiated electricity tariffs and chiller coefficient-of-performance curves.
3. Formulate optimal nocturnal TES charging sequences using building energy balance principles from EnergyPlus.
4. Produce verified chiller staging plans and thermal reserve reports for operational shift sign-off.
## Interface
A real-time plant load balancing dashboard showing TES thermocline levels, chiller staging Gantt charts, and demand tariff cost deltas.
## Data
Synthesize 24-hour district cooling demand profiles (ton-hours), TES tank capacity limits, and utility tariff rate tables in JSON.
Starter examples below are synthetic. They are not downloaded records.
## Source
[EnergyPlus](https://raw.githubusercontent.com/NREL/EnergyPlus/develop/README.md)
Employs EnergyPlus chilled water loop and thermal storage tank energy balance conventions to model charging and discharging dynamics.
## Tools
dspy, pydantic, fastapi.
Compiles and optimizes structured prompt-based reasoning for complex thermodynamic scheduling decisions under tariff constraints.
Local or hosted LLM with strong math reasoning capabilities for validating thermal balance calculations.
## 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
- Maintains TES state-of-charge within safe operating bounds without overcharging.
- Demonstrates load shifting away from designated peak electrical tariff hours.
- Outputs hourly chiller stage assignments and expected peak demand cost reductions.
- Enforces mandatory engineering review check prior to transmitting setpoints to plant operators.
## Starter Examples
```json
[
{
"input": {
"plant_id": "DCP-MARINA",
"tes_capacity_ton_hours": 20000,
"initial_tes_storage_ton_hours": 4000,
"max_charge_rate_tons": 2500,
"forecast_peak_cooling_demand_tons": 8000,
"chiller_base_capacity_tons": 6000,
"off_peak_hours": [
0,
1,
2,
3,
4,
5
]
},
"expected_output": {
"recommended_night_charge_ton_hours": 15000,
"projected_peak_coverage_deficit_tons": 0,
"chiller_night_utilization_ratio": 0.83,
"peak_shaving_feasible": true,
"status": "APPROVED_FOR_REVIEW"
}
},
{
"input": {
"plant_id": "DCP-MARINA",
"tes_capacity_ton_hours": 10000,
"initial_tes_storage_ton_hours": 1000,
"max_charge_rate_tons": 1000,
"forecast_peak_cooling_demand_tons": 9000,
"chiller_base_capacity_tons": 6000,
"off_peak_hours": [
2,
3,
4
]
},
"expected_output": {
"recommended_night_charge_ton_hours": 3000,
"projected_peak_coverage_deficit_tons": 2000,
"chiller_night_utilization_ratio": 1,
"peak_shaving_feasible": false,
"status": "SUPPLEMENTAL_CHILLER_REQUIRED"
}
}
]
```
## Safety
Generates advisory scheduling proposals; thermal setpoints require confirmation by qualified plant shift engineers.
Use mock external writes. Require human review before any real deployment.Adaptation plan
Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.
Keep stable
Hold the task contract and output shape stable so generated implementations remain comparable.
Tune next
Update libraries, interfaces, and environment assumptions to match the stack you actually run.
Verify after
Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.