KPlato::Task Class Reference

#include <kpttask.h>

Inherits KPlato::Node.

Inheritance diagram for KPlato::Task:

[legend]
List of all members.

Public Member Functions

 Task (Node *parent=0)
 Task (Task &task, Node *parent=0)
 ~Task ()
virtual int type () const
 Return task type. Can be Type_Task, Type_Summarytask ot Type_Milestone.
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)
 Load from document.
virtual void save (QDomElement &element) const
 Save to document.
virtual void saveAppointments (QDomElement &element, long id) const
 Save appointments for schedule with id.
virtual EffortCostMap plannedEffortCostPrDay (const QDate &start, const QDate &end) const
virtual Duration plannedEffort ()
 Returns the total planned effort for this task (or subtasks).
virtual Duration plannedEffort (const QDate &date)
 Returns the total planned effort for this task (or subtasks) on date.
virtual Duration plannedEffortTo (const QDate &date)
 Returns the planned effort up to and including date.
virtual Duration actualEffort ()
 Returns the total actual effort for this task (or subtasks).
virtual Duration actualEffort (const QDate &date)
 Returns the total actual effort for this task (or subtasks) on date.
virtual Duration actualEffortTo (const QDate &date)
 Returns the actual effort up to and including date.
virtual double plannedCost ()
virtual double plannedCost (const QDate &)
 Planned cost on date.
virtual double plannedCostTo (const QDate &)
 Planned cost up to and including date.
virtual double actualCost ()
virtual double actualCost (const QDate &)
 Actual cost on date.
virtual double actualCostTo (const QDate &)
 Actual cost up to and including date.
double effortPerformanceIndex (const QDate &date, bool *error=0)
 Effort based performance index.
double costPerformanceIndex (const QDate &date, bool *error=0)
 Cost performance index.
