(all-predecessors-complete? tasks output-schedule task-id)
A predicate that returns true if all predecessors have been completed
A predicate that returns true if all predecessors have been completed
(all-tasks-complete? tasks output-schedule)
(errors-on-tasks tasks reordering-properties)
verif if there-s something wrong before we schedule. emits a map. {:errors {} :results schedule errors : non existing reordering prop, non existing predecessors, and cycles.
verif if there-s something wrong before we schedule. emits a map. {:errors {} :results schedule errors : non existing reordering prop, non existing predecessors, and cycles.
(find-fireable-tasks tasks output-schedule)
Finds which tasks can be fired based on their predecessors.
Finds which tasks can be fired based on their predecessors.
(format-a-task-in-output-schedule output-schedule a-task)
Given a task, we compute its current time vector and inject begin-time and completion ratio in it
Given a task, we compute its current time vector and inject begin-time and completion ratio in it
(format-tasks-in-output-schedule output-schedule tasks)
Given an output schedule : [{:task-id 1 :time 1 :resource-id 1} {:task-id 3 :time 1 :resource-id 1} {:task-id 1 :time 2 :resource-id 1} {:task-id 3 :time 2 :resource-id 1} {:task-id 3 :time 3 :resource-id 1}] we find start-time, completion rate for each task and then we return a scheduled version of tasks. {1 {:begin 2 :completion-rate 2/5....})
Given an output schedule : [{:task-id 1 :time 1 :resource-id 1} {:task-id 3 :time 1 :resource-id 1} {:task-id 1 :time 2 :resource-id 1} {:task-id 3 :time 2 :resource-id 1} {:task-id 3 :time 3 :resource-id 1}] we find start-time, completion rate for each task and then we return a scheduled version of tasks. {1 {:begin 2 :completion-rate 2/5....})
(gen-work-flow tasks work-queue)
Given all tasks description vector [{:task-id, ...},{}] and a work-queue [1 2 3],... we generate named task units with as many unit of each task as its duration : [1 1 1 2 2 3 3 3]
Given all tasks description vector [{:task-id, ...},{}] and a work-queue [1 2 3],... we generate named task units with as many unit of each task as its duration : [1 1 1 2 2 3 3 3]
(missing-prop-for-task task reordering-properties)
Given a task ({:prop ...}) and a vector of properties returns missing properties for task
Given a task ({:prop ...}) and a vector of properties returns missing properties for task
(move-system-status-gen tasks
reordering-properties
timer
resources-ids
output-schedule
workflows)
(not-found-task? tasks task-id)
If task id is not in tasks, return true
If task id is not in tasks, return true
(prepare-milestone a-milestone-desc)
A milestone is declared by giving :milestone-name and at least one predecessor then we create a task, with a (gensym :milestone-user) and a duration 1 as user-id, so milestones can enter the scheduler algorithm
A milestone is declared by giving :milestone-name and at least one predecessor then we create a task, with a (gensym :milestone-user) and a duration 1 as user-id, so milestones can enter the scheduler algorithm
(prepare-tasks tasks)
Adds random user-ids and duration=1 to milestones tasks
Adds random user-ids and duration=1 to milestones tasks
(properties property-names)
Inspired from the joy of clojure. Knew I was going to use it someday! This yields a function which, applied to each task by sort-by, will generate vector of values used to order the tasks don't forget we have rows with indices, {1 {:order ...}
Inspired from the joy of clojure. Knew I was going to use it someday! This yields a function which, applied to each task by sort-by, will generate vector of values used to order the tasks don't forget we have rows with indices, {1 {:order ...}
(reorder-tasks tasks property-names)
Sort tasks according to properties given in the property-names vector. As it is a vector, accessing from right is more effcient. as more urgent comes first, i.e on left of the vector, we need to reverse the result to put highest priority to the right.
Sort tasks according to properties given in the property-names vector. As it is a vector, accessing from right is more effcient. as more urgent comes first, i.e on left of the vector, we need to reverse the result to put highest priority to the right.
(run-scheduler tasks reordering-properties)
this is the master-mind. runs all of them, collects their inputs, and then goes home
this is the master-mind. runs all of them, collects their inputs, and then goes home
(run-scheduler-for-resource timer
resource-id
tasks
output-schedule
workflows
reordering-properties)
For this timer, computes aht task unit this resource will compute, yielding a new workflows map
For this timer, computes aht task unit this resource will compute, yielding a new workflows map
(schedule tasks reordering-properties)
The real over-master-uber-function to call. Gives you tasks with :begin, just like you'd exepct, if errors =nil, or you can read errors instead.
The real over-master-uber-function to call. Gives you tasks with :begin, just like you'd exepct, if errors =nil, or you can read errors instead.
(task-complete? tasks output-schedule the-task-id)
Returns true if task is complete
Returns true if task is complete
(task-completion-rate tasks output-schedule the-task-id)
Given tasks description, a schedule-output [{:task-id 1 :resource-id 1 :time 2} {:task-id 1 :resource-id 1 :time 2} ...] and a task-id, returns the completion-rate,i.e, nb of units in output / duration of task. if no task in the schedule, it's completion is 0. If no duration / 0, completion is 1.
Given tasks description, a schedule-output [{:task-id 1 :resource-id 1 :time 2} {:task-id 1 :resource-id 1 :time 2} ...] and a task-id, returns the completion-rate,i.e, nb of units in output / duration of task. if no task in the schedule, it's completion is 0. If no duration / 0, completion is 1.
(task-in-work-in-progress? tasks work-flow the-task-id)
Returns true if task is work-in-progress, i.e, is in the head of the work queue, and is not at full length
Returns true if task is work-in-progress, i.e, is in the head of the work queue, and is not at full length
(task-sched-time-vector output-schedule task-id)
Given an output-schedule, and a task-id you get a time-vector of the task as present in the output schedule
Given an output-schedule, and a task-id you get a time-vector of the task as present in the output schedule
(tasks-for-resource tasks resource-id)
Given a user-id, give you all tasks for this user (with all infos)
Given a user-id, give you all tasks for this user (with all infos)
(tasks-w-empty-predecessors tasks)
(tasks-w-missing-properties tasks reordering-properties)
Returns a map, with task-id and a vector of missing property
Returns a map, with task-id and a vector of missing property
(tasks-w-no-field tasks field)
Which tasks don't have Field field.
Which tasks don't have Field field.
(tasks-w-non-existent-predecessors tasks)
Given Tasks, emits a detailed info on whom tasks are having non existent predecessors
Given Tasks, emits a detailed info on whom tasks are having non existent predecessors
(tasks-w-not-found-predecessors tasks)
Returns the Tasks with predecessors not declared as tasks elsewhere in the tasks definition.
Returns the Tasks with predecessors not declared as tasks elsewhere in the tasks definition.
(total-task-duration tasks)
Computes total tasks duration as if they were done sequentially.
Computes total tasks duration as if they were done sequentially.
(work-flow-for-resource current-work-flow
tasks
resource-id
current-output-schedule
reordering-properties)
given a user, its current work-queue, tasks and current output schedule, we find his tasks, the fireable ones, reorder all of them (if preemptive) or those non work in propress if not, and issue new work-flow
given a user, its current work-queue, tasks and current output schedule, we find his tasks, the fireable ones, reorder all of them (if preemptive) or those non work in propress if not, and issue new work-flow
(work-in-progress-count work-flow the-task-id)
Work in progress is a task at the peek of the work flow [ 1 1 2 2 2 ...], that a resource begun treating. Once a task is Work in progress, it is not involved in the reordering of tasks, unless its length is equal to the original task duration : it has not yet been processed.
Work in progress is a task at the peek of the work flow [ 1 1 2 2 2 ...], that a resource begun treating. Once a task is Work in progress, it is not involved in the reordering of tasks, unless its length is equal to the original task duration : it has not yet been processed.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close