The tool sizes a truck fleet that moves road containers from the container terminals of the Port of Rotterdam to handover points (port exits, distriparks, empty depots, rail/barge hubs, customs) and decides, at the same time, which charging infrastructure to build: static charging sites, depot chargers and dynamically electrified road sections (ERS), each connected to an OSM substation with an assumed free capacity. One mixed-integer linear programme (MILP) minimises the annualised total cost of ownership (capex annuities + opex). The diesel-only status quo serving the same demand is solved as reference. A detailed German write-up of the formulation is delivered as PDF (MILP_Formulierung_Hafen_Rotterdam.pdf).
Per terminal t the user enters vessel calls per week, container moves per call, transshipment share and road share. Each road container is one loaded leg; with a backhaul share β a round trip carries 1+β containers.
Each lane uses the fastest path on the OSM truck network (gate → handover and back, oneway-aware, speed = min(maxspeed, class default) × congestion factor). Round-trip time per vehicle type: driving × (1 + break/driving-limit) + handling at both ends (+ refuelling for diesel).
x(l,k) round trips/week on lane l by vehicle type k; N(k) vehicles of type k (integer)y(σ) electrify road section σ (binary); v(g) ERS feed-in at substation g (binary)z(s) build charging site s (binary); n(s) chargers at s (integer)f(l,k,s) energy charged during handling at the lane's own endpoint s; qx(k,s) extra charging that costs driver timew(l,k,σ) energy picked up dynamically on section σ; qd(k,d), nd(k,d) depot energy and vehicles at depot dE(l,k) = round-trip energy, B_k = usable battery (SoC window, constant-power range ≤ 80 %), h(l,σ) = hours per round trip on σ, p(k,s) = min(charger, vehicle) power × η, τ = hours per kWh incl. plug-in time.
HiGHS (WebAssembly) solves the MILP in the browser within the time limit and gap. If the limit is reached, the best road-section layout is fixed and fleet, sites, chargers and grid connections are re-optimised (polish step). Road sections are formed from candidate OSM edges that are used by exactly the same lanes and fed by the same substation (≤ 2 km each).