void initiateCalculation (Schedule &sch)
void initiateCalculationLists (QList< Node * > &startnodes, QList< Node * > &endnodes, QList< 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 (QList< Relation * > &list)
void addChildProxyRelations (QList< Relation * > &list)
void addParentProxyRelation (Node *node, const Relation *rel)
void addChildProxyRelation (Node *node, const Relation *rel)
bool isEndNode () const
 Check if this node has any dependent child nodes.
bool isStartNode () const
 Check if this node has any dependent parent nodes.
virtual DateTime workStartTime () const
virtual DateTime workEndTime () const
Duration positiveFloat ()
Duration negativeFloat ()
Duration freeFloat ()
Duration startFloat ()
Duration finishFloat ()
virtual bool isCritical () const
 A task is critical if there is no positive float.
virtual bool calcCriticalPath (bool fromEnd)
 Calculate critical path.
virtual void setCurrentSchedule (long id)
 Set current schedule to schedule with identity id, for me nd my children.
virtual bool effortMetError () const
Progressprogress ()
void printDebug (bool children, QByteArray indent)

Private Member Functions

DateTime calculateSuccessors (const QList< Relation * > &list, int use)
DateTime calculatePredeccessors (const QList< Relation * > &list, int use)
DateTime scheduleSuccessors (const QList< Relation * > &list, int use)
DateTime schedulePredeccessors (const QList< Relation * > &list, int use)
DateTime workStartAfter (const DateTime &dt)
DateTime workFinishBefore (const DateTime &dt)

Private Attributes

QList< ResourceGroup * > m_resource
ResourceRequestCollectionm_requests
QList< Relation * > m_parentProxyRelations
QList< Relation * > m_childProxyRelations
Progress m_progress

Classes

struct  Progress

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.


Constructor & Destructor Documentation

KPlato::Task::Task ( Node parent = 0  ) 

Definition at line 40 of file kpttask.cc.

References KPlato::Node::leader(), KPlato::Node::m_effort, KPlato::Node::m_leader, KPlato::Node::m_parent, m_requests, KPlato::Effort::setOptimisticRatio(), and KPlato::Effort::setPessimisticRatio().

Referenced by load().

KPlato::Task::Task ( Task task,
Node parent = 0 
)

Definition at line 52 of file kpttask.cc.

References KPlato::Node::effort(), KPlato::Node::m_effort, and m_requests.

KPlato::Task::~Task (  ) 

Definition at line 63 of file kpttask.cc.

References m_childProxyRelations, KPlato::Node::m_effort, m_parentProxyRelations, m_resource, and KPlato::Node::m_schedules.


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 81 of file kpttask.cc.

References KPlato::Node::effort(), KPlato::Node::numChildren(), KPlato::Node::Type_Milestone, KPlato::Node::Type_Summarytask, and KPlato::Node::Type_Task.

Referenced by actualCost(), actualCostTo(), actualEffort(), actualEffortTo(), addChildProxyRelation(), addChildProxyRelations(), addParentProxyRelation(), addParentProxyRelations(), adjustSummarytask(), calculateBackward(), calculateForward(), initiateCalculationLists(), makeAppointments(), plannedCost(), plannedCostTo(), plannedEffort(), plannedEffortTo(), KPlato::GanttView::popupMenuRequested(), positiveFloat(), printDebug(), scheduleBackward(), and scheduleForward().

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

Returns the (previously) calculated duration. The caller must delete returned object.

Implements KPlato::Node.

Definition at line 95 of file kpttask.cc.

References KPlato::Schedule::duration, and KPlato::Node::m_currentSchedule.

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 101 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 105 of file kpttask.cc.

References KPlato::ResourceRequestCollection::find(), and m_requests.

Referenced by KPlato::GroupLVItem::GroupLVItem().

void KPlato::Task::clearResourceRequests (  ) 

Definition at line 111 of file kpttask.cc.

References KPlato::ResourceRequestCollection::clear(), and m_requests.

void KPlato::Task::addRequest ( ResourceGroup group,
int  numResources 
)

Definition at line 116 of file kpttask.cc.

Referenced by KPlato::AddResourceGroupRequestCmd::execute(), load(), and KPlato::RemoveResourceGroupRequestCmd::unexecute().

void KPlato::Task::addRequest ( ResourceGroupRequest request  ) 

Definition at line 120 of file kpttask.cc.

References KPlato::ResourceRequestCollection::addRequest(), and m_requests.

void KPlato::Task::takeRequest ( ResourceGroupRequest request  ) 

Definition at line 126 of file kpttask.cc.

References KPlato::ResourceRequestCollection::isEmpty(), m_requests, and KPlato::ResourceRequestCollection::takeRequest().

Referenced by KPlato::RemoveResourceGroupRequestCmd::execute(), and KPlato::AddResourceGroupRequestCmd::unexecute().

int KPlato::Task::units (  )  const

Definition at line 136 of file kpttask.cc.

References m_requests, and KPlato::ResourceRequestCollection::units().

Referenced by printDebug().

int KPlato::Task::workUnits (  )  const

Definition at line 142 of file kpttask.cc.

References m_requests, and KPlato::ResourceRequestCollection::workUnits().

Referenced by printDebug().

void KPlato::Task::makeAppointments (  )  [virtual]

Reimplemented from KPlato::Node.

Definition at line 148 of file kpttask.cc.

References KPlato::Node::m_currentSchedule, KPlato::Node::m_nodes, m_requests, type(), KPlato::Node::Type_Milestone, KPlato::Node::Type_Summarytask, and KPlato::Node::Type_Task.

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 167 of file kpttask.cc.

References KPlato::Schedule::calcResourceOverbooked(), and KPlato::Node::m_currentSchedule.

void KPlato::Task::setConstraint ( Node::ConstraintType  type  ) 

Reimplemented from KPlato::Node.

Definition at line 173 of file kpttask.cc.

References KPlato::Node::m_constraint.

Referenced by KPlato::Config::load().

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

Load from document.

Reimplemented from KPlato::Node.

Definition at line 178 of file kpttask.cc.

References addRequest(), KPlato::Node::addSchedule(), KPlato::Project::addSubTask(), KPlato::Node::constraint(), KPlato::Task::Progress::finished, KPlato::Task::Progress::finishTime, KPlato::Duration::fromString(), KPlato::DateTime::fromString(), KPlato::Effort::load(), KPlato::Node::m_constraint, KPlato::Node::m_constraintEndTime, KPlato::Node::m_constraintStartTime, KPlato::Node::m_description, KPlato::Node::m_effort, KPlato::Node::m_id, KPlato::Node::m_leader, KPlato::Node::m_name, m_progress, KPlato::Node::m_shutdownCost, KPlato::Node::m_startupCost, KPlato::Node::m_wbs, KPlato::Task::Progress::percentFinished, KPlato::Task::Progress::remainingEffort, KPlato::Node::setConstraint(), KPlato::Task::Progress::started, KPlato::Task::Progress::startTime, Task(), and KPlato::Task::Progress::totalPerformed.

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

Save to document.

Implements KPlato::Node.

Definition at line 287 of file kpttask.cc.

References KPlato::Node::childNode(), KPlato::Node::constraintToString(), KPlato::Task::Progress::finished, KPlato::Task::Progress::finishTime, KPlato::Schedule::isDeleted(), KPlato::Node::m_constraintEndTime, KPlato::Node::m_constraintStartTime, KPlato::Node::m_description, KPlato::Node::m_effort, KPlato::Node::m_id, KPlato::Node::m_leader, KPlato::Node::m_name, m_progress, m_requests, KPlato::Node::m_schedules, KPlato::Node::m_shutdownCost, KPlato::Node::m_startupCost, KPlato::Node::m_wbs, KPlato::Node::numChildren(), KPlato::Task::Progress::percentFinished, KPlato::Task::Progress::remainingEffort, KPlato::Node::save(), KPlato::ResourceRequestCollection::save(), KPlato::Effort::save(), KPlato::Schedule::saveXML(), KPlato::Task::Progress::started, KPlato::Task::Progress::startTime, KPlato::Duration::toString(), and KPlato::Task::Progress::totalPerformed.

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

Save appointments for schedule with id.

Reimplemented from KPlato::Node.

Definition at line 335 of file kpttask.cc.

References KPlato::Node::findSchedule(), KPlato::Node::m_nodes, KPlato::Node::saveAppointments(), and KPlato::Schedule::saveAppointments().

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 346 of file kpttask.cc.

References KPlato::Node::m_currentSchedule, and KPlato::Schedule::plannedEffortCostPrDay().

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

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

Reimplemented from KPlato::Node.

Definition at line 355 of file kpttask.cc.

References KPlato::Node::childNodeIterator(), KPlato::Node::m_currentSchedule, KPlato::Schedule::plannedEffort(), type(), and KPlato::Node::Type_Summarytask.

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 369 of file kpttask.cc.

References KPlato::Node::childNodeIterator(), KPlato::Node::m_currentSchedule, KPlato::Schedule::plannedEffort(), type(), and KPlato::Node::Type_Summarytask.

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

Returns the planned effort up to and including date.

Reimplemented from KPlato::Node.

Definition at line 383 of file kpttask.cc.

References KPlato::Node::childNodeIterator(), KPlato::Node::m_currentSchedule, KPlato::Schedule::plannedEffortTo(), type(), and KPlato::Node::Type_Summarytask.

Referenced by effortPerformanceIndex().

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

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

Reimplemented from KPlato::Node.

Definition at line 397 of file kpttask.cc.

References KPlato::Node::childNodeIterator(), m_progress, KPlato::Task::Progress::totalPerformed, type(), and KPlato::Node::Type_Summarytask.

Referenced by KPlato::TaskProgressPanel::TaskProgressPanel().

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.

References KPlato::Schedule::actualEffort(), KPlato::Node::childNodeIterator(), KPlato::Node::m_currentSchedule, type(), and KPlato::Node::Type_Summarytask.

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

Returns the actual effort up to and including date.

Reimplemented from KPlato::Node.

Definition at line 429 of file kpttask.cc.

References KPlato::Schedule::actualEffortTo(), KPlato::Node::childNodeIterator(), KPlato::Node::m_currentSchedule, type(), and KPlato::Node::Type_Summarytask.

Referenced by effortPerformanceIndex().

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

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

Reimplemented from KPlato::Node.

Definition at line 442 of file kpttask.cc.

References KPlato::Node::childNodeIterator(), KPlato::Node::m_currentSchedule, KPlato::Schedule::plannedCost(), type(), and KPlato::Node::Type_Summarytask.

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

Planned cost on date.

Reimplemented from KPlato::Node.

Definition at line 455 of file kpttask.cc.

References KPlato::Node::childNodeIterator(), KPlato::Node::m_currentSchedule, KPlato::Schedule::plannedCost(), type(), and KPlato::Node::Type_Summarytask.

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.

References KPlato::Node::childNodeIterator(), KPlato::Node::m_currentSchedule, KPlato::Schedule::plannedCostTo(), type(), and KPlato::Node::Type_Summarytask.

Referenced by costPerformanceIndex().

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

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

Reimplemented from KPlato::Node.

Definition at line 481 of file kpttask.cc.

References KPlato::Schedule::actualCost(), KPlato::Node::childNodeIterator(), KPlato::Node::m_currentSchedule, type(), and KPlato::Node::Type_Summarytask.

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

Actual cost on date.

Reimplemented from KPlato::Node.

Definition at line 494 of file kpttask.cc.

References KPlato::Schedule::actualCost(), KPlato::Node::childNodeIterator(), KPlato::Node::m_currentSchedule, type(), and KPlato::Node::Type_Summarytask.

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

Actual cost up to and including date.

Reimplemented from KPlato::Node.

Definition at line 507 of file kpttask.cc.

References KPlato::Schedule::actualCostTo(), KPlato::Node::childNodeIterator(), KPlato::Node::m_currentSchedule, type(), and KPlato::Node::Type_Summarytask.

Referenced by costPerformanceIndex().

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

Effort based performance index.

Reimplemented from KPlato::Node.

Definition at line 521 of file kpttask.cc.

References actualEffortTo(), m_progress, KPlato::Task::Progress::percentFinished, plannedEffortTo(), KPlato::Duration::toDouble(), and KPlato::Duration::zeroDuration.

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

Cost performance index.

Reimplemented from KPlato::Node.

Definition at line 536 of file kpttask.cc.

References actualCostTo(), m_progress, KPlato::Task::Progress::percentFinished, plannedCostTo(), and KPlato::Duration::zeroDuration.

void KPlato::Task::initiateCalculation ( Schedule sch  )  [virtual]

Reimplemented from KPlato::Node.

Definition at line 550 of file kpttask.cc.

References clearProxyRelations(), KPlato::Node::createSchedule(), KPlato::Node::initiateCalculation(), KPlato::Schedule::initiateCalculation(), KPlato::Node::m_currentSchedule, KPlato::Node::m_visitedBackward, and KPlato::Node::m_visitedForward.

void KPlato::Task::initiateCalculationLists ( QList< Node * > &  startnodes,
QList< Node * > &  endnodes,
QList< 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 561 of file kpttask.cc.

References KPlato::Node::addChildProxyRelations(), KPlato::Node::addParentProxyRelations(), KPlato::Node::dependChildNodes(), KPlato::Node::dependParentNodes(), KPlato::Node::initiateCalculationLists(), isEndNode(), isStartNode(), KPlato::Node::m_nodes, type(), and KPlato::Node::Type_Summarytask.

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 614 of file kpttask.cc.

References KPlato::Node::ALAP, KPlato::Node::ASAP, calculatePredeccessors(), KPlato::Node::constraint(), KPlato::Node::dependParentNodes(), KPlato::Node::duration(), KPlato::Schedule::earliestStart, KPlato::Effort::effort(), KPlato::Node::FinishNotLater, KPlato::Node::FixedInterval, KPlato::Node::m_constraintEndTime, KPlato::Node::m_constraintStartTime, KPlato::Node::m_currentSchedule, KPlato::Node::m_durationForward, KPlato::Node::m_effort, KPlato::Node::m_name, m_parentProxyRelations, KPlato::Node::m_visitedForward, KPlato::Node::MustFinishOn, KPlato::Node::MustStartOn, KPlato::Node::StartNotEarlier, type(), KPlato::Node::Type_Milestone, KPlato::Node::Type_Summarytask, KPlato::Node::Type_Task, workStartAfter(), and KPlato::Duration::zeroDuration.

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 740 of file kpttask.cc.

References KPlato::Node::ALAP, KPlato::Node::ASAP, calculateSuccessors(), KPlato::Node::constraint(), KPlato::Node::dependChildNodes(), KPlato::Node::duration(), KPlato::Effort::effort(), KPlato::Node::FinishNotLater, KPlato::Node::FixedInterval, KPlato::Schedule::latestFinish, m_childProxyRelations, KPlato::Node::m_constraintEndTime, KPlato::Node::m_constraintStartTime, KPlato::Node::m_currentSchedule, KPlato::Node::m_durationBackward, KPlato::Node::m_effort, KPlato::Node::m_name, KPlato::Node::m_visitedBackward, KPlato::Node::MustFinishOn, KPlato::Node::MustStartOn, KPlato::Node::StartNotEarlier, type(), KPlato::Node::Type_Milestone, KPlato::Node::Type_Summarytask, KPlato::Node::Type_Task, workFinishBefore(), and KPlato::Duration::zeroDuration.

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 865 of file kpttask.cc.

References KPlato::Node::ALAP, KPlato::Node::ASAP, KPlato::Node::dependParentNodes(), KPlato::Node::duration(), KPlato::Schedule::duration, KPlato::Schedule::earliestStart, KPlato::Effort::effort(), KPlato::Schedule::endTime, KPlato::Node::FinishNotLater, KPlato::Node::FixedInterval, KPlato::Schedule::latestFinish, KPlato::Node::m_constraint, KPlato::Node::m_constraintEndTime, KPlato::Node::m_constraintStartTime, KPlato::Node::m_currentSchedule, KPlato::Node::m_durationBackward, KPlato::Node::m_durationForward, KPlato::Node::m_effort, KPlato::Node::m_name, m_parentProxyRelations, m_requests, KPlato::Node::m_visitedForward, KPlato::Node::MustFinishOn, KPlato::Node::MustStartOn, KPlato::Schedule::notScheduled, KPlato::ResourceRequestCollection::reserve(), schedulePredeccessors(), KPlato::Schedule::schedulingError, KPlato::Node::StartNotEarlier, KPlato::Node::startTime(), KPlato::Schedule::startTime, type(), KPlato::Node::Type_Milestone, KPlato::Node::Type_Summarytask, KPlato::Node::Type_Task, KPlato::Schedule::workEndTime, workStartAfter(), KPlato::Schedule::workStartTime, and KPlato::Duration::zeroDuration.

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 1059 of file kpttask.cc.

References KPlato::Node::ALAP, KPlato::Node::ASAP, KPlato::Node::dependChildNodes(), KPlato::Node::duration(), KPlato::Schedule::duration, KPlato::Schedule::earliestStart, KPlato::Effort::effort(), KPlato::Node::endTime(), KPlato::Schedule::endTime, KPlato::Node::FinishNotLater, KPlato::Node::FixedInterval, KPlato::Schedule::latestFinish, m_childProxyRelations, KPlato::Node::m_constraint, KPlato::Node::m_constraintEndTime, KPlato::Node::m_constraintStartTime, KPlato::Node::m_currentSchedule, KPlato::Node::m_durationBackward, KPlato::Node::m_durationForward, KPlato::Node::m_effort, KPlato::Node::m_name, m_requests, KPlato::Node::m_visitedBackward, KPlato::Node::MustFinishOn, KPlato::Node::MustStartOn, KPlato::Schedule::notScheduled, KPlato::ResourceRequestCollection::reserve(), scheduleSuccessors(), KPlato::Schedule::schedulingError, KPlato::Node::StartNotEarlier, KPlato::Schedule::startTime, type(), KPlato::Node::Type_Milestone, KPlato::Node::Type_Summarytask, KPlato::Node::Type_Task, KPlato::Schedule::workEndTime, workFinishBefore(), KPlato::Schedule::workStartTime, and KPlato::Duration::zeroDuration.

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 1225 of file kpttask.cc.

References KPlato::Node::adjustSummarytask(), KPlato::Schedule::duration, KPlato::Schedule::earliestStart, KPlato::Schedule::endTime, KPlato::Node::endTime(), KPlato::Schedule::latestFinish, KPlato::Node::m_currentSchedule, KPlato::Node::m_nodes, KPlato::Schedule::notScheduled, KPlato::Schedule::startTime, KPlato::Node::startTime(), type(), and KPlato::Node::Type_Summarytask.

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 1246 of file kpttask.cc.

References KPlato::ResourceRequestCollection::duration(), KPlato::Node::effort(), KPlato::ResourceRequestCollection::isEmpty(), KPlato::Node::m_currentSchedule, KPlato::Node::m_effort, m_requests, KPlato::Schedule::resourceError, KPlato::Schedule::resourceNotAvailable, KPlato::Effort::type(), KPlato::Effort::Type_Effort, KPlato::Effort::Type_FixedDuration, and KPlato::Duration::zeroDuration.

void KPlato::Task::clearProxyRelations (  )  [virtual]

Reimplemented from KPlato::Node.

Definition at line 1272 of file kpttask.cc.

References m_childProxyRelations, and m_parentProxyRelations.

Referenced by initiateCalculation().

void KPlato::Task::addParentProxyRelations ( QList< Relation * > &  list  )  [virtual]

Reimplemented from KPlato::Node.

Definition at line 1277 of file kpttask.cc.

References KPlato::Node::addChildProxyRelation(), addParentProxyRelation(), KPlato::Node::dependParentNodes(), KPlato::Node::m_nodes, KPlato::Relation::parent(), type(), and KPlato::Node::Type_Summarytask.

void KPlato::Task::addChildProxyRelations ( QList< Relation * > &  list  )  [virtual]

Reimplemented from KPlato::Node.

Definition at line 1297 of file kpttask.cc.

References addChildProxyRelation(), KPlato::Node::addParentProxyRelation(), KPlato::Relation::child(), KPlato::Node::dependChildNodes(), KPlato::Node::m_nodes, type(), and KPlato::Node::Type_Summarytask.

void KPlato::Task::addParentProxyRelation ( Node node,
const Relation rel 
) [virtual]

Reimplemented from KPlato::Node.

Definition at line 1317 of file kpttask.cc.

References KPlato::Relation::lag(), KPlato::Node::m_nodes, m_parentProxyRelations, KPlato::Relation::type(), type(), KPlato::Node::type(), and KPlato::Node::Type_Summarytask.

Referenced by addParentProxyRelations().

void KPlato::Task::addChildProxyRelation ( Node node,
const Relation rel 
) [virtual]

Reimplemented from KPlato::Node.

Definition at line 1331 of file kpttask.cc.

References KPlato::Relation::lag(), m_childProxyRelations, KPlato::Node::m_nodes, KPlato::Relation::type(), type(), KPlato::Node::type(), and KPlato::Node::Type_Summarytask.

Referenced by addChildProxyRelations().

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

Check if this node has any dependent child nodes.

Reimplemented from KPlato::Node.

Definition at line 1345 of file kpttask.cc.

References KPlato::Relation::FinishStart, m_childProxyRelations, KPlato::Node::m_dependChildNodes, and KPlato::Relation::type().

Referenced by calcCriticalPath(), and initiateCalculationLists().

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

Check if this node has any dependent parent nodes.

Reimplemented from KPlato::Node.

Definition at line 1356 of file kpttask.cc.

References KPlato::Relation::FinishStart, KPlato::Node::m_dependParentNodes, m_parentProxyRelations, KPlato::Relation::StartStart, and KPlato::Relation::type().

Referenced by calcCriticalPath(), and initiateCalculationLists().

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 1370 of file kpttask.cc.

References KPlato::Node::m_currentSchedule, m_requests, KPlato::Schedule::startTime, and KPlato::Schedule::workStartTime.

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 1378 of file kpttask.cc.

References KPlato::Schedule::endTime, and KPlato::Node::m_currentSchedule.

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 1399 of file kpttask.cc.

References effortMetError(), KPlato::Schedule::endTime, KPlato::Schedule::latestFinish, KPlato::Node::m_currentSchedule, KPlato::Node::m_effort, KPlato::Schedule::schedulingError, KPlato::Schedule::startTime, KPlato::Effort::type(), type(), KPlato::Effort::Type_FixedDuration, KPlato::Node::Type_Milestone, KPlato::Schedule::workEndTime, and KPlato::Duration::zeroDuration.

Referenced by KPlato::GanttView::modifyMilestone(), and KPlato::GanttView::modifyTask().

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 (  )  const [virtual]

A task is critical if there is no positive float.

Reimplemented from KPlato::Node.

Definition at line 1430 of file kpttask.cc.

References KPlato::Schedule::earliestStart, KPlato::Schedule::endTime, KPlato::Schedule::latestFinish, KPlato::Node::m_currentSchedule, and KPlato::Schedule::startTime.

Referenced by calcCriticalPath(), KPlato::GanttView::modifyMilestone(), and KPlato::GanttView::modifyTask().

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

Calculate critical path.

Reimplemented from KPlato::Node.

Definition at line 1438 of file kpttask.cc.

References KPlato::Node::calcCriticalPath(), KPlato::Relation::child(), KPlato::Schedule::inCriticalPath, isCritical(), isEndNode(), isStartNode(), m_childProxyRelations, KPlato::Node::m_currentSchedule, KPlato::Node::m_dependChildNodes, KPlato::Node::m_dependParentNodes, m_parentProxyRelations, and KPlato::Relation::parent().

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 1485 of file kpttask.cc.

References KPlato::Node::findSchedule(), KPlato::Node::setCurrentSchedule(), and KPlato::Node::setCurrentSchedulePtr().

bool KPlato::Task::effortMetError (  )  const [virtual]

Definition at line 1490 of file kpttask.cc.

References KPlato::Effort::effort(), KPlato::Node::effort(), KPlato::Node::m_currentSchedule, KPlato::Schedule::notScheduled, KPlato::Schedule::plannedEffort(), and KPlato::Schedule::type().

Referenced by KPlato::GanttView::modifyTask(), and positiveFloat().

struct Progress& KPlato::Task::progress (  )  [inline]

Definition at line 276 of file kpttask.h.

References m_progress.

Referenced by KPlato::TaskProgressPanel::buildCommand(), KPlato::MilestoneProgressPanel::buildCommand(), KPlato::TaskModifyProgressCmd::execute(), KPlato::MilestoneProgressPanel::MilestoneProgressPanel(), KPlato::GanttView::modifyTask(), KPlato::TaskModifyProgressCmd::TaskModifyProgressCmd(), KPlato::TaskProgressPanel::TaskProgressPanel(), and KPlato::TaskModifyProgressCmd::unexecute().

DateTime KPlato::Task::calculateSuccessors ( const QList< Relation * > &  list,
int  use 
) [private]

Definition at line 710 of file kpttask.cc.

References KPlato::Node::calculateBackward(), KPlato::Relation::child(), KPlato::Node::duration(), KPlato::Relation::FinishFinish, KPlato::Node::getLatestFinish(), KPlato::Relation::lag(), KPlato::Relation::StartStart, KPlato::Relation::type(), KPlato::Node::type(), and KPlato::Node::Type_Summarytask.

Referenced by calculateBackward().

DateTime KPlato::Task::calculatePredeccessors ( const QList< Relation * > &  list,
int  use 
) [private]

Definition at line 585 of file kpttask.cc.

References KPlato::Node::calculateForward(), KPlato::Node::duration(), KPlato::Relation::FinishFinish, KPlato::Node::getEarliestStart(), KPlato::Relation::lag(), KPlato::Relation::parent(), KPlato::Relation::StartStart, KPlato::Relation::type(), KPlato::Node::type(), and KPlato::Node::Type_Summarytask.

Referenced by calculateForward().

DateTime KPlato::Task::scheduleSuccessors ( const QList< Relation * > &  list,
int  use 
) [private]

Definition at line 1031 of file kpttask.cc.

References KPlato::Relation::child(), KPlato::Node::duration(), KPlato::Node::endTime(), KPlato::Relation::FinishFinish, KPlato::Node::getLatestFinish(), KPlato::Relation::lag(), KPlato::Node::scheduleBackward(), KPlato::Relation::StartStart, KPlato::Relation::type(), KPlato::Node::type(), and KPlato::Node::Type_Summarytask.

Referenced by scheduleBackward().

DateTime KPlato::Task::schedulePredeccessors ( const QList< Relation * > &  list,
int  use 
) [private]

Definition at line 834 of file kpttask.cc.

References KPlato::Node::duration(), KPlato::Relation::FinishFinish, KPlato::Node::getEarliestStart(), KPlato::Relation::lag(), KPlato::Relation::parent(), KPlato::Node::scheduleForward(), KPlato::Relation::StartStart, KPlato::Node::startTime(), KPlato::Relation::type(), KPlato::Node::type(), and KPlato::Node::Type_Summarytask.

Referenced by scheduleForward().

DateTime KPlato::Task::workStartAfter ( const DateTime dt  )  [private]

Definition at line 1384 of file kpttask.cc.

References KPlato::ResourceRequestCollection::availableAfter(), and m_requests.

Referenced by calculateForward(), and scheduleForward().

DateTime KPlato::Task::workFinishBefore ( const DateTime dt  )  [private]

Definition at line 1392 of file kpttask.cc.

References KPlato::ResourceRequestCollection::availableBefore(), and m_requests.

Referenced by calculateBackward(), and scheduleBackward().

void KPlato::Task::printDebug ( bool  children,
QByteArray  indent 
) [virtual]

Reimplemented from KPlato::Node.

Definition at line 1498 of file kpttask.cc.

References m_requests, KPlato::Node::name(), KPlato::Node::printDebug(), KPlato::ResourceRequestCollection::printDebug(), type(), units(), and workUnits().


Member Data Documentation

QList<ResourceGroup*> KPlato::Task::m_resource [private]

Definition at line 288 of file kpttask.h.

Referenced by ~Task().

ResourceRequestCollection* KPlato::Task::m_requests [private]

Definition at line 290 of file kpttask.h.

Referenced by addRequest(), calcDuration(), clearResourceRequests(), makeAppointments(), printDebug(), resourceGroupRequest(), save(), scheduleBackward(), scheduleForward(), takeRequest(), Task(), units(), workFinishBefore(), workStartAfter(), workStartTime(), and workUnits().

QList<Relation*> KPlato::Task::m_parentProxyRelations [private]

Definition at line 292 of file kpttask.h.

Referenced by addParentProxyRelation(), calcCriticalPath(), calculateForward(), clearProxyRelations(), isStartNode(), scheduleForward(), and ~Task().

QList<Relation*> KPlato::Task::m_childProxyRelations [private]

Definition at line 293 of file kpttask.h.

Referenced by addChildProxyRelation(), calcCriticalPath(), calculateBackward(), clearProxyRelations(), isEndNode(), scheduleBackward(), and ~Task().

struct Progress KPlato::Task::m_progress [private]

Definition at line 295 of file kpttask.h.

Referenced by actualEffort(), costPerformanceIndex(), effortPerformanceIndex(), load(), progress(), and save().


The documentation for this class was generated from the following files:
Generated on Wed Nov 22 23:21:51 2006 for KPlato by  doxygen 1.5.1-p1