![]() |
vrpRouting
0.3
|
Functions | |
Multiplier | get_tdm (const std::vector< std::tuple< TTimestamp, Multiplier >> &tdm, TTimestamp time) |
Multiplier | next_tdm (const std::vector< std::tuple< TTimestamp, Multiplier >> &tdm, TTimestamp time) |
std::vector< std::tuple< TTimestamp, Multiplier > > | set_tdm (Time_multipliers_t *p_multipliers, size_t size_multipliers) |
TTimestamp | time_change (const std::vector< std::tuple< TTimestamp, Multiplier >> &tdm, TTimestamp time) |
Multiplier vrprouting::problem::anonymous_namespace{matrix.cpp}::get_tdm | ( | const std::vector< std::tuple< TTimestamp, Multiplier >> & | tdm, |
TTimestamp | time | ||
) |
[in] | tdm | time dependant multiplier container |
[in] | time | the time from where the multiplier is calculated |
Definition at line 78 of file matrix.cpp.
References pgassert.
Referenced by vrprouting::problem::Matrix::travel_time().
Multiplier vrprouting::problem::anonymous_namespace{matrix.cpp}::next_tdm | ( | const std::vector< std::tuple< TTimestamp, Multiplier >> & | tdm, |
TTimestamp | time | ||
) |
[in] | tdm | time dependant multiplier container |
[in] | time | the time from where the multiplier is calculated |
Definition at line 94 of file matrix.cpp.
Referenced by vrprouting::problem::Matrix::travel_time().
std::vector<std::tuple<TTimestamp, Multiplier> > vrprouting::problem::anonymous_namespace{matrix.cpp}::set_tdm | ( | Time_multipliers_t * | p_multipliers, |
size_t | size_multipliers | ||
) |
[in] | p_multipliers | time dependant multiplier data |
[in] | size_multipliers | number of rows in the data |
Definition at line 56 of file matrix.cpp.
References pgassert, and Time_multipliers_t::start_time.
TTimestamp vrprouting::problem::anonymous_namespace{matrix.cpp}::time_change | ( | const std::vector< std::tuple< TTimestamp, Multiplier >> & | tdm, |
TTimestamp | time | ||
) |
[in] | tdm | time dependant multiplier container |
[in] | time | the time from where the multiplier is calculated |
Example with 3 time multiplier, no more multiplier after 11
0 9 11 |------------—|------------—|
time is 9:30 then the time change is the next one after that so 11 t_change = 0 0 < 9:30 true continue
t_change = 9 9 < 9:30 true
t_change = 11 11 < 9:30 false cycle breaks
return t_change = 11
time is 11:30
t_change = 0 0 < 11:30 true continue
t_change = 9 9 < 11:30 true
t_change = 11 11 < 11:30 true cycle ends naturally
return t_change = 11
post condition:
From first example t_change > time
from second example t_change is the last one on the list
Definition at line 154 of file matrix.cpp.
References pgassert.
Referenced by vrprouting::problem::Matrix::travel_time().