kplato

#include <kptschedule.h>

Inheritance diagram for KPlato::Schedule:
KPlato::NodeSchedule KPlato::ResourceSchedule KPlato::MainSchedule

Public Types

enum  Type { Expected =0 , Optimistic =1 , Pessimistic =2 }
 

Public Member Functions

 Schedule (Schedule *parent)
 
 Schedule (TQString name, Type type, long id)
 
TQString name () const
 
void setName (TQString name)
 
Type type () const
 
void setType (Type type)
 
void setType (TQString type)
 
TQString typeToString (bool translate=false) const
 
long id () const
 
void setId (long id)
 
void setParent (Schedule *parent)
 
Schedule * parent () const
 
virtual bool isDeleted () const
 
virtual void setDeleted (bool on)
 
virtual Resource * resource () const
 
virtual Node * node () const
 
virtual bool loadXML (const TQDomElement &element)
 
virtual void saveXML (TQDomElement &element) const
 
void saveCommonXML (TQDomElement &element) const
 
void saveAppointments (TQDomElement &element) const
 
TQPtrList< Appointment > & appointments ()
 
virtual bool add (Appointment *appointment)
 
virtual void addAppointment (Schedule *, DateTime &, DateTime &, double=100)
 
void removeAppointment (Appointment *appointment)
 
void takeAppointment (Appointment *appointment)
 
Appointment * findAppointment (Schedule *resource, Schedule *node)
 
Appointment appointmentIntervals () const
 
virtual bool isOverbooked () const
 
virtual bool isOverbooked (const DateTime &, const DateTime &) const
 
virtual TQStringList overbookedResources () const
 
virtual EffortCostMap plannedEffortCostPrDay (const TQDate &start, const TQDate &end) const
 
virtual Duration plannedEffort () const
 
virtual Duration plannedEffort (const TQDate &date) const
 
virtual Duration plannedEffortTo (const TQDate &date) const
 
virtual Duration actualEffort () const
 
virtual Duration actualEffort (const TQDate &date) const
 
virtual Duration actualEffortTo (const TQDate &date) const
 
virtual double plannedCost () const
 
virtual double plannedCost (const TQDate &date) const
 
virtual double plannedCostTo (const TQDate &date) const
 
virtual double actualCost () const
 
virtual double actualCost (const TQDate &date) const
 
virtual double actualCostTo (const TQDate &date) const
 
double effortPerformanceIndex (const TQDate &, bool *)
 
double costPerformanceIndex (const TQDate &, bool *)
 
virtual double normalRatePrHour () const
 
void setEarliestStart (DateTime &dt)
 
void setLatestFinish (DateTime &dt)
 
virtual void initiateCalculation ()
 
virtual void calcResourceOverbooked ()
 
void setScheduled (bool on)
 
bool isScheduled () const
 
DateTime start () const
 
DateTime end () const
 
virtual void printDebug (TQString ident)
 

Protected Attributes

TQString m_name
 
Type m_type
 
long m_id
 
bool m_deleted
 
TQPtrList< Appointment > m_appointments
 
Schedule * m_parent
 
DateTime earliestStart
 
DateTime latestFinish
 
DateTime startTime
 
DateTime endTime
 
Duration duration
 
bool resourceError
 
bool resourceOverbooked
 
bool resourceNotAvailable
 
bool schedulingError
 
bool notScheduled
 
DateTime workStartTime
 
DateTime workEndTime
 
bool inCriticalPath
 

Friends

class Node
 
class Task
 
class Project
 
class Resource
 
class RecalculateProjectCmd
 

Detailed Description

The Schedule class holds data calculated during project calculation and scheduling, eg start- and end-times and appointments.

There is one schedule per node and one per resource. Schedules can be of type Expected, Optimistic or Pessimistic refering to which estimate is used for the calculation. Schedule is subclassed into: MainSchedule Used by the main project. NodeSchedule Used by all other nodes (tasks). ResourceSchedule Used by resources.

Definition at line 54 of file kptschedule.h.

Member Enumeration Documentation

◆ Type

enum KPlato::Schedule::Type

Definition at line 58 of file kptschedule.h.

Constructor & Destructor Documentation

◆ Schedule() [1/3]

KPlato::Schedule::Schedule ( )

Definition at line 37 of file kptschedule.cpp.

◆ Schedule() [2/3]

KPlato::Schedule::Schedule ( Schedule *  parent)

