Business-Rule Modeling & Decision Support
Maritime Voyage Feasibility and Emissions Modeling
A privacy-safe case study about a PHP/MySQL application layer for maritime voyage feasibility, external API integration, asynchronous calculation handling, scenario modeling, and historical comparison.
Project overview
This work involved a PHP and MySQL application for evaluating whether proposed maritime voyage scenarios were commercially and operationally feasible before a commitment was made.
The application integrated with an external maritime voyage-optimization API. That external service supplied route, vessel-performance, fuel-consumption, duration, distance, and emission-related results; my application layer did not create the underlying maritime routing or vessel-performance engine.
The application collected voyage and commercial assumptions, initiated calculations, polled asynchronous results, validated API responses, logged failures, stored historical scenario runs, and displayed route and comparison information for review.
The challenge
Voyage decisions depend on operational timing, commercial assumptions, fuel behavior, port-delay rules, and cost comparisons. The work needed to connect external voyage-optimization results with a structured PHP/MySQL workflow that could model business scenarios, validate responses, preserve historical runs, and present comparisons without exposing proprietary maritime details.
My role
I developed the PHP/MySQL application layer that collected assumptions, called the external API, handled asynchronous result polling, validated responses, logged failure cases, processed calculation points, and stored scenario history and comparison deltas.
I implemented business-rule processing around port delay, laytime, demurrage rate, fuel cost, and emission cost, and aggregated main-engine, auxiliary-engine, and boiler fuel costs for scenario comparison.
I also supported route presentation through Google Maps and historical comparison views through Chart.js while keeping the external service responsible for maritime routing and vessel-performance calculations.
Approach and implementation
- Used PHP, PDO, MySQL, cURL, JSON, and REST API integration to submit calculation requests and poll asynchronous results.
- Validated external API responses and logged failures so incomplete or invalid results could be reviewed instead of silently affecting comparisons.
- Processed calculation points and used geospatial interpolation to identify a voyage split point for scenario modeling.
- Modeled and compared Baseline, Sail Fast Then Wait, and Just-in-Time voyage scenarios.
- Applied rules involving port delay, laytime, demurrage rate, fuel cost, and emission cost.
- Stored historical scenario runs and comparison deltas in MySQL, then presented route information through Google Maps and historical comparisons through Chart.js.
Key capabilities delivered
- Voyage and commercial assumption capture
- External maritime API request and polling workflow
- Response validation and failure logging
- Geospatial interpolation for voyage split-point identification
- Baseline, Sail Fast Then Wait, and Just-in-Time scenario comparison
- Port-delay, laytime, demurrage, fuel-cost, and emission-cost rules
- Main-engine, auxiliary-engine, and boiler fuel-cost aggregation
- Historical scenario storage and comparison deltas
- Google Maps route display and Chart.js comparison views
Outcomes
- Created a structured PHP/MySQL workflow for comparing voyage scenarios using verified external maritime calculation results.
- Made commercial assumptions, delay rules, fuel-cost components, and emission-cost inputs easier to compare across scenario runs.
- Preserved historical scenario data and comparison deltas for later review.
- Improved visibility into route information and scenario history through map and chart interfaces.
- Kept the application boundary clear between the local business-rule workflow and the external maritime optimization service.
Confidentiality note
This case study does not publish raw database screenshots, vessel identifiers, coordinates, client details, credentials, commercial rates, numerical outcomes, proprietary formulas, routes, ports, cargoes, shipping companies, or external-service internals.