An end-to-end workforce scheduling and tariff optimization platform developed for TCDD Transportation to manage complex shift cycles, overnight duties, and station standby periods for 50+ railway personnel. Engineered by translating industrial engineering constraints and operations research models directly to AI assistants via Vibe Coding.
Problem
Manual management of shift cycles, delays, resting hours, and payroll calculations for 50+ personnel created significant administrative overhead and was prone to regulatory compliance errors.
80% Reduction
Planning Time
Multi-day manual calculations reduced to minutes
100%
Regulatory Compliance
Zero errors in T.4011, T.5545, and T.6613 rules
50+ Crew Members
Staff Coverage
Complex multi-tier shifts and standby rosters
Algorithmic
Fair Allocation
Fair standby crew queuing and balanced workload
Approach
- Industrial engineering constraints and regulatory rules were conveyed to AI agents via the Vibe Coding methodology to design a 3-stage roster engine.
- T.4011 (working hours), T.5545 and T.6613 (standby bonus) rules were encoded into the algorithm.
- A conflict-preventing 'Publication Lock' (Immutable Snapshot) architecture was built.
- A fairness-ranking algorithm for standby crew and SAP-compatible dynamic meal list generation were integrated.
Step by step
-
AI-Assisted Modeling of Business Rules
T.4011 working hour limits, T.5545 and T.6613 standby bonus rules were converted into an algorithmic rule engine via Vibe Coding.
-
3-Stage Roster Engine Development
A 3-stage core engine that automatically calculates shift assignments, roster conflict checks, and crew rest periods was coded.
-
Publication Lock (Immutable Snapshot) Architecture
A secure snapshot-locking system preventing retroactive manipulation and data conflicts in published tariffs was established.
-
Fairness Ranking & SAP Meal Integration
A scoring algorithm ensuring standby duty fairness and SAP-compatible dynamic meal list generation were delivered.
Results and impact
- Monthly tariff and shift preparation time for 50+ personnel was reduced from 5 business days to 2 hours.
- Human error in T.4011, T.5545, and T.6613 standby bonus calculations was fully eliminated.
- The Publication Lock architecture ensured 100% data integrity and historical traceability of tariffs.
- Managers can now approve tariffs and receive disruption notifications instantly from their phones via Telegram Bot.
Precisely specifying engineering constraints was found to increase coding speed tenfold.
System architecture
- Backend
- Python (FastAPI, SQLAlchemy) & Vibe Coding Prompt Architecture
- Frontend
- Alpine.js, Bootstrap / TailwindCSS, Glassmorphism
- Integrations
- Telegram Bot integration with manager approval workflow, SAP-compatible meal output
Takeaways
11 years of field experience proved to have a multiplier effect when conveying complex railway regulations like T.4011, T.5545, and T.6613 to AI via Vibe Coding.
Technologies
- Vibe Coding
- Cursor
- Claude
- Python
- FastAPI
- SQLAlchemy
- Alpine.js
- TailwindCSS
- Telegram Bot API





