You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](auto sum, auto tw) { return sum + tw.length; });
}
, where it is used to initialise Job::tw_length, which itself is not used anywhere and gets removed in #1014.
Anyway, to avoid any possible confusion in the future, I would propose to either scale the value: length(utils::scale_from_user_duration(end - start)) or add a length() member function and compute the value on the fly.
The text was updated successfully, but these errors were encountered:
Good catch. Indeed not a problem for the sorting we currently do but we should definitely get consistent values in case we use the length in conjunction with something else in the future. Can you add that to #1014?
The
length
member ofTimeWindow
class defined here:vroom/src/structures/vroom/time_window.h
Line 21 in f5f078f
vroom/src/structures/vroom/time_window.cpp
Lines 22 to 25 in f5f078f
Due to both
start
andend
members being shadowed bystart
andend
arguments, the computedlength
value is based onUserDuration
instead ofDuration
.At the moment it is not a big deal, because
TimeWindow::length
is used only in vehicle comparison:vroom/src/structures/vroom/vehicle.h
Lines 138 to 153 in f5f078f
vroom/src/structures/vroom/job.cpp
Lines 17 to 22 in f5f078f
Job::tw_length
, which itself is not used anywhere and gets removed in #1014.Anyway, to avoid any possible confusion in the future, I would propose to either scale the value:
length(utils::scale_from_user_duration(end - start))
or add alength()
member function and compute the value on the fly.The text was updated successfully, but these errors were encountered: