Assume that a task exists with two attributes: priority and due date.
Priority p is a numeric value. The priority importance increases to infinity, meaning that 5 is a priority higher than 4. Priority 0 is normal priority.
Due date d is a date in the past or in the future, when compared with the current date. A d date before now is more important than a date in the future.
The idea is to combine these two
attributes, priority and due date,
according to the rules above, in order
to produce a numeric output that can
be used to order a list of tasks.
This should be possible to model as a math function but I am rusty, to say the least, in that field. I am even not convinced if it should be a 2D function or a 3D function.
I started by a 2D graph where x-axis is for priority and y-axis is for the difference between the current date and the due date.
- The upper left quadrant
A1has due dates
in the past and high priorities. - The upper right quadrant
A2has due dates in
the future and high priorities. - The lower left quadrant
A3has due dates in
the past and low priorities. - The lower right quadrant
A4has due dates in
the future and low priorities.
Any guys with math knowledge that can throw a fee pointers?
A simple linear function should do. Something based on 3 variables and one constant; something like
Where k is a coefficient expressing the relative importance of the date vs. the priority value, and cd is the current date.
How/why does this work?
Another, similar but less intuitively tractable approach is to increase the degree of the equation, to express the fact that, say, when we are two days late is the importance of the date should have a bigger impact on the CombinedPriority than when we are just one day late.
The function would the look something like
Where kd1, kd2, kp1, kp2 are constants, expressing the relative importance of the four elements of the addition. some of these constants may even be zero; in that sense, the first function is a particular case of the second function, one where
kd2 = 0, kp2 = 0, kp1 = 1 and kd1 = k
To summarize: the difficulty is not so much with the math per-se, but with defining a good set of constants which expresses the relative importance of d and p, and possibly the scale on which d and p are measured.
The first function assumes that each of these two factor is on a linear scale (a job with p = 6 is twice as urgent as a job with p = 3, and/or a job 3 days late is three times as urgent as a job due yesterday etc.), whereby the second function allows the d and/or p factors to be on a quadratic scale.
A tentative plan to help define the coefficient(s) is to: