Class ActivityPrecedence

java.lang.Object
jline.lang.layered.ActivityPrecedence

public class ActivityPrecedence extends Object
A class modeling precedence relationships among activities
  • Field Details

    • preActs

      protected List<String> preActs
    • postActs

      protected List<String> postActs
    • preType

      protected String preType
    • postType

      protected String postType
    • preParams

      protected Matrix preParams
    • postParams

      protected Matrix postParams
  • Constructor Details

    • ActivityPrecedence

      public ActivityPrecedence(List<String> preActs, List<String> postActs, String preType, String postType, Matrix preParams, Matrix postParams)
      Constructs an ActivityPrecedence with the specified parameters.
      Parameters:
      preActs - the list of preceding activities
      postActs - the list of following activities
      preType - the type of the precedence relationship before the activity
      postType - the type of the precedence relationship after the activity
      preParams - the parameters for the preceding activities
      postParams - the parameters for the following activities
    • ActivityPrecedence

      public ActivityPrecedence(List<String> preActs, List<String> postActs, String preType, String postType, Matrix preParams)
      Constructs an ActivityPrecedence with the specified parameters, without postParams.
      Parameters:
      preActs - the list of preceding activities
      postActs - the list of following activities
      preType - the type of the precedence relationship before the activity
      postType - the type of the precedence relationship after the activity
      preParams - the parameters for the preceding activities
    • ActivityPrecedence

      public ActivityPrecedence(List<String> preActs, List<String> postActs, String preType, String postType)
      Constructs an ActivityPrecedence with the specified parameters, without preParams and postParams.
      Parameters:
      preActs - the list of preceding activities
      postActs - the list of following activities
      preType - the type of the precedence relationship before the activity
      postType - the type of the precedence relationship after the activity
    • ActivityPrecedence

      public ActivityPrecedence(List<String> preActs, List<String> postActs, String preType)
      Constructs an ActivityPrecedence with the specified parameters, assuming POST_SEQ as postType.
      Parameters:
      preActs - the list of preceding activities
      postActs - the list of following activities
      preType - the type of the precedence relationship before the activity
    • ActivityPrecedence

      public ActivityPrecedence(List<String> preActs, List<String> postActs)
      Constructs an ActivityPrecedence with the specified parameters, assuming PRE_SEQ as preType and POST_SEQ as postType.
      Parameters:
      preActs - the list of preceding activities
      postActs - the list of following activities
    • ActivityPrecedence

      public ActivityPrecedence(boolean isActivity, List<Activity> preActs, List<Activity> postActs, String preType, String postType, Matrix preParams, Matrix postParams)
      Constructs an ActivityPrecedence using activity objects instead of strings, with all parameters.
      Parameters:
      isActivity - flag to indicate if the parameters are activity objects
      preActs - the list of preceding activities
      postActs - the list of following activities
      preType - the type of the precedence relationship before the activity
      postType - the type of the precedence relationship after the activity
      preParams - the parameters for the preceding activities
      postParams - the parameters for the following activities
    • ActivityPrecedence

      public ActivityPrecedence(boolean isActivity, List<Activity> preActs, List<Activity> postActs, String preType, String postType, Matrix preParams)
      Constructs an ActivityPrecedence using activity objects instead of strings, without postParams.
      Parameters:
      isActivity - flag to indicate if the parameters are activity objects
      preActs - the list of preceding activities
      postActs - the list of following activities
      preType - the type of the precedence relationship before the activity
      postType - the type of the precedence relationship after the activity
      preParams - the parameters for the preceding activities
    • ActivityPrecedence

      public ActivityPrecedence(boolean isActivity, List<Activity> preActs, List<Activity> postActs, String preType, String postType)
      Constructs an ActivityPrecedence using activity objects instead of strings, without preParams and postParams.
      Parameters:
      isActivity - flag to indicate if the parameters are activity objects
      preActs - the list of preceding activities
      postActs - the list of following activities
      preType - the type of the precedence relationship before the activity
      postType - the type of the precedence relationship after the activity
    • ActivityPrecedence

      public ActivityPrecedence(boolean isActivity, List<Activity> preActs, List<Activity> postActs, String preType)
      Constructs an ActivityPrecedence using activity objects instead of strings, assuming POST_SEQ as postType.
      Parameters:
      isActivity - flag to indicate if the parameters are activity objects
      preActs - the list of preceding activities
      postActs - the list of following activities
      preType - the type of the precedence relationship before the activity
    • ActivityPrecedence

      public ActivityPrecedence(boolean isActivity, List<Activity> preActs, List<Activity> postActs)
      Constructs an ActivityPrecedence using activity objects instead of strings, assuming PRE_SEQ as preType and POST_SEQ as postType.
      Parameters:
      isActivity - flag to indicate if the parameters are activity objects
      preActs - the list of preceding activities
      postActs - the list of following activities
  • Method Details

    • Serial

      public static ActivityPrecedence[] Serial(List<String> varargin)
      Creates an array of ActivityPrecedence objects representing a sequence.
      Parameters:
      varargin - the list of activity names
      Returns:
      an array of ActivityPrecedence objects
    • getPrecedenceId

      public static int getPrecedenceId(String precedence)
      Retrieves the precedence ID based on the precedence type string.
      Parameters:
      precedence - the precedence type string
      Returns:
      the precedence ID
    • Sequence

      public static ActivityPrecedence Sequence(String preAct, String postAct)
      Creates an ActivityPrecedence object representing a sequence relationship.
      Parameters:
      preAct - the preceding activity
      postAct - the following activity
      Returns:
      an ActivityPrecedence object
    • AndJoin

      public static ActivityPrecedence AndJoin(List<String> preActs, String postAct)
      Creates an ActivityPrecedence object representing an AND-join relationship.
      Parameters:
      preActs - the list of preceding activities
      postAct - the following activity
      Returns:
      an ActivityPrecedence object
    • AndJoin

      public static ActivityPrecedence AndJoin(List<String> preActs, String postAct, Matrix quorum)
      Creates an ActivityPrecedence object representing an AND-join relationship with a specified quorum matrix.
      Parameters:
      preActs - the list of preceding activities
      postAct - the following activity
      quorum - the quorum matrix
      Returns:
      an ActivityPrecedence object
    • OrJoin

      public static ActivityPrecedence OrJoin(List<String> preActs, String postAct)
      Creates an ActivityPrecedence object representing an OR-join relationship.
      Parameters:
      preActs - the list of preceding activities
      postAct - the following activity
      Returns:
      an ActivityPrecedence object
    • AndFork

      public static ActivityPrecedence AndFork(String preAct, List<String> postActs)
      Creates an ActivityPrecedence object representing an AND-fork relationship.
      Parameters:
      preAct - the preceding activity
      postActs - the list of following activities
      Returns:
      an ActivityPrecedence object
    • AndFork

      public static ActivityPrecedence AndFork(String preAct, List<String> postActs, Matrix fanout)
      Creates an ActivityPrecedence object representing an AND-fork relationship with a specified fanout matrix.
      Parameters:
      preAct - the preceding activity
      postActs - the list of following activities
      fanout - the fanout matrix
      Returns:
      an ActivityPrecedence object
    • Xor

      public static ActivityPrecedence Xor(String preAct, List<String> postActs, Matrix probs)
      Creates an ActivityPrecedence object representing an XOR relationship.
      Parameters:
      preAct - the preceding activity
      postActs - the list of following activities
      probs - the probability matrix
      Returns:
      an ActivityPrecedence object
    • OrFork

      public static ActivityPrecedence OrFork(String preAct, List<String> postActs, Matrix probs)
      /** Creates an ActivityPrecedence object representing an OR-fork relationship with a specified probability matrix.
      Parameters:
      preAct - the preceding activity
      postActs - the list of following activities
      probs - the probability matrix
      Returns:
      an ActivityPrecedence object
    • Loop

      public static ActivityPrecedence Loop(String preAct, String loopAct, String endAct, double nloops)
      Creates an ActivityPrecedence object representing a loop relationship.
      Parameters:
      preAct - the preceding activity
      loopAct - the activity that is looped
      endAct - the activity after the loop completes
      nloops - the number of loops
      Returns:
      an ActivityPrecedence object
    • Loop

      public static ActivityPrecedence Loop(String preAct, List<String> postActs, double nloops)
      Creates an ActivityPrecedence object representing a loop relationship.
      Parameters:
      preAct - the preceding activity
      postActs - a list with loopAct and endAct (see 4-parameter Loop constructor)
      nloops - the number of loops
      Returns:
      an ActivityPrecedence object
    • Loop

      public static ActivityPrecedence Loop(String preAct, List<String> postActs, Matrix nloops)
      Creates an ActivityPrecedence object representing a loop relationship.
      Parameters:
      preAct - the preceding activity
      postActs - a list with loopAct and endAct (see 4-parameter Loop constructor)
      nloops - the number of loops
      Returns:
      an ActivityPrecedence object
    • Loop

      public static ActivityPrecedence Loop(String preAct, String loopAct, String endAct, Matrix nloops)
      Creates an ActivityPrecedence object representing a loop relationship.
      Parameters:
      preAct - the preceding activity
      loopAct - the activity that is looped
      endAct - the activity after the loop completes
      nloops - the number of loops
      Returns:
      an ActivityPrecedence object
    • CacheAccess

      public static ActivityPrecedence CacheAccess(String preAct, List<String> postActs)
      Creates an ActivityPrecedence object representing a cache access relationship.
      Parameters:
      preAct - the preceding activity
      postActs - the list of following activities
      Returns:
      an ActivityPrecedence object