Back to prompt library
Build a Port-Adjacent Hauler Appointment Rescheduler and Weather Delay Planner — implementation
Linked challenge: Build a Port-Adjacent Hauler Appointment Rescheduler and Weather Delay Planner
Prompt source
implementation68 lines11 sectionsNo variables1 code block
## Build
Monitor Singapore real-time rainfall data to reschedule hauler container collection slots at port terminals. Calculate slipway congestion risks and balance driver shifts across alternative pickup intervals.
## User
Fleet Logistics Dispatcher
## Workflow
1. Ingest terminal hauler appointment rosters and container pickup deadlines for PSA terminals.
2. Fetch real-time rainfall and storm warning telemetry from data.gov.sg weather APIs.
3. Compute rain-induced transit delays and gate buffer windows for heavy transport vehicles.
4. Propose non-conflicting appointment rescheduling slots and notify carrier drivers via formatted alerts.
## Interface
A dynamic dispatch timetable showing rain radar overlays, slot utilization gauges, and side-by-side rescheduled appointment proposals.
## Data
Query data.gov.sg real-time weather rainfall endpoints combined with synthetic prime mover schedules in CSV format.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Singapore open data API](https://guide.data.gov.sg/developer-guide/api-overview)
Extract real-time weather APIs from data.gov.sg to calculate heavy transport travel delay allowances.
## Tools
dspy, fastapi, pandas.
DSPy compiles robust prompt programs to negotiate optimal schedule adjustments under hard boundary constraints.
Local or hosted LLM with strong constraint satisfaction capabilities.
## 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
- Polls live Singapore rainfall APIs to flag heavy weather conditions above 15mm/hr.
- Reschedules terminal pickup slots without violating driver statutory rest limits.
- Produces updated fleet dispatch schedules with verified slot adjustments.
- Maintains zero overlapping gate appointments for identical container transport chassis.
## Starter Examples
```json
[
{
"input": {
"vehicle_id": "PM-104",
"current_slot": "2025-05-02T15:00:00+08:00",
"terminal": "Pasir Panjang Terminal 3",
"route_rainfall_mm": 28.5,
"driver_max_hours_remaining": 4.5
},
"expected_output": {
"reschedule_recommended": true,
"revised_slot": "2025-05-02T16:15:00+08:00",
"weather_delay_allowance_min": 45,
"driver_compliance_verified": true,
"alert_message": "Slot rescheduled due to severe monsoon rain near Pasir Panjang corridor."
}
},
{
"input": {
"vehicle_id": "PM-202",
"current_slot": "2025-05-02T15:00:00+08:00",
"terminal": "Tuas Port Phase 1",
"route_rainfall_mm": 2,
"driver_max_hours_remaining": 6
},
"expected_output": {
"reschedule_recommended": false,
"revised_slot": "2025-05-02T15:00:00+08:00",
"weather_delay_allowance_min": 0,
"driver_compliance_verified": true,
"alert_message": "Weather normal. Proceed with scheduled pickup window."
}
}
]
```
## Safety
Coordinates internal fleet scheduling; does not submit automated binding requests to actual port authority systems.
Use mock external writes. Require human review before any real deployment.