Build a Cross-Border Trailer Relay Parking Matcher — implementation
Linked challenge: Build a Cross-Border Trailer Relay Parking Matcher
Prompt source
implementation76 lines11 sectionsNo variables1 code block
## Build
Query Singapore heavy vehicle park vacancy to match Malaysian and Singaporean prime movers for trailer handoffs. Optimize cross-border driver relay schedules without terminal gate entry.
## User
Cross-Border Fleet Drayage Planner
## Workflow
1. Retrieve heavy vehicle parking lot vacancy data across Tuas and Woodlands districts using the data.gov.sg API.
2. Ingest cross-border trailer handoff schedules between Malaysian drop-off and Singaporean pick-up haulers.
3. Match paired prime movers to a single available heavy vehicle lot for the physical trailer coupling exchange.
4. Publish synchronized meeting points and time windows to both drivers.
## Interface
Geospatial parking availability map with live slot reservation recommendations and driver messaging cards.
## Data
Simulated JSON data formatted after data.gov.sg URA/HDB heavy vehicle carpark availability endpoints, acting as simplified synthetic app records, not complete official schema files.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Singapore open data API](https://guide.data.gov.sg/developer-guide/api-overview)
Adopts data.gov.sg carpark availability API structure and collection ID patterns to evaluate real-time industrial vehicle parking capacity.
## Tools
agno, fastapi, python.
Agno provides flexible agent tools to query municipal parking APIs and formulate constraint-based truck relay exchange plans.
Instruction-tuned LLM via API for generating simple, clear driver parking and relay exchange directions in plain English.
## 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
- Query parking vacancy from simulated data.gov.sg carpark endpoints.
- Allocate relay meeting points only to carparks with at least 1 heavy vehicle lot available for the trailer drop.
- Synchronize driver arrival estimates within a 30-minute matching window.
- Publish a time-bound driver exchange itinerary preventing wait delays.
## Starter Examples
```json
[
{
"input": {
"trailer_id": "TRL-9921",
"my_driver_eta": "2025-04-20T14:00:00Z",
"sg_driver_eta": "2025-04-20T14:15:00Z",
"carpark_availability": [
{
"carpark_id": "T001",
"name": "Tuas South Relay Park",
"available_lots": 2
}
]
},
"expected_output": {
"relay_matched": true,
"assigned_carpark": "Tuas South Relay Park",
"exchange_window": "14:15 - 14:45",
"driver_instructions": "Both drivers meet at Tuas South Relay Park at 14:15 for trailer TRL-9921 exchange."
}
},
{
"input": {
"trailer_id": "TRL-9922",
"my_driver_eta": "2025-04-20T15:00:00Z",
"sg_driver_eta": "2025-04-20T16:30:00Z",
"carpark_availability": [
{
"carpark_id": "T001",
"name": "Tuas South Relay Park",
"available_lots": 0
}
]
},
"expected_output": {
"relay_matched": false,
"assigned_carpark": null,
"exchange_window": null,
"driver_instructions": "Relay failed: Drivers arrival mismatched by 1.5 hours and no parking lots available. Reschedule."
}
}
]
```
## Safety
Parking guidance is advisory; drivers must observe physical parking bay markings and local municipal parking signs.
Use mock external writes. Require human review before any real deployment.