Definition at line 44 of file kptschedule.cpp.

◆ Schedule() [3/3]

KPlato::Schedule::Schedule ( TQString  name,
Type  type,
long  id 
)

Definition at line 60 of file kptschedule.cpp.

◆ ~Schedule()

KPlato::Schedule::~Schedule ( )

Definition at line 72 of file kptschedule.cpp.

Member Function Documentation

◆ actualCost() [1/2]

double KPlato::Schedule::actualCost ( ) const
virtual

Actual cost is the sum total of the reported costs actually used for this node.

Definition at line 315 of file kptschedule.cpp.

◆ actualCost() [2/2]

double KPlato::Schedule::actualCost ( const TQDate &  date) const
virtual

Actual cost on date.

Definition at line 325 of file kptschedule.cpp.

◆ actualCostTo()

double KPlato::Schedule::actualCostTo ( const TQDate &  date) const
virtual

Actual cost up to and including date.

Definition at line 335 of file kptschedule.cpp.

◆ actualEffort() [1/2]

Duration KPlato::Schedule::actualEffort ( ) const
virtual

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

Definition at line 255 of file kptschedule.cpp.

◆ actualEffort() [2/2]

Duration KPlato::Schedule::actualEffort ( const TQDate &  date) const
virtual

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

Definition at line 265 of file kptschedule.cpp.

◆ actualEffortTo()

Duration KPlato::Schedule::actualEffortTo ( const TQDate &  date) const
virtual

Returns the total actual effort for this task (or subtasks) up to and including date.

Definition at line 275 of file kptschedule.cpp.

◆ add()

bool KPlato::Schedule::add ( Appointment *  appointment)
virtual

Adds appointment to this schedule only.

Definition at line 177 of file kptschedule.cpp.

◆ addAppointment()

virtual void KPlato::Schedule::addAppointment ( Schedule *  ,
DateTime &  ,
DateTime &  ,
double  = 100 
)
inlinevirtual

Adds appointment to both this resource schedule and node schedule.

Reimplemented in KPlato::ResourceSchedule, and KPlato::NodeSchedule.

Definition at line 94 of file kptschedule.h.

◆ appointments()

TQPtrList< Appointment > & KPlato::Schedule::appointments ( )
inline

Return the list of appointments.

Definition at line 90 of file kptschedule.h.

◆ calcResourceOverbooked()

void KPlato::Schedule::calcResourceOverbooked ( )
virtual

Definition at line 127 of file kptschedule.cpp.

◆ costPerformanceIndex()

double KPlato::Schedule::costPerformanceIndex ( const TQDate &  ,
bool *   
)
inline

Cost performance index.

Definition at line 149 of file kptschedule.h.

◆ effortPerformanceIndex()

double KPlato::Schedule::effortPerformanceIndex ( const TQDate &  ,
bool *   
)
inline

Effort based performance index.

Definition at line 147 of file kptschedule.h.

◆ end()

DateTime KPlato::Schedule::end ( ) const
inline

Definition at line 163 of file kptschedule.h.

◆ findAppointment()

Appointment * KPlato::Schedule::findAppointment ( Schedule *  resource,
Schedule *  node 
)

Definition at line 205 of file kptschedule.cpp.

◆ id()

long KPlato::Schedule::id ( ) const
inline

Definition at line 74 of file kptschedule.h.

◆ initiateCalculation()

void KPlato::Schedule::initiateCalculation ( )
virtual

Definition at line 118 of file kptschedule.cpp.

◆ isDeleted()

bool KPlato::Schedule::isDeleted ( ) const
virtual

Definition at line 84 of file kptschedule.cpp.

◆ isOverbooked() [1/2]

virtual bool KPlato::Schedule::isOverbooked ( ) const
inlinevirtual

Definition at line 103 of file kptschedule.h.

◆ isOverbooked() [2/2]

virtual bool KPlato::Schedule::isOverbooked ( const DateTime &  ,
const DateTime &   
) const
inlinevirtual

Definition at line 104 of file kptschedule.h.

◆ isScheduled()

bool KPlato::Schedule::isScheduled ( ) const
inline

Definition at line 160 of file kptschedule.h.

◆ loadXML()

bool KPlato::Schedule::loadXML ( const TQDomElement &  element)
virtual

Definition at line 149 of file kptschedule.cpp.

◆ name()

TQString KPlato::Schedule::name ( ) const
inline

