# Would a genetic algorithm be used for this type of scheduling optimization?

Let me preface this by saying I'm not an experienced data scientist/statistician so I apologize if this is trivial.

My problem statement is as follows:

• There are N events that happen from time A to time B
• Each event takes some time X.
• Each event is ranked by priority.

I'd like to organize these events based on time and priority.

I have seen genetic algorithms used for school schedule optimization but i'm not sure if I can adapt that to this problem. Also, I'm struggling to figure out how I will incorporate the priority since that is dynamic.

Formulate a dataset as follows:

         time_takes    priority
...             ...         ...

I assume that was not really what you were looking for, though the wording of the question was vague. If you want to optimize, this generally means solving some set of equations with constraints, often using a min() or max() function and some constraints on your parameters.
$$\max_u \{\sum_i task_i(u_i,\tau_i)\} \\ s.t. \sum_i \tau_i \leq T \\ \text{where:} \\ \tau_i = \text{time to complete task } i \\ u_i = \text{utility from task } i \\ T = \text{total time (= B - A)} \\$$
• Thanks for the response! This is making more sense but I do have some follow up questions. How do I go about building the task function? – madsthaks Jul 7 '18 at 0:19
• $task(u_i, \tau_i)$ is just a mapping of the dataset from the top of the answer. The hardest part is actually determining the utility function, which is how you decide how much utility (an arbitrary value) you will gain from completing each task. That is up to your discretion. Maybe, if you have a continuous value for your priority category, use "priority" as a proxy for utility. – ERT Jul 7 '18 at 1:02