I have to create a priority queue for elements which have multiples variables with an associated weight, what is the better way calculate a unique value in order to get the order of each element in the queue? using a weighted average or using some mathematical modeling? please advice.
Asked
Active
Viewed 119 times
1 Answers
0
Are you sure you want to turn the weighted variables into a unique value? Mathematically speaking this gets quite tricky (imagine 2 elements with exactly the same parameters - which one gets a higher value?).
If the value need not be unique, you can use stuff like weighted average, weighted sum, or utility functions. If you want to determine the appropriate weights for the different variables you can look into stuff like the Analytical Network Process (ANP) link

Koen Peters
- 326
- 1
- 2
- 9
-
Hi Koen, thank you four your answer, Let me explain it a little bit more, what I am trying to do is create a priority queue with elements that have some associated variables but each variable have a weight, so I am calculating a weighted average and then sort the list by that value, but the question is there is a better way to do that? maybe lineal programming or some mathematical modeling. Thank you!! – William Perez Herrera Feb 09 '16 at 15:29
-
For most queueing systems using a straight-forward calculation (such as weighted average) is the best way to go, seeing as they need to calculate these values often and fast. Refer to [link](https://en.wikipedia.org/wiki/Queueing_theory) for some business standards. If you have a queue with long lead times (for instance in manufacturing), there may be merit in using mathematical modelling to figure out the optimal order in which to process the different elements (based on their due dates, processing times, and customer importance for instance). – Koen Peters Feb 10 '16 at 08:12
-
Hi Koen, thank you very much I really appreciate your help. it has been very helpful. – William Perez Herrera Feb 10 '16 at 14:51