Definition at line 68 of file kptschedule.h.

◆ node()

virtual Node * KPlato::Schedule::node ( ) const
inlinevirtual

Definition at line 82 of file kptschedule.h.

◆ normalRatePrHour()

virtual double KPlato::Schedule::normalRatePrHour ( ) const
inlinevirtual

Definition at line 151 of file kptschedule.h.

◆ overbookedResources()

TQStringList KPlato::Schedule::overbookedResources ( ) const
virtual

Definition at line 138 of file kptschedule.cpp.

◆ parent()

Schedule * KPlato::Schedule::parent ( ) const
inline

Definition at line 77 of file kptschedule.h.

◆ plannedCost() [1/2]

double KPlato::Schedule::plannedCost ( ) const
virtual

Planned cost is the sum total of all resources and other costs planned for this node.

Definition at line 285 of file kptschedule.cpp.

◆ plannedCost() [2/2]

double KPlato::Schedule::plannedCost ( const TQDate &  date) const
virtual

Planned cost on date.

Definition at line 295 of file kptschedule.cpp.

◆ plannedCostTo()

double KPlato::Schedule::plannedCostTo ( const TQDate &  date) const
virtual

Planned cost from start of activity up to and including date is the sum of all resource costs and other costs planned for this node.

Definition at line 305 of file kptschedule.cpp.

◆ plannedEffort() [1/2]

Duration KPlato::Schedule::plannedEffort ( ) const
virtual

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

Definition at line 225 of file kptschedule.cpp.

◆ plannedEffort() [2/2]

Duration KPlato::Schedule::plannedEffort ( const TQDate &  date) const
virtual

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

Definition at line 235 of file kptschedule.cpp.

◆ plannedEffortCostPrDay()

EffortCostMap KPlato::Schedule::plannedEffortCostPrDay ( const TQDate &  start,
const TQDate &  end 
) const
virtual

Definition at line 214 of file kptschedule.cpp.

◆ plannedEffortTo()

Duration KPlato::Schedule::plannedEffortTo ( const TQDate &  date) const
virtual

Returns the planned effort up to and including date.

Definition at line 245 of file kptschedule.cpp.

◆ printDebug()

void KPlato::Schedule::printDebug ( TQString  ident)
virtual

Definition at line 611 of file kptschedule.cpp.

◆ removeAppointment()

void KPlato::Schedule::removeAppointment ( Appointment *  appointment)

removes appointment and deletes it (independent of setAutoDelete)

Definition at line 188 of file kptschedule.cpp.

◆ resource()

virtual Resource * KPlato::Schedule::resource ( ) const
inlinevirtual

Definition at line 81 of file kptschedule.h.

◆ saveAppointments()

void KPlato::Schedule::saveAppointments ( TQDomElement &  element) const

Definition at line 169 of file kptschedule.cpp.

◆ saveCommonXML()

void KPlato::Schedule::saveCommonXML ( TQDomElement &  element) const

Definition at line 162 of file kptschedule.cpp.

◆ saveXML()

void KPlato::Schedule::saveXML ( TQDomElement &  element) const
virtual

Definition at line 156 of file kptschedule.cpp.

◆ setDeleted()

void KPlato::Schedule::setDeleted ( bool  on)
virtual

Definition at line 79 of file kptschedule.cpp.

◆ setEarliestStart()

void KPlato::Schedule::setEarliestStart ( DateTime &  dt)
inline

Definition at line 153 of file kptschedule.h.

◆ setId()

void KPlato::Schedule::setId ( long  id)
inline

Definition at line 75 of file kptschedule.h.

◆ setLatestFinish()

void KPlato::Schedule::setLatestFinish ( DateTime &  dt)
inline

Definition at line 154 of file kptschedule.h.

◆ setName()

void KPlato::Schedule::setName ( TQString  name)
inline

Definition at line 69 of file kptschedule.h.

◆ setParent()

void KPlato::Schedule::setParent ( Schedule *  parent)

Definition at line 75 of file kptschedule.cpp.

◆ setScheduled()

void KPlato::Schedule::setScheduled ( bool  on)
inline

Definition at line 159 of file kptschedule.h.

◆ setType() [1/2]

void KPlato::Schedule::setType ( TQString  type)

Definition at line 88 of file kptschedule.cpp.

◆ setType() [2/2]

void KPlato::Schedule::setType ( Type  type)
inline

Definition at line 71 of file kptschedule.h.

