kplato
KPlato::Schedule Class Reference
#include <kptschedule.h>
Inheritance diagram for KPlato::Schedule:

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.
Public Types | |
enum | Type { Expected = 0, Optimistic = 1, Pessimistic = 2 } |
Public Member Functions | |
Schedule () | |
Schedule (Schedule *parent) | |
Schedule (QString name, Type type, long id) | |
~Schedule () | |
QString | name () const |
void | setName (QString name) |
Type | type () const |
void | setType (Type type) |
void | setType (QString type) |
QString | 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 QDomElement &element) |
virtual void | saveXML (QDomElement &element) const |
void | saveCommonXML (QDomElement &element) const |
void | saveAppointments (QDomElement &element) const |
QPtrList< 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 QStringList | overbookedResources () const |
virtual EffortCostMap | plannedEffortCostPrDay (const QDate &start, const QDate &end) const |
virtual Duration | plannedEffort () const |
virtual Duration | plannedEffort (const QDate &date) const |
virtual Duration | plannedEffortTo (const QDate &date) const |
virtual Duration | actualEffort () const |
virtual Duration | actualEffort (const QDate &date) const |
virtual Duration | actualEffortTo (const QDate &date) const |
virtual double | plannedCost () const |
virtual double | plannedCost (const QDate &date) const |
virtual double | plannedCostTo (const QDate &date) const |
virtual double | actualCost () const |
virtual double | actualCost (const QDate &date) const |
virtual double | actualCostTo (const QDate &date) const |
double | effortPerformanceIndex (const QDate &, bool *) |
double | costPerformanceIndex (const QDate &, 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 (QString ident) |
Protected Attributes | |
QString | m_name |
Type | m_type |
long | m_id |
bool | m_deleted |
QPtrList< 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 |
Member Function Documentation
QPtrList<Appointment>& KPlato::Schedule::appointments | ( | ) | [inline] |
bool KPlato::Schedule::add | ( | Appointment * | appointment | ) | [virtual] |
virtual void KPlato::Schedule::addAppointment | ( | Schedule * | , | |
DateTime & | , | |||
DateTime & | , | |||
double | = 100 | |||
) | [inline, virtual] |
Adds appointment to both this resource schedule and node schedule.
Reimplemented in KPlato::NodeSchedule, and KPlato::ResourceSchedule.
Definition at line 94 of file kptschedule.h.
void KPlato::Schedule::removeAppointment | ( | Appointment * | appointment | ) |
removes appointment and deletes it (independent of setAutoDelete)
Definition at line 188 of file kptschedule.cc.
void KPlato::Schedule::takeAppointment | ( | Appointment * | appointment | ) |
removes appointment without deleting it (independent of setAutoDelete)
Definition at line 193 of file kptschedule.cc.
Duration KPlato::Schedule::plannedEffort | ( | ) | const [virtual] |
Returns the total planned effort for this task (or subtasks).
Definition at line 225 of file kptschedule.cc.
Duration KPlato::Schedule::plannedEffort | ( | const QDate & | date | ) | const [virtual] |
Returns the total planned effort for this task (or subtasks) on date.
Definition at line 235 of file kptschedule.cc.
Duration KPlato::Schedule::plannedEffortTo | ( | const QDate & | date | ) | const [virtual] |
Duration KPlato::Schedule::actualEffort | ( | ) | const [virtual] |
Returns the total actual effort for this task (or subtasks).
Definition at line 255 of file kptschedule.cc.
Duration KPlato::Schedule::actualEffort | ( | const QDate & | date | ) | const [virtual] |
Returns the total actual effort for this task (or subtasks) on date.
Definition at line 265 of file kptschedule.cc.
Duration KPlato::Schedule::actualEffortTo | ( | const QDate & | 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.cc.
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.cc.
double KPlato::Schedule::plannedCost | ( | const QDate & | date | ) | const [virtual] |
double KPlato::Schedule::plannedCostTo | ( | const QDate & | 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.cc.
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.cc.
double KPlato::Schedule::actualCost | ( | const QDate & | date | ) | const [virtual] |
double KPlato::Schedule::actualCostTo | ( | const QDate & | date | ) | const [virtual] |
double KPlato::Schedule::effortPerformanceIndex | ( | const QDate & | , | |
bool * | ||||
) | [inline] |
double KPlato::Schedule::costPerformanceIndex | ( | const QDate & | , | |
bool * | ||||
) | [inline] |
Member Data Documentation
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.
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.
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.
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.
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.
bool KPlato::Schedule::resourceError [protected] |
Set if EffortType == Effort, but no resource is requested.
Definition at line 209 of file kptschedule.h.
bool KPlato::Schedule::resourceOverbooked [protected] |
bool KPlato::Schedule::resourceNotAvailable [protected] |
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.
bool KPlato::Schedule::notScheduled [protected] |
The documentation for this class was generated from the following files: