[Koha-bugs] [Bug 35826] Optimize building of holds queue based on transport cost matrix

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 17 23:08:04 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35826

--- Comment #3 from Andreas Jonsson <andreas.jonsson at kreablo.se> ---
Provided that all rows with all values being "infinity" and all columns with
all values being "infinity" is removed from the cost matrix beforehand and
there's still something left in the matrix, then there must exist at least one
pairing with finite cost that the algorithm will produce as result.

And if the matrix is empty the greedy algorithm wouldn't find any allocations
either.

So, I'd say that we do not need the greedy algorithm.

I think that my reasoning about different values to represent infinity was a
bit confused.  If a single large constant is used to represent infinity the
result of the algorithm will still maximize the number of finite valued
pairings, provided that the value representing infinity is larger than the
total cost of any finite cost assignment.  It might still be a good idea to use
different values to represent infinity to prefer not filling holds towards the
end of the queue if not all holds can be filled.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list