-
Notifications
You must be signed in to change notification settings - Fork 378
Closed
Description
In numerous situations, deciding if a local search move is valid is the result of calling several functions in a row to check validity with regard to skills, capacity, time windows etc.
The current code-base usually uses something along the lines of:
bool valid = first_check();
valid &= another_check();
...
return valid;
This code does generate unnecessary checks because another_check
it still called even if first_check
returned false
.
We should use operator&&
instead to get the intended short-circuit evaluation behaviour.