◆ start()

DateTime KPlato::Schedule::start ( ) const
inline

Definition at line 162 of file kptschedule.h.

◆ takeAppointment()

void KPlato::Schedule::takeAppointment ( Appointment *  appointment)

removes appointment without deleting it (independent of setAutoDelete)

Definition at line 193 of file kptschedule.cpp.

◆ type()

Type KPlato::Schedule::type ( ) const
inline

Definition at line 70 of file kptschedule.h.

◆ typeToString()

TQString KPlato::Schedule::typeToString ( bool  translate = false) const

Definition at line 98 of file kptschedule.cpp.

Friends And Related Symbol Documentation

◆ Node

friend class Node
friend

Definition at line 174 of file kptschedule.h.

◆ Project

friend class Project
friend

Definition at line 176 of file kptschedule.h.

◆ RecalculateProjectCmd

friend class RecalculateProjectCmd
friend

Definition at line 178 of file kptschedule.h.

◆ Resource

friend class Resource
friend

Definition at line 177 of file kptschedule.h.

◆ Task

friend class Task
friend

Definition at line 175 of file kptschedule.h.

Member Data Documentation

◆ duration

Duration KPlato::Schedule::duration
protected

duration is the scheduled duration which depends on e.g.

estimated effort, allocated resources and risk

Definition at line 206 of file kptschedule.h.

◆ earliestStart

DateTime KPlato::Schedule::earliestStart
protected

earliestStart is calculated by PERT/CPM.

A task may be scheduled to start later because of constraints or resource availability etc.

Definition at line 184 of file kptschedule.h.

◆ endTime

DateTime KPlato::Schedule::endTime
protected

m_endTime is the scheduled finish time.

It depends on constraints (i.e. ASAP/ALAP) and resource availability. It will always be earlier or equal to latestFinish

Definition at line 201 of file kptschedule.h.

◆ inCriticalPath

bool KPlato::Schedule::inCriticalPath
protected

Definition at line 221 of file kptschedule.h.

◆ latestFinish

DateTime KPlato::Schedule::latestFinish
protected

latestFinish is calculated by PERT/CPM.

A task may be scheduled to finish earlier because of constraints or resource availability etc.

Definition at line 190 of file kptschedule.h.

◆ m_appointments

TQPtrList<Appointment> KPlato::Schedule::m_appointments
protected

Definition at line 171 of file kptschedule.h.

◆ m_deleted

bool KPlato::Schedule::m_deleted
protected

Definition at line 169 of file kptschedule.h.

◆ m_id

long KPlato::Schedule::m_id
protected

Definition at line 168 of file kptschedule.h.

◆ m_name

TQString KPlato::Schedule::m_name
protected

Definition at line 166 of file kptschedule.h.

◆ m_parent

Schedule* KPlato::Schedule::m_parent
protected

Definition at line 172 of file kptschedule.h.

◆ m_type

Type KPlato::Schedule::m_type
protected

Definition at line 167 of file kptschedule.h.

◆ notScheduled

bool KPlato::Schedule::notScheduled
protected

Set if the node has not been scheduled.

Definition at line 217 of file kptschedule.h.

◆ resourceError

bool KPlato::Schedule::resourceError
protected

Set if EffortType == Effort, but no resource is requested.

Definition at line 209 of file kptschedule.h.

◆ resourceNotAvailable

bool KPlato::Schedule::resourceNotAvailable
protected

Set if the requested resource is not available.

Definition at line 213 of file kptschedule.h.

◆ resourceOverbooked

bool KPlato::Schedule::resourceOverbooked
protected

Set if the assigned resource is overbooked.

Definition at line 211 of file kptschedule.h.

◆ schedulingError

bool KPlato::Schedule::schedulingError
protected

Set if the task cannot be scheduled to fullfill all the constraints.

Definition at line 215 of file kptschedule.h.

◆ startTime

DateTime KPlato::Schedule::startTime
protected

startTime is the scheduled start time.

It depends on constraints (i.e. ASAP/ALAP) and resource availability. It will always be later or equal to earliestStart

Definition at line 195 of file kptschedule.h.

◆ workEndTime

DateTime KPlato::Schedule::workEndTime
protected

Definition at line 220 of file kptschedule.h.

◆ workStartTime

DateTime KPlato::Schedule::workStartTime
protected

Definition at line 219 of file kptschedule.h.


The documentation for this class was generated from the following files: