Top | ![]() |
![]() |
![]() |
![]() |
MrpConstraint * | constraint | Read / Write |
gboolean | critical | Read / Write |
gint | duration | Read / Write |
glong | finish | Read |
glong | latest-finish | Read |
glong | latest-start | Read |
gchar * | name | Read / Write |
gchar * | note | Read / Write |
gint | percent-complete | Read / Write |
gint | priority | Read / Write |
MrpTaskSched | sched | Read / Write |
glong | start | Read |
MrpTaskType | type | Read / Write |
gint | work | Read / Write |
void | assignment-added | Run Last |
void | assignment-removed | Run Last |
void | child-added | Run Last |
void | child-removed | Run Last |
void | relation-added | Run Last |
void | relation-removed | Run Last |
void | task-moved | Run Last |
Tasks have a name.
They form a tree: The work breakdown structure (WBS).
A task is estimated in term of work effort, the mythical man-month.
Some tasks are of the fixed-duration type. They still can consume resources. Some tasks are milestones. They take no time, no resource. They are just markers.
A task have a time constraint. By default, it starts as soon as possible.
Tasks are in logical precedence relationship with each other.
A task lists the assignments it is involved in.
During scheduling, start and finish times are calculated. CPM latest start and latest finish times are also calculated. Tasks belonging to the critical path are marked.
A task have a cost.
A task have a priority.
A task can retain its progress.
Because of non-working periods, work might begin after the task start.
#define UNIT_IVAL_GET_TIME(R) ((R->is_start?R->start:R->end))
Get start or end time of an interval.
void mrp_task_set_name (MrpTask *task
,const gchar *name
);
Sets the name of task
.
MrpRelation * mrp_task_add_predecessor (MrpTask *task
,MrpTask *predecessor
,MrpRelationType type
,glong lag
,GError **error
);
Adds a predecessor task to a task. Depending on type, the predecessor must be started or finished before task can be started or finished, with an optional lag/lead time.
void mrp_task_remove_predecessor (MrpTask *task
,MrpTask *predecessor
);
Removes a predecessor previously added to task.
MrpRelation * mrp_task_get_relation (MrpTask *task_a
,MrpTask *task_b
);
Fetches a relation between two tasks if it exists.
a MrpRelation representing the relation between task_a
and
task_b
or NULL
if they don't have any relation.
MrpRelation * mrp_task_get_predecessor_relation (MrpTask *task
,MrpTask *predecessor
);
Fetches a predecessor relation between task and it's predecessor.
MrpRelation * mrp_task_get_successor_relation (MrpTask *task
,MrpTask *successor
);
Fetches a successor relation between task and it's successor.
GList *
mrp_task_get_predecessor_relations (MrpTask *task
);
Fetches a list of predecessor relations to task
.
GList *
mrp_task_get_successor_relations (MrpTask *task
);
Fetches a list of successor relations to task
.
gboolean mrp_task_has_relation_to (MrpTask *task_a
,MrpTask *task_b
);
Checks if task_a
and task_b
has a relation, i.e. if task_a
is a
predecessor or successor of task_b
.
gboolean
mrp_task_has_relation (MrpTask *task
);
Checks if a task has any relations, i.e. predecessors or successors.
MrpTask *
mrp_task_get_first_child (MrpTask *task
);
Fetches the first child of task
.
MrpTask *
mrp_task_get_next_sibling (MrpTask *task
);
Fetches the next sibling of task
.
MrpTask *
mrp_task_get_prev_sibling (MrpTask *task
);
Fetches the previous sibling of task
.
guint
mrp_task_get_n_children (MrpTask *task
);
Fetches the number of children task
has.
MrpTask * mrp_task_get_nth_child (MrpTask *task
,guint n
);
Fetches the nth child of task
.
gint
mrp_task_get_position (MrpTask *task
);
Fetches the index or position of task
among its siblings.
mrptime
mrp_task_get_work_start (MrpTask *task
);
Retrieves the first time where work is performed of task
. This might be
different from the start time, if the start time is during non-working
time. In that case, the work start would be right after the non-working
interval.
mrptime
mrp_task_get_finish (MrpTask *task
);
Fetches the finish time of task
.
mrptime
mrp_task_get_latest_start (MrpTask *task
);
Retrieves the latest start time of task
, i.e. the latest time the task can
start without delaying the project.
mrptime
mrp_task_get_latest_finish (MrpTask *task
);
Retrieves the latest finish time of task
, i.e. the latest time the task can
finish without delaying the project.
gint
mrp_task_get_duration (MrpTask *task
);
Fetches the duration of task
. This differs from the calendar duration that
is retrieved by (finish - start).
gint
mrp_task_get_priority (MrpTask *task
);
Retrieves the priority of task
.
gboolean
mrp_task_is_dominant (MrpTask *task
);
Retrieves if task
is a dominant task.
GList *
mrp_task_get_unit_ivals (MrpTask *task
);
Retrieves the list of intervals of task
.
GList * mrp_task_set_unit_ivals (MrpTask *task
,GList *ivals
);
Set the list of intervals of task
.
GList *
mrp_task_get_assignments (MrpTask *task
);
Fetches a list of MrpAssignment.
gint
mrp_task_get_nres (MrpTask *task
);
Calculate the number of resources assigned to task.
MrpAssignment * mrp_task_get_assignment (MrpTask *task
,MrpResource *resource
);
retrieves the MrpAssignment associated with task
and resource
if the
resource is assigned to task
, or NULL
if there is no such assignment.
void
mrp_task_reset_constraint (MrpTask *task
);
Sets the constraint type to MRP_CONSTRAINT_ASAP and notifies listeners.
gfloat
mrp_task_get_cost (MrpTask *task
);
Calculates the cost to complete task
.
GList *
mrp_task_get_assigned_resources (MrpTask *task
);
Fetches a list of resources assigned to task
. The list needs to be freed
with g_list_free()
by caller.
gint mrp_task_compare (gconstpointer a
,gconstpointer b
);
Compares the name of the tasks, by calling strcmp()
on the names.
gshort
mrp_task_get_percent_complete (MrpTask *task
);
get task
percent complete.
typedef struct { gboolean is_start; mrptime start; mrptime end; gint units; gint units_full; gint res_n; } MrpUnitsInterval;
[2006-04-11T12:42:44Z] NOTE: moved from libplanner/mrp-task-manager.c to use the structure in the src/planner-gantt-row.c new fields are: units, units_full, res_n.
gboolean |
is start. |
|
mrptime |
start time. |
|
mrptime |
end time. |
|
gint |
worked units in the interval. |
|
gint |
expected worked units in the interval all resources that are working in the interval in the right percentage. |
|
gint |
number of expected resources working at the task in the interval. |
#define MRP_DOMINANT_PRIORITY 9999
Value of the magic priority of a dominant task.
“constraint”
property“constraint” MrpConstraint *
Task scheduling constraint.
Owner: MrpTask
Flags: Read / Write
“critical”
property“critical” gboolean
In critical path.
Owner: MrpTask
Flags: Read / Write
Default value: FALSE
“duration”
property“duration” gint
Duration of the task.
Owner: MrpTask
Flags: Read / Write
Allowed values: >= -1
Default value: 0
“finish”
property“finish” glong
Task finish time.
Owner: MrpTask
Flags: Read
Allowed values: >= 0
Default value: 0
“latest-finish”
property“latest-finish” glong
Latest task finish time.
Owner: MrpTask
Flags: Read
Allowed values: >= 0
Default value: 0
“latest-start”
property“latest-start” glong
Latest task start time.
Owner: MrpTask
Flags: Read
Allowed values: >= 0
Default value: 0
“name”
property“name” gchar *
Name of the task.
Owner: MrpTask
Flags: Read / Write
Default value: ""
“note”
property“note” gchar *
Note attached to the task.
Owner: MrpTask
Flags: Read / Write
Default value: ""
“percent-complete”
property“percent-complete” gint
Percent completed of task.
Owner: MrpTask
Flags: Read / Write
Allowed values: [0,100]
Default value: 0
“priority”
property“priority” gint
Priority of the task.
Owner: MrpTask
Flags: Read / Write
Allowed values: [0,9999]
Default value: 0
“sched”
property“sched” MrpTaskSched
Task scheduling type.
Owner: MrpTask
Flags: Read / Write
Default value: MRP_TASK_SCHED_FIXED_WORK
“start”
property“start” glong
Task Start time.
Owner: MrpTask
Flags: Read
Allowed values: >= 0
Default value: 0
“type”
property“type” MrpTaskType
Task type.
Owner: MrpTask
Flags: Read / Write
Default value: MRP_TASK_TYPE_NORMAL
“work”
property“work” gint
Task work.
Owner: MrpTask
Flags: Read / Write
Allowed values: >= -1
Default value: 0
“assignment-added”
signalvoid user_function (MrpTask *task, MrpAssignment *assignment, gpointer user_data)
emitted when assignment
is added.
task |
the object which received the signal. |
|
assignment |
the added MrpAssignment. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“assignment-removed”
signalvoid user_function (MrpTask *task, MrpAssignment *assignment, gpointer user_data)
emitted when assignment
is removed.
task |
the object which received the signal. |
|
assignment |
the removed MrpAssignment. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“child-added”
signalvoid user_function (MrpTask *task, gpointer user_data)
emitted when a child is added.
task |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“child-removed”
signalvoid user_function (MrpTask *task, gpointer user_data)
emitted when a child is removed.
task |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“relation-added”
signalvoid user_function (MrpTask *task, gpointer relation, gpointer user_data)
emitted when relation
is added.
task |
the object which received the signal. |
|
relation |
the added MrpRelation. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“relation-removed”
signalvoid user_function (MrpTask *task, gpointer relation, gpointer user_data)
emitted when relation
is removed.
task |
the object which received the signal. |
|
relation |
the removed MrpRelation |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“task-moved”
signalvoid user_function (MrpTask *task, MrpTask *other_task, gint arg2, gpointer user_data)
emitted when other_task
is moved.
task |
the object which received the signal. |
|
other_task |
another MrpTask. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last