kplato

KPlato::Task Class Reference

#include <kpttask.h>

Inheritance diagram for KPlato::Task:

KPlato::Node List of all members.

Detailed Description

A task in the scheduling software is represented by this class.

A task can be anything from 'build house' to 'drill hole' It will always mean an activity.

Definition at line 40 of file kpttask.h.


Public Member Functions

 Task (Node *parent=0)
 Task (Task &task, Node *parent=0)
 ~Task ()
virtual int type () const
DurationgetExpectedDuration ()
DurationgetRandomDuration ()
ResourceGroupRequestresourceGroupRequest (ResourceGroup *group) const
void clearResourceRequests ()
void addRequest (ResourceGroup *group, int numResources)
void addRequest (ResourceGroupRequest *request)
void takeRequest (ResourceGroupRequest *request)
int units () const
int workUnits () const
void makeAppointments ()
void calcResourceOverbooked ()
void setConstraint (Node::ConstraintType type)
virtual bool load (QDomElement &element, Project &project)
virtual void save (QDomElement &element) const
virtual void saveAppointments (QDomElement &element, long id) const
virtual EffortCostMap plannedEffortCostPrDay (const QDate &start, const QDate &end) const
virtual Duration plannedEffort ()
virtual Duration plannedEffort (const QDate &date)
virtual Duration plannedEffortTo (const QDate &date)
virtual Duration actualEffort ()
virtual Duration actualEffort (const QDate &date)
virtual Duration actualEffortTo (const QDate &date)
virtual double plannedCost ()
virtual double plannedCost (const QDate &)
virtual double plannedCostTo (const QDate &)
virtual double actualCost ()
virtual double actualCost (const QDate &)
virtual double actualCostTo (const QDate &)
double effortPerformanceIndex (const QDate &date, bool *error=0)
double costPerformanceIndex (const QDate &date, bool *error=0)
void initiateCalculation (Schedule &sch)
void initiateCalculationLists (QPtrList< Node > &startnodes, QPtrList< Node > &endnodes, QPtrList< Node > &summarytasks)
DateTime calculateForward (int use)
DateTime calculateBackward (int use)
DateTime scheduleForward (const DateTime &earliest, int use)
DateTime scheduleBackward (const DateTime &latest, int use)
void adjustSummarytask ()
Duration calcDuration (const DateTime &time, const Duration &effort, bool backward)
void clearProxyRelations ()
void addParentProxyRelations (QPtrList< Relation > &list)
void addChildProxyRelations (QPtrList< Relation > &list)
void addParentProxyRelation (Node *node, const Relation *rel)
void addChildProxyRelation (Node *node, const Relation *rel)
bool isEndNode () const
bool isStartNode () const
virtual DateTime workStartTime () const
virtual DateTime workEndTime () const
Duration positiveFloat ()
Duration negativeFloat ()
Duration freeFloat ()
Duration startFloat ()
Duration finishFloat ()
virtual bool isCritical ()
virtual bool calcCriticalPath (bool fromEnd)
virtual void setCurrentSchedule (long id)
Progressprogress ()
void printDebug (bool children, QCString indent)

Classes

struct  Progress

Member Function Documentation

double KPlato::Task::actualCost const QDate &   )  [virtual]
 

Actual cost on date.

Reimplemented from KPlato::Node.

Definition at line 496 of file kpttask.cc.

double KPlato::Task::actualCost  )  [virtual]
 

Returns the actaually reported cost for this task (or subtasks).

Reimplemented from KPlato::Node.

Definition at line 482 of file kpttask.cc.

double KPlato::Task::actualCostTo const QDate &   )  [virtual]
 

Actual cost up to and including date.

Reimplemented from KPlato::Node.

Definition at line 510 of file kpttask.cc.

Duration KPlato::Task::actualEffort const QDate &  date  )  [virtual]
 

Returns the total actual effort for this task (or subtasks) on date.

Reimplemented from KPlato::Node.

Definition at line 411 of file kpttask.cc.

Duration KPlato::Task::actualEffort  )  [virtual]
 

Returns the total actual effort for this task (or subtasks).

Reimplemented from KPlato::Node.

Definition at line 392 of file kpttask.cc.

Duration KPlato::Task::actualEffortTo const QDate &  date  )  [virtual]
 

Returns the actual effort up to and including date.

Reimplemented from KPlato::Node.

Definition at line 426 of file kpttask.cc.

void KPlato::Task::adjustSummarytask  )  [virtual]
 

