caTUstrophy / backend

Backend part for our catastrophe aid tool. Written in Go.
GNU General Public License v3.0
6 stars 3 forks source link

Implement global matching score optimization #99

Closed numbleroot closed 8 years ago

numbleroot commented 8 years ago

When the database table containing the matching scores per regionID, offerID and requestID is created, implement a function that marks one offer in each list of offers for a request (list is sorted by descending matching score) as the global optimum.

See this document (German!).

The marker global optimum is supposed to be passed into JSON responses that take advantage of the computed matching score. Therefore, a region admin is supposed to get the visualization in the offers / requests list for a request / an offer that each element has a matching value attached to it whereas one element is marked as the global optimum. If the region admin decides to match e.g. all requests only with the corresponding offers marked as the global optimum he or she should have the guarantee that down to a low percentage no request should be unmatchable with an offer.

Part of #96

nielsrolf commented 8 years ago

For this, we can use the hungarian algorithm, There is currently one implementation of it registered at godoc: http://godoc.org/github.com/clyphub/munkres . Maybe we can use it, but it seems that it is still in development as it is last updated 3 days ago

nielsrolf commented 8 years ago

Sorry, i failed to close this autmatically by commit 2e6ebbab81c5df7fbfa0724436ec3abc9765ecb0