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)
virtual bool effortMetError () const
Progressprogress ()
void printDebug (bool children, QCString indent)

Classes

struct  Progress

Member Function Documentation

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.

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.

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::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.

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

Load from document.

Reimplemented from KPlato::Node.

Definition at line 172 of file kpttask.cc.

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

Save to document.

Implements KPlato::Node.

Definition at line 281 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 330 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 342 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 351 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 366 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 381 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 396 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 415 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 430 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 444 of file kpttask.cc.

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

Planned cost on date.

Reimplemented from KPlato::Node.

Definition at line 458 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 472 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 486 of file kpttask.cc.

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

Actual cost on date.

Reimplemented from KPlato::Node.

Definition at line 500 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 514 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 529 of file kpttask.cc.

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

Cost performance index.

Reimplemented from KPlato::Node.

Definition at line 544 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 569 of file kpttask.cc.

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

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

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

Implements KPlato::Node.

Definition at line 625 of file kpttask.cc.

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

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

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

Implements KPlato::Node.

Definition at line 752 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 ref m_startTime, ref m_endTime and ref m_duration, Assumes ref calculateForward() and ref calculateBackward() has been run.

Parameters:
earliest 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 879 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 ref m_startTime, ref m_endTime and ref m_duration, Assumes ref calculateForward() and ref 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 1074 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 1240 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 1262 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 1367 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 1380 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 1396 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 1404 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 1425 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.

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::startFloat (  )  [inline]

Return the duration from Early Start to Late Start.

Definition at line 234 of file kpttask.h.

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.

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

A task is critical if there is no positive float.

Definition at line 1456 of file kpttask.cc.

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

Calculate critical path.

Reimplemented from KPlato::Node.

Definition at line 1464 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 1515 of file kpttask.cc.


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