Summarytasks (with milestones) need special treatment because milestones are always 'glued' to their predecessors.

Implements KPlato::Node.

Definition at line 1274 of file kpttask.cc.

bool KPlato::Task::calcCriticalPath bool  fromEnd  )  [virtual]
 

Calculate critical path.

Reimplemented from KPlato::Node.

Definition at line 1489 of file kpttask.cc.

Duration KPlato::Task::calcDuration const DateTime time,
const Duration effort,
bool  backward
[virtual]
 

Return the duration calculated on bases of the requested resources.

Reimplemented from KPlato::Node.

Definition at line 1296 of file kpttask.cc.

void KPlato::Task::calcResourceOverbooked  )  [virtual]
 

Calculates if the assigned resource is overbooked within the duration of this task.

Reimplemented from KPlato::Node.

Definition at line 161 of file kpttask.cc.

DateTime KPlato::Task::calculateBackward int  use  )  [virtual]
 

Calculates m_durationBackward from latestFinish and returns the resulting start time, which will be used as the predecessors latestFinish.

Parameters:
use Calculate using expected-, optimistic- or pessimistic estimate.

Implements KPlato::Node.

Definition at line 752 of file kpttask.cc.

DateTime KPlato::Task::calculateForward int  use  )  [virtual]
 

Calculates m_durationForward from earliestStart and returns the resulting end time, which will be used as the succesors earliestStart.

Parameters:
use Calculate using expected-, optimistic- or pessimistic estimate.

Implements KPlato::Node.

Definition at line 621 of file kpttask.cc.

double KPlato::Task::costPerformanceIndex const QDate &  date,
bool *  error = 0
 

Cost performance index.

Reimplemented from KPlato::Node.

Definition at line 540 of file kpttask.cc.

double KPlato::Task::effortPerformanceIndex const QDate &  date,
bool *  error = 0
 

Effort based performance index.

Reimplemented from KPlato::Node.

Definition at line 525 of file kpttask.cc.

Duration KPlato::Task::finishFloat  )  [inline]
 

Return the duration the task has at its finish before a successor task starts.

This is the difference between the start time of the successor and the finish time of this task.

Definition at line 240 of file kpttask.h.

Duration KPlato::Task::freeFloat  )  [inline]
 

Return the duration by which an activity can be delayed or extended without affecting the start of any succeeding activity.

Definition at line 230 of file kpttask.h.

Duration * KPlato::Task::getExpectedDuration  )  [virtual]
 

Returns the (previously) calculated duration.

The caller must delete returned object.

Implements KPlato::Node.

Definition at line 88 of file kpttask.cc.

Duration * KPlato::Task::getRandomDuration  )  [virtual]
 

Instead of using the expected duration, generate a random value using the Distribution of each Task.

This can be used for Monte-Carlo estimation of Project duration.

Implements KPlato::Node.

Definition at line 94 of file kpttask.cc.

void KPlato::Task::initiateCalculationLists QPtrList< Node > &  startnodes,
QPtrList< Node > &  endnodes,
QPtrList< Node > &  summarytasks
[virtual]
 

Sets up the lists used for calculation.

This includes adding summarytasks relations to subtasks and lists for start- and endnodes.

Implements KPlato::Node.

Definition at line 565 of file kpttask.cc.

bool KPlato::Task::isCritical  )  [virtual]
 

A task is critical if there is no positive float.

Definition at line 1481 of file kpttask.cc.

bool KPlato::Task::isEndNode  )  const [virtual]
 

Check if this node has any dependent child nodes.

Reimplemented from KPlato::Node.

Definition at line 1401 of file kpttask.cc.

bool KPlato::Task::isStartNode  )  const [virtual]
 

Check if this node has any dependent parent nodes.

Reimplemented from KPlato::Node.

Definition at line 1414 of file kpttask.cc.

bool KPlato::Task::load QDomElement &  element,
Project project
[virtual]
 

Load from document.

Reimplemented from KPlato::Node.

Definition at line 172 of file kpttask.cc.

Duration KPlato::Task::negativeFloat  )  [inline]
 

Return the duration by which the duration of an activity or path has to be reduced in order to fullfill a timing constraint.

Definition at line 225 of file kpttask.h.

double KPlato::Task::plannedCost const QDate &   )  [virtual]
 

Planned cost on date.

Reimplemented from KPlato::Node.

Definition at line 454 of file kpttask.cc.

