kptnode.h
60 enum ConstraintType { ASAP, ALAP, MustStartOn, MustFinishOn, StartNotEarlier, FinishNotLater, FixedInterval };
127 virtual void insertDependChildNode( unsigned int index, Node *node, Relation::Type p=Relation::FinishStart);
150 virtual void insertDependParentNode( unsigned int index, Node *node, Relation::Type p=Relation::FinishStart);
324 virtual void initiateCalculationLists(TQPtrList<Node> &startnodes, TQPtrList<Node> &endnodes, TQPtrList<Node> &summarytasks) = 0;
362 virtual Duration calcDuration(const DateTime &/*time*/, const Duration &/*effort*/, bool /*backward*/) { return Duration::zeroDuration;}
396 virtual void addAppointment(ResourceSchedule *resource, DateTime &start, DateTime &end, double load=100);
586 void set( Duration e, Duration p = Duration::zeroDuration, Duration o = Duration::zeroDuration );
A resource (Resource) can be scheduled to be used at any time, this is represented internally with Ap...
Definition kptappointment.h:126
The duration class can be used to store a timespan in a convenient format.
Definition kptduration.h:34
static const Duration zeroDuration
This is useful for occasions where we need a zero duration.
Definition kptduration.h:126
Any Node will store how much time it takes to complete the node (typically a Task) in the traditional...
Definition kptnode.h:556
int pessimisticRatio() const
Return the "pessimistic" duration as the deviation from "expected" in percent.
Definition kptnode.cpp:937
int optimisticRatio() const
Return the "optimistic" duration as deviation from "expected" in percent.
Definition kptnode.cpp:926
virtual void addDependChildNode(Node *node, Relation::Type p=Relation::FinishStart)
Adds relation to both this node and address node.
Definition kptnode.cpp:183
void takeDependParentNode(Relation *rel)
Takes the relation rel from this node only.
Definition kptnode.cpp:295
void takeDependChildNode(Relation *rel)
Takes the relation rel from this node only.
Definition kptnode.cpp:236
virtual Duration * getExpectedDuration()=0
Returns the (previously) calculated duration.
Schedule * findSchedule(const TQString name, const Schedule::Type type) const
Find schedule matching name and type. Does not return deleted schedule.
Definition kptnode.cpp:688
Schedule * createSchedule(TQString name, Schedule::Type type, long id)
Create a new schedule.
Definition kptnode.cpp:674
virtual void insertDependChildNode(unsigned int index, Node *node, Relation::Type p=Relation::FinishStart)
Inserts relation to this node at index address index and appends relation to address node.
Definition kptnode.cpp:195
virtual double actualCostTo(const TQDate &)
Actual cost up to and including date.
Definition kptnode.h:317
virtual int level()
Returns the level this node is in the hierarchy. Top node is level 0.
Definition kptnode.cpp:753
virtual Duration actualEffort()
Returns the total actual effort for this task (or subtasks).
Definition kptnode.h:290
DateTime getLatestFinish() const
getLatestFinish() returns latest time this node can finish
Definition kptnode.h:221
TQPtrList< Appointment > appointments()
Return the list of appointments for current schedule.
Definition kptnode.cpp:624
virtual double plannedCost()
Planned cost is the sum total of all resources and other costs planned for this node.
Definition kptnode.h:300
virtual Duration plannedEffortTo(const TQDate &)
Returns the planned effort up to and including date.
Definition kptnode.h:287
virtual void saveAppointments(TQDomElement &element, long id) const
Save appointments for schedule with id.
Definition kptnode.cpp:616
void takeSchedule(const Schedule *schedule)
Take, don't delete (as in destruct).
Definition kptnode.cpp:660
virtual TQStringList overbookedResources() const
Return a list of overbooked resources.
Definition kptnode.cpp:383
virtual void setParentSchedule(Schedule *sch)
Set parent schedule recursivly.
Definition kptnode.cpp:718
virtual bool legalToLink(Node *, Node *)
Check if node par can be linked to node child. (Reimplement).
Definition kptnode.h:374
DateTime m_constraintEndTime
m_constraintEndTime is used if any of the constraints FixedInterval, FinishNotLater,...
Definition kptnode.h:517
virtual void saveRelations(TQDomElement &element) const
Save my and my childrens relations.
Definition kptnode.cpp:387
virtual void insertId(const TQString &id, const Node *node)
Insert node with identity id into the register.
Definition kptnode.h:411
virtual double actualCost()
Actual cost is the sum total of the reported costs actually used for this node.
Definition kptnode.h:313
virtual DateTime workStartTime() const
This is when work can start on this node in accordance with the calendar of allocated resources.
Definition kptnode.h:419
void addSchedule(Schedule *schedule)
Add schedule to list, replace if schedule with same id allready exists.
Definition kptnode.cpp:668
virtual void setCurrentSchedule(long id)
Set current schedule to schedule with identity id, for me and my children.
Definition kptnode.cpp:769
double effortPerformanceIndex(const TQDate &, bool *)
Effort based performance index.
Definition kptnode.h:320
virtual double plannedCostTo(const TQDate &)
Planned cost from start of activity up to and including date is the sum of all resource costs and oth...
Definition kptnode.h:308
void setLatestFinish(const DateTime &dt)
setLatestFinish() sets latest time this node can finish given the constraints of the network.
Definition kptnode.h:228
DateTime m_constraintStartTime
m_constraintTime is used if any of the constraints FixedInterval, StartNotEarlier,...
Definition kptnode.h:512
virtual Node * projectNode()
Returns a pointer to the project node (main- or sub-project) Returns 0 if no project exists.
Definition kptnode.cpp:109
virtual void insertDependParentNode(unsigned int index, Node *node, Relation::Type p=Relation::FinishStart)
Inserts relation to this node at index and appends relation to node.
Definition kptnode.cpp:254
virtual void insertId(const TQString &id)
Insert myself into the id register.
Definition kptnode.h:409
virtual Duration * getRandomDuration()=0
Instead of using the expected duration, generate a random value using the Distribution of each Task.
virtual void calcResourceOverbooked()
Calculates if the assigned resource is overbooked within the duration of this node.
Definition kptnode.cpp:376
virtual DateTime workEndTime() const
This is when work can finish on this node in accordance with the calendar of allocated resources.
Definition kptnode.h:429
virtual Duration actualEffortTo(const TQDate &)
Returns the total actual effort for this task (or subtasks) up to and including date.
Definition kptnode.h:294
virtual void addDependParentNode(Node *node, Relation::Type p=Relation::FinishStart)
Adds relation to both this node and node.
Definition kptnode.cpp:242
virtual bool addAppointment(Appointment *appointment)
Return appointment this node have with resource.
Definition kptnode.cpp:636
virtual bool isStartNode() const
Check if this node has any dependent parent nodes.
Definition kptnode.cpp:569
bool resourceError() const
EffortType == Effort, but no resource is requested.
Definition kptnode.h:260
DateTime getEarliestStart() const
getEarliestStart() returns earliest time this node can start given the constraints of the network.
Definition kptnode.h:209
virtual Duration actualEffort(const TQDate &)
Returns the total actual effort for this task (or subtasks) on date.
Definition kptnode.h:292
Schedule * findSchedule(long id) const
Find schedule matching id. Also returns deleted schedule.
Definition kptnode.h:472
virtual Duration plannedEffort()
Returns the total planned effort for this task (or subtasks).
Definition kptnode.h:283
virtual bool schedulingError() const
The task cannot be scheduled to fullfill all the constraints.
Definition kptnode.h:274
virtual Duration plannedEffort(const TQDate &)
Returns the total planned effort for this task (or subtasks) on date.
Definition kptnode.h:285
virtual Node * findNode(const TQString &id) const
Find the node with identity id.
Definition kptnode.h:401
void setScheduleDeleted(long id, bool onoff)
Set deleted = onoff for schedule with id.
Definition kptnode.cpp:709
virtual bool isEndNode() const
Check if this node has any dependent child nodes.
Definition kptnode.cpp:566
virtual void generateWBS(int count, WBSDefinition &def, TQString wbs=TQString())
Generate WBS.
Definition kptnode.cpp:758
void setEarliestStart(const DateTime &dt)
setEarliestStart() sets earliest time this node can start
Definition kptnode.h:215
Project is the main node in a project, it contains child nodes and possibly sub-projects.
Definition kptproject.h:52
The relation class couples a 2 nodes together which are dependent on each other.
Definition kptrelation.h:45
This class represents a group of similar resources to be assigned to a task e.g.
Definition kptresource.h:66
The Schedule class holds data calculated during project calculation and scheduling,...
Definition kptschedule.h:55
