timefold-solver
timefold-solver copied to clipboard
ArrivalTimeUpdatingVariableListener is not working and not updating arrival time
Describe the bug ArrivalTimeUpdatingVariableListener is not working and not updating arrival time in tests folder
Expected behavior arrival_time variable should not be None
Actual behavior arrival_time variable is None in the output when running tests code to check the output
To Reproduce run test_vehicle_routing.py in tests folder (https://github.com/TimefoldAI/timefold-solver-python/blob/main/tests/test_vehicle_routing.py)
Environment
Timefold Solver Version or Git ref: https://github.com/TimefoldAI/timefold-solver-python/blob/main/tests/test_vehicle_routing.py
Python version used: 3.10.14
Output of uname -a or ver: x86_64 GNU/Linux
Thanks for reporting!
The test really should have
assert all([visit.arrival_time is not None for visit in solution.visits])
along with some arrival time assertions to catch this.
@sharmas1ddharth you might want to look into using CascadingUpdateShadowVariable, a new feature released in Timefold Solver 1.13.0 that the vehicle routing quickstart and test now use.
Thanks for the update
We have recently fixed a problem with our variable listeners in Python, which leads me to think this issue was fixed as well.
Please give this a try with Timefold Solver 1.15.0 (out in a few weeks) and if it still doesn't work for you, kindly reopen this issue.