timefold-solver icon indicating copy to clipboard operation
timefold-solver copied to clipboard

ArrivalTimeUpdatingVariableListener is not working and not updating arrival time

Open sharmas1ddharth opened this issue 1 year ago • 1 comments

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

sharmas1ddharth avatar Jul 15 '24 05:07 sharmas1ddharth

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.

Christopher-Chianelli avatar Jul 16 '24 13:07 Christopher-Chianelli

@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.

Christopher-Chianelli avatar Aug 13 '24 15:08 Christopher-Chianelli

Thanks for the update

sharmas1ddharth avatar Aug 13 '24 16:08 sharmas1ddharth

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.

triceo avatar Sep 26 '24 06:09 triceo