CATRule to Define the Inconsistency Resolution Criteria for Operations

Using this CATRule, you can specify strategies to resolve an operation's inconsistencies.

This page discusses:

General Information

The DELFITGanttOperationDuration.CATRule is located in ..\resources\knowledge\scripts.

In this script, you can define one of the following rules:

  • Rule 1: To update the operation's duration to equal the Tracks' sequence duration. The operation's type of time does not change.
  • Rule 2: To update the operation's time type to a new type. In this case, set oUpdateOperationDuration to true. The operation's time type and duration are updated.

Sample

In the following example, if the operation's time type is set to either "Measured" or "Analyzed", it is changed to "Estimated" and its duration is also modified.

Let DefinedTimeType(String)
                    set DefinedTimeType = Parameters->GetAttributeObject("iOperationTimeType")
                    
                    Let updateTime(Boolean)
                    Set updateTime = false
                    Let newType(String)
                    Set newType = DefinedTimeType
                    
                    if ((DefinedTimeType == "Measured") OR
                    (DefinedTimeType == "Analyzed") )
                    {
                    // Rule 1
                    set updateTime = true
                    Parameters.SetAttributeBoolean("oUpdateOperationDuration", updateTime)
                    
                    // Rule 2: 
                    // It is possible to not define this rule. But, if user decides to define this rule, 
                    // first set the updateTime to true. 
                    Set newType = "Estimated"	
                    Parameters.SetAttributeString("oNewOperationTimeType", newType)
                    }