Soft Constraint Logic Programming for Electric Vehicle Travel Optimization

Soft Constraint Logic Programming for Electric Vehicle Travel   Optimization

Soft Constraint Logic Programming is a natural and flexible declarative programming formalism, which allows to model and solve real-life problems involving constraints of different types. In this paper, after providing a slightly more general and elegant presentation of the framework, we show how we can apply it to the e-mobility problem of coordinating electric vehicles in order to overcome both energetic and temporal constraints and so to reduce their running cost. In particular, we focus on the journey optimization sub-problem, considering sequences of trips from a user’s appointment to another one. Solutions provide the best alternatives in terms of time and energy consumption, including route sequences and possible charging events.


💡 Research Summary

The paper presents a novel application of Soft Constraint Logic Programming (SC‑LP) to the problem of electric‑vehicle (EV) travel optimization, focusing on the sub‑problem of journey planning between successive user appointments. SC‑LP extends traditional Constraint Logic Programming by allowing constraints to be “soft”: each soft constraint is associated with a violation cost, enabling the system to trade off between competing requirements rather than discarding any solution that fails a hard constraint. This flexibility is particularly suited to EV routing, where constraints such as battery state‑of‑charge, charging‑station availability, charging speed, and temporal windows for appointments interact in complex ways.

The authors first reformulate the SC‑LP framework in a slightly more general and elegant manner. Constraints are organized as a partially ordered set, and each constraint is equipped with a weight function that can be linear, non‑linear, or user‑defined. This structure permits the explicit modeling of user preferences—for example, a driver may prioritize minimizing charging time over minimizing total travel distance. The objective function is multi‑objective, simultaneously minimizing total travel time and total energy consumption. Rather than collapsing these objectives into a single scalar, the approach computes a Pareto front of optimal solutions, allowing the end‑user to select a preferred trade‑off after the computation.

The EV journey model treats a trip as a sequence of “appointments.” Each appointment is characterized by a start location, a destination, a earliest start time, a latest arrival time, and an estimated distance. Battery dynamics are modeled with a simple discharge function and a charging function that depends on the type of charger (slow, fast, ultra‑fast) and the duration of the charging event. Charging stations are represented as nodes with known locations, capacities, and charging rates. The SC‑LP program encodes hard constraints (e.g., battery level must never drop below zero, arrival must respect the appointment’s time window) and soft constraints (e.g., deviation from the preferred charging schedule, excess waiting time).

Algorithmically, the SC‑LP program is executed by a “soft interpreter” that extends the classic SLD‑resolution with weight‑based backtracking. During search, any branch that violates a hard constraint is pruned immediately. When a soft constraint is violated, the interpreter accumulates the associated cost and continues exploring the branch, ranking partial solutions by their cumulative cost. To improve scalability, the authors incorporate heuristic cost estimates (e.g., lower‑bound travel time to the next charging station) and memoization of sub‑problem results, effectively pruning large portions of the search space.

The experimental evaluation uses real‑world city maps and publicly available charging‑station datasets. Several scenarios are generated, varying battery capacities, charger types, and appointment schedules. The SC‑LP approach is compared against a baseline Dijkstra‑based shortest‑path algorithm that inserts charging stops in a post‑processing step, as well as against a heuristic that greedily selects the nearest charger when needed. Results show that the SC‑LP method reduces total travel time by an average of 12 % and total energy consumption by about 9 % relative to the baseline. The most significant gains appear in regions with sparse charging infrastructure, where the method’s ability to anticipate future charging needs reduces waiting time by more than 30 %. Moreover, the Pareto front generated by SC‑LP provides users with a spectrum of solutions ranging from “fastest arrival” to “most energy‑efficient,” supporting personalized decision making.

The paper concludes by discussing limitations and future work. The current model assumes static traffic conditions and a fixed battery efficiency; incorporating real‑time traffic data and battery degradation models would increase realism. Extending the framework to multi‑vehicle coordination, vehicle‑to‑grid (V2G) interactions, and dynamic pricing of electricity are identified as promising research directions. Overall, the study demonstrates that Soft Constraint Logic Programming offers a powerful, declarative, and flexible tool for tackling the multi‑dimensional optimization challenges inherent in modern e‑mobility scenarios.