double KPlato::Task::plannedCost  )  [virtual]
 

Returns the total planned cost for this task (or subtasks).

Reimplemented from KPlato::Node.

Definition at line 440 of file kpttask.cc.

double KPlato::Task::plannedCostTo const QDate &   )  [virtual]
 

Planned cost up to and including date.

Reimplemented from KPlato::Node.

Definition at line 468 of file kpttask.cc.

Duration KPlato::Task::plannedEffort const QDate &  date  )  [virtual]
 

Returns the total planned effort for this task (or subtasks) on date.

Reimplemented from KPlato::Node.

Definition at line 362 of file kpttask.cc.

Duration KPlato::Task::plannedEffort  )  [virtual]
 

Returns the total planned effort for this task (or subtasks).

Reimplemented from KPlato::Node.

Definition at line 347 of file kpttask.cc.

EffortCostMap KPlato::Task::plannedEffortCostPrDay const QDate &  start,
const QDate &  end
const [virtual]
 

Returns a list of planned effort and cost for this task for the interval start, end inclusive.

Implements KPlato::Node.

Definition at line 338 of file kpttask.cc.

Duration KPlato::Task::plannedEffortTo const QDate &  date  )  [virtual]
 

Returns the planned effort up to and including date.

Reimplemented from KPlato::Node.

Definition at line 377 of file kpttask.cc.

Duration KPlato::Task::positiveFloat  ) 
 

Return the duration that an activity's start can be delayed without affecting the project completion date.

An activity with positive float is not on the critical path.

Definition at line 1459 of file kpttask.cc.

ResourceGroupRequest * KPlato::Task::resourceGroupRequest ResourceGroup group  )  const
 

Return the resource request made to group (There should be only one).

Definition at line 98 of file kpttask.cc.

void KPlato::Task::save QDomElement &  element  )  const [virtual]
 

Save to document.

Implements KPlato::Node.

Definition at line 277 of file kpttask.cc.

void KPlato::Task::saveAppointments QDomElement &  element,
long  id
const [virtual]
 

Save appointments for schedule with id.

Reimplemented from KPlato::Node.

Definition at line 326 of file kpttask.cc.

DateTime KPlato::Task::scheduleBackward const DateTime latest,
int  use
[virtual]
 

Schedules the task within the limits of earliestStart and latestFinish.

Calculates m_startTime, m_endTime and m_duration, Assumes calculateForward() and calculateBackward() has been run.

Parameters:
latest The task is not scheduled to end later than this
use Calculate using expected-, optimistic- or pessimistic estimate.
Returns:
The tasks starttime which can be used for scheduling the predeccessor.

Implements KPlato::Node.

Definition at line 1088 of file kpttask.cc.

DateTime KPlato::Task::scheduleForward const DateTime earliest,
int  use
[virtual]
 

Schedules the task within the limits of earliestStart and latestFinish.

Calculates m_startTime, m_endTime and m_duration, Assumes calculateForward() and calculateBackward() has been run.

Parameters:
latest The task is not scheduled to start earlier than this
use Calculate using expected-, optimistic- or pessimistic estimate.
Returns:
The tasks endtime which can be used for scheduling the successor.

Implements KPlato::Node.

Definition at line 885 of file kpttask.cc.

void KPlato::Task::setCurrentSchedule long  id  )  [virtual]
 

Set current schedule to schedule with identity id, for me nd my children.

Reimplemented from KPlato::Node.

Definition at line 1540 of file kpttask.cc.

Duration KPlato::Task::startFloat  )  [inline]
 

Return the duration from Early Start to Late Start.

Definition at line 234 of file kpttask.h.

int KPlato::Task::type  )  const [virtual]
 

Return task type. Can be Type_Task, Type_Summarytask ot Type_Milestone.

Implements KPlato::Node.

Definition at line 74 of file kpttask.cc.

DateTime KPlato::Task::workEndTime  )  const [virtual]
 

Return the time when work can actually finish on this task.

This will be the time assigned resources can end work in accordance with their calendar, or if no resources have been assigned, the scheduled endtime is used.

Reimplemented from KPlato::Node.

Definition at line 1438 of file kpttask.cc.

DateTime KPlato::Task::workStartTime  )  const [virtual]
 

Return the time when work can actually start on this task.

This will be the time assigned resources can start work in accordance with their calendar, or if no resources have been assigned, the scheduled starttime is used.

Reimplemented from KPlato::Node.

Definition at line 1430 of file kpttask.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys