com.ibm.tivoli.maximo.miniapps.scheduler.constraint

Class AbstractCriticalPathMethod

  • java.lang.Object
    • com.ibm.tivoli.maximo.miniapps.scheduler.constraint.AbstractCriticalPathMethod
    • Field Detail

      • userTimeZone

        protected java.util.TimeZone userTimeZone
      • model

        protected java.lang.Object model
    • Constructor Detail

      • AbstractCriticalPathMethod

        public AbstractCriticalPathMethod(java.lang.Object model,
                                          UserInfo userInfo)
    • Method Detail

      • setProjectStart

        public void setProjectStart(java.util.Date projectStart)
        Sets project start date
        Specified by:
        setProjectStart in interface ICriticalPathMethod
        Parameters:
        projectStart -
      • setProjectEnd

        public void setProjectEnd(java.util.Date projectEnd)
        Sets project end date
        Parameters:
        projectEnd -
      • setCriticalThreshold

        protected void setCriticalThreshold(ilog.views.gantt.IlvDuration ilvduration)
        Sets the critical threshold for the project
        Parameters:
        ilvduration -
      • clearCPMProperties

        protected void clearCPMProperties()
        Clear the CPM properties for all activities.
      • clearCPMProperties

        protected void clearCPMProperties(IMXActivity[] selectedActivities)
        Clear the CPM properties for selected activities.
      • computeSchedule

        public boolean computeSchedule()
                                throws java.lang.Exception
        Computed the critical path for the project
        Specified by:
        computeSchedule in interface ICriticalPathMethod
        Throws:
        ilog.views.gantt.model.IlvConstraintCycleException
        java.lang.Exception
      • computeSchedule

        public IMXActivity[] computeSchedule(IMXActivity[] selectedActivities)
                                      throws java.lang.Exception
        Computes the critical path for selected activities
        Specified by:
        computeSchedule in interface ICriticalPathMethod
        Parameters:
        selectedActivities -
        Throws:
        ilog.views.gantt.model.IlvConstraintCycleException
        java.lang.Exception
      • computeEarlyStartAndFinish

        protected void computeEarlyStartAndFinish(IMXActivity activity)
                                           throws java.lang.Exception
        Forward pass to compute the early start and early finish
        Parameters:
        activity -
        Throws:
        ilog.views.gantt.model.IlvConstraintCycleException
        java.lang.Exception
      • computeEarlyStartAndFinish

        protected void computeEarlyStartAndFinish(IMXActivity activity,
                                                  java.util.Date parentEarlyStart)
                                           throws java.lang.Exception
        Forward pass to compute the early start and early finish
        Parameters:
        activity -
        parentEarlyStart - that must be used if not null.
        Throws:
        ilog.views.gantt.model.IlvConstraintCycleException
        java.lang.Exception
      • applyPredecessorConstraints

        protected java.util.Date[] applyPredecessorConstraints(IMXActivity activity,
                                                               java.util.Date parentEarlyStart,
                                                               ilog.views.gantt.IlvDuration activityDuration)
                                                        throws java.lang.Exception
        Apply constraint type to the activity and get early and finish dates
        Parameters:
        activity -
        parentEarlyStart -
        activityDuration -
        Returns:
        early start and early finish date
        Throws:
        ilog.views.gantt.model.IlvConstraintCycleException
        java.lang.Exception
      • computeLateStartAndFinish

        protected void computeLateStartAndFinish(IMXActivity activity)
                                          throws java.lang.Exception
        Backward pass to compute the late start and late finish
        Parameters:
        activity -
        Throws:
        ilog.views.gantt.model.IlvConstraintCycleException
        java.lang.Exception
      • computeLateStartAndFinish

        protected void computeLateStartAndFinish(IMXActivity activity,
                                                 java.util.Date parentLatestFinish)
                                          throws java.lang.Exception
        Backward pass to compute the late start and late finish
        Parameters:
        activity -
        Throws:
        ilog.views.gantt.model.IlvConstraintCycleException
        java.lang.Exception
      • applySuccessorConstraints

        protected java.util.Date[] applySuccessorConstraints(IMXActivity activity,
                                                             java.util.Date parentLatestFinish,
                                                             ilog.views.gantt.IlvDuration activityDuration)
                                                      throws java.lang.Exception
        Apply constraint type to the activity and get latest start and finish dates
        Parameters:
        activity -
        parentLatestFinish -
        activityDuration -
        Returns:
        early start and early finish date
        Throws:
        ilog.views.gantt.model.IlvConstraintCycleException
        java.lang.Exception
      • computeFloat

        protected void computeFloat(IMXActivity activity)
                             throws java.lang.Exception
        Compute float for an activity
        Parameters:
        activity -
        Throws:
        java.lang.Exception
      • addDurationToDate

        protected java.util.Date addDurationToDate(java.util.Date date,
                                                   ilog.views.gantt.IlvDuration duration)
        Returns a new Date that is the sum of the specified time and this duration
        Parameters:
        activity -
        date -
        duration -
        Returns:
        date
      • subtractDurationFromDate

        protected java.util.Date subtractDurationFromDate(java.util.Date date,
                                                          ilog.views.gantt.IlvDuration duration)
        Returns a new Date that is the subtraction of the specified time and this duration
        Parameters:
        activity -
        date -
        duration -
        Returns:
        date
      • getLeadLagDuration

        protected ilog.views.gantt.IlvDuration getLeadLagDuration(java.lang.Double leadLagHours)
        Get the lead/lag in IlvDuration
        Parameters:
        leadLagHours -
        Returns:
        IlvDuration
      • truncateDate

        protected java.util.Date truncateDate(java.util.Date date)
        Removes seconds and milliseconds from Activity dates, in order to avoid interference on float values calculations.
        Parameters:
        date -
        Returns:
      • getActivityDuration

        protected double getActivityDuration(IMXActivity activity)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getTimeInterval

        protected ilog.views.gantt.IlvTimeInterval getTimeInterval(IMXActivity activity,
                                                                   boolean useEarlyDates)
      • getRootActivity

        protected abstract IMXActivity getRootActivity()
      • activityAncestorsIterator

        protected abstract java.util.Iterator activityAncestorsIterator(IMXActivity activity)
      • activityPreorderIterator

        protected abstract java.util.Iterator activityPreorderIterator()
      • activityPreorderIterator

        protected abstract java.util.Iterator activityPreorderIterator(IMXActivity activity)
      • childActivityIterator

        protected abstract java.util.Iterator childActivityIterator(IMXActivity activity)
      • constraintIteratorFromActivity

        protected abstract java.util.Iterator constraintIteratorFromActivity(IMXActivity activity)
      • constraintIteratorToActivity

        protected abstract java.util.Iterator constraintIteratorToActivity(IMXActivity activity)
      • getChildActivityCount

        protected abstract int getChildActivityCount(IMXActivity activity)
      • handleModifiedActivity

        protected abstract void handleModifiedActivity(IMXActivity activity)
      • getActivityByID

        protected abstract IMXActivity getActivityByID(java.lang.String activityID)
      • recalculateParentActivity

        protected abstract boolean recalculateParentActivity(IMXActivity activity)