Liking cljdoc? Tell your friends :D

milestones.dyna-scheduler


all-predecessors-complete?clj/s

(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 
raw docstring

all-tasks-complete?clj/s

(all-tasks-complete? tasks output-schedule)

errors-on-tasksclj/s

(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.
raw docstring

find-fireable-tasksclj/s

(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.
raw docstring

format-a-task-in-output-scheduleclj/s

(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
raw docstring

format-tasks-in-output-scheduleclj/s

(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....})
raw docstring

gen-work-flowclj/s

(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]
raw docstring

missing-prop-for-taskclj/s

(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
raw docstring

move-system-status-genclj/s

(move-system-status-gen tasks
                        reordering-properties
                        timer
                        resources-ids
                        output-schedule
                        workflows)

not-found-task?clj/s

(not-found-task? tasks task-id)

If task id is not in tasks, return true

If task id is not in tasks, return true
raw docstring

prepare-milestoneclj/s

(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
raw docstring

prepare-tasksclj/s

(prepare-tasks tasks)

Adds random user-ids and duration=1 to milestones tasks

Adds random user-ids and duration=1 to milestones tasks
raw docstring

propertiesclj/s

(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 ...}
raw docstring

reorder-tasksclj/s

(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.
raw docstring

run-schedulerclj/s

(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
raw docstring

run-scheduler-for-resourceclj/s

(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
raw docstring

scheduleclj/s

(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.
raw docstring

task-complete?clj/s

(task-complete? tasks output-schedule the-task-id)

Returns true if task is complete

Returns true if task is complete
raw docstring

task-completion-rateclj/s

(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. 
raw docstring

task-in-work-in-progress?clj/s

(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
raw docstring

task-sched-time-vectorclj/s

(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
raw docstring

tasks-for-resourceclj/s

(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)
raw docstring

tasks-w-empty-predecessorsclj/s

(tasks-w-empty-predecessors tasks)

tasks-w-missing-propertiesclj/s

(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
raw docstring

tasks-w-no-fieldclj/s

(tasks-w-no-field tasks field)

Which tasks don't have Field field.

Which tasks don't have Field field.
raw docstring

tasks-w-non-existent-predecessorsclj/s

(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
raw docstring

tasks-w-not-found-predecessorsclj/s

(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.
raw docstring

total-task-durationclj/s

(total-task-duration tasks)

Computes total tasks duration as if they were done sequentially.

Computes total tasks duration as if they were done sequentially.
raw docstring

work-flow-for-resourceclj/s

(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
raw docstring

work-in-progress-countclj/s

(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.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close