Class ActivityPrecedence
-
- All Implemented Interfaces:
public class ActivityPrecedenceA class modeling precedence relationships among activities
-
-
Constructor Summary
Constructors Constructor Description ActivityPrecedence(List<String> preActs, List<String> postActs, String preType, String postType, Matrix preParams, Matrix postParams)Constructs an ActivityPrecedence with the specified parameters. ActivityPrecedence(List<String> preActs, List<String> postActs, String preType, String postType, Matrix preParams)Constructs an ActivityPrecedence with the specified parameters, without postParams. ActivityPrecedence(List<String> preActs, List<String> postActs, String preType, String postType)Constructs an ActivityPrecedence with the specified parameters, without preParams and postParams. ActivityPrecedence(List<String> preActs, List<String> postActs, String preType)Constructs an ActivityPrecedence with the specified parameters, assuming POST_SEQ as postType. ActivityPrecedence(List<String> preActs, List<String> postActs)Constructs an ActivityPrecedence with the specified parameters, assuming PRE_SEQ as preType and POST_SEQ as postType.
-
Method Summary
Modifier and Type Method Description static ActivityPrecedencefromActivities(List<Activity> preActs, List<Activity> postActs, String preType, String postType, Matrix preParams, Matrix postParams)Creates an ActivityPrecedence with Activity objects. static ActivityPrecedencefromActivities(List<Activity> preActs, List<Activity> postActs, String preType, String postType, Matrix preParams)Creates an ActivityPrecedence with Activity objects, without postParams. static ActivityPrecedencefromActivities(List<Activity> preActs, List<Activity> postActs, String preType, String postType)Creates an ActivityPrecedence with Activity objects, without preParams and postParams. static ActivityPrecedencefromActivities(List<Activity> preActs, List<Activity> postActs, String preType)Creates an ActivityPrecedence with Activity objects, assuming POST_SEQ as postType. static ActivityPrecedencefromActivities(List<Activity> preActs, List<Activity> postActs)Creates an ActivityPrecedence with Activity objects, assuming PRE_SEQ as preType and POST_SEQ as postType. static ActivityPrecedenceAndFork(Activity preAct, List<Activity> postActs)Creates an ActivityPrecedence object representing an AND-fork relationship. static ActivityPrecedenceAndFork(String preAct, List<String> postActs)Creates an ActivityPrecedence object representing an AND-fork relationship. static ActivityPrecedenceAndFork(String preAct, List<String> postActs, Matrix fanout)Creates an ActivityPrecedence object representing an AND-fork relationship with a specified fanout matrix. static ActivityPrecedenceAndFork(Activity preAct, List<Activity> postActs, Matrix fanout)Creates an ActivityPrecedence object representing an AND-fork relationship with a specified fanout matrix. static ActivityPrecedenceAndJoin(List<String> preActs, String postAct)Creates an ActivityPrecedence object representing an AND-join relationship. static ActivityPrecedenceAndJoin(List<Activity> preActs, Activity postAct)Creates an ActivityPrecedence object representing an AND-join relationship. static ActivityPrecedenceAndJoin(List<Activity> preActs, Activity postAct, Matrix quorum)Creates an ActivityPrecedence object representing an AND-join relationship with a specified quorum matrix. static ActivityPrecedenceAndJoin(List<String> preActs, String postAct, Matrix quorum)Creates an ActivityPrecedence object representing an AND-join relationship with a specified quorum matrix. static ActivityPrecedenceCacheAccess(Activity preAct, List<Activity> postActs)Creates an ActivityPrecedence object representing a cache access relationship. static ActivityPrecedenceCacheAccess(String preAct, List<String> postActs)Creates an ActivityPrecedence object representing a cache access relationship. static ActivityPrecedenceLoop(Activity preAct, Activity loopAct, Activity endAct, double nloops)Creates an ActivityPrecedence object representing a loop relationship. static ActivityPrecedenceLoop(String preAct, String loopAct, String endAct, double nloops)Creates an ActivityPrecedence object representing a loop relationship. static ActivityPrecedenceLoop(Activity preAct, List<Activity> postActs, double nloops)Creates an ActivityPrecedence object representing a loop relationship. static ActivityPrecedenceLoop(String preAct, List<String> postActs, double nloops)Creates an ActivityPrecedence object representing a loop relationship. static ActivityPrecedenceLoop(String preAct, List<String> postActs, String endAct, Matrix nloops)static ActivityPrecedenceLoop(Activity preAct, List<Activity> postActs, Activity endAct, Matrix nloops)static ActivityPrecedenceLoop(Activity preAct, List<Activity> postActs, Matrix nloops)Creates an ActivityPrecedence object representing a loop relationship. static ActivityPrecedenceLoop(String preAct, List<String> postActs, Matrix nloops)Creates an ActivityPrecedence object representing a loop relationship. static ActivityPrecedenceLoop(Activity preAct, Activity loopAct, Activity endAct, Matrix nloops)Creates an ActivityPrecedence object representing a loop relationship. static ActivityPrecedenceLoop(String preAct, String loopAct, String endAct, Matrix nloops)Creates an ActivityPrecedence object representing a loop relationship. static ActivityPrecedenceOrFork(Activity preAct, List<Activity> postActs, Matrix probs)Creates an ActivityPrecedence object representing an OR-fork relationship with a specified probability matrix. static ActivityPrecedenceOrFork(String preAct, List<String> postActs, Matrix probs)Creates an ActivityPrecedence object representing an OR-fork relationship with a specified probability matrix. static ActivityPrecedenceOrJoin(List<String> preActs, String postAct)Creates an ActivityPrecedence object representing an OR-join relationship. static ActivityPrecedenceOrJoin(List<Activity> preActs, Activity postAct)Creates an ActivityPrecedence object representing an OR-join relationship. static Array<ActivityPrecedence>Serial(List<out Object> varargin)Creates an array of ActivityPrecedence objects representing a sequence. static ActivityPrecedenceSerial(String preAct, String postAct)Creates an ActivityPrecedence object representing a sequence relationship. static ActivityPrecedenceSerial(Activity preAct, Activity postAct)Creates an ActivityPrecedence object representing a sequence relationship. static Array<ActivityPrecedence>Serial(Array<Activity> activities)Creates an array of ActivityPrecedence objects representing a sequence from varargs. static Array<ActivityPrecedence>Serial(Array<String> activities)Creates an array of ActivityPrecedence objects representing a sequence from varargs. static ActivityPrecedenceXor(Activity preAct, List<Activity> postActs, Matrix probs)Creates an ActivityPrecedence object representing an XOR relationship. static ActivityPrecedenceXor(String preAct, List<String> postActs, Matrix probs)Creates an ActivityPrecedence object representing an XOR relationship. List<String>getPreActs()Returns the list of preceding activity names. List<String>getPostActs()Returns the list of following activity names. StringgetPreType()Returns the type of the precedence relationship before the activity. StringgetPostType()Returns the type of the precedence relationship after the activity. MatrixgetPreParams()Returns the parameters for the preceding activities. MatrixgetPostParams()Returns the parameters for the following activities. static intgetPrecedenceId(String precedence)Retrieves the precedence ID based on the precedence type string. -
-
Constructor Detail
-
ActivityPrecedence
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 activity namespostActs- the list of following activity namespreType- the type of the precedence relationship before the activitypostType- the type of the precedence relationship after the activitypreParams- the parameters for the preceding activitiespostParams- the parameters for the following activities
-
ActivityPrecedence
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 activity namespostActs- the list of following activity namespreType- the type of the precedence relationship before the activitypostType- the type of the precedence relationship after the activitypreParams- the parameters for the preceding activities
-
ActivityPrecedence
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 activity namespostActs- the list of following activity namespreType- the type of the precedence relationship before the activitypostType- the type of the precedence relationship after the activity
-
ActivityPrecedence
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 activity namespostActs- the list of following activity namespreType- the type of the precedence relationship before the activity
-
ActivityPrecedence
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 activity namespostActs- the list of following activity names
-
-
Method Detail
-
fromActivities
static ActivityPrecedence fromActivities(List<Activity> preActs, List<Activity> postActs, String preType, String postType, Matrix preParams, Matrix postParams)
Creates an ActivityPrecedence with Activity objects.
- Parameters:
preActs- the list of preceding activitiespostActs- the list of following activitiespreType- the type of the precedence relationship before the activitypostType- the type of the precedence relationship after the activitypreParams- the parameters for the preceding activitiespostParams- the parameters for the following activities- Returns:
an ActivityPrecedence object
-
fromActivities
static ActivityPrecedence fromActivities(List<Activity> preActs, List<Activity> postActs, String preType, String postType, Matrix preParams)
Creates an ActivityPrecedence with Activity objects, without postParams.
- Parameters:
preActs- the list of preceding activitiespostActs- the list of following activitiespreType- the type of the precedence relationship before the activitypostType- the type of the precedence relationship after the activitypreParams- the parameters for the preceding activities- Returns:
an ActivityPrecedence object
-
fromActivities
static ActivityPrecedence fromActivities(List<Activity> preActs, List<Activity> postActs, String preType, String postType)
Creates an ActivityPrecedence with Activity objects, without preParams and postParams.
- Parameters:
preActs- the list of preceding activitiespostActs- the list of following activitiespreType- the type of the precedence relationship before the activitypostType- the type of the precedence relationship after the activity- Returns:
an ActivityPrecedence object
-
fromActivities
static ActivityPrecedence fromActivities(List<Activity> preActs, List<Activity> postActs, String preType)
Creates an ActivityPrecedence with Activity objects, assuming POST_SEQ as postType.
- Parameters:
preActs- the list of preceding activitiespostActs- the list of following activitiespreType- the type of the precedence relationship before the activity- Returns:
an ActivityPrecedence object
-
fromActivities
static ActivityPrecedence fromActivities(List<Activity> preActs, List<Activity> postActs)
Creates an ActivityPrecedence with Activity objects, assuming PRE_SEQ as preType and POST_SEQ as postType.
- Parameters:
preActs- the list of preceding activitiespostActs- the list of following activities- Returns:
an ActivityPrecedence object
-
AndFork
static ActivityPrecedence AndFork(Activity preAct, List<Activity> postActs)
Creates an ActivityPrecedence object representing an AND-fork relationship.
- Parameters:
preAct- the preceding activitypostActs- the list of following activities- Returns:
an ActivityPrecedence object
-
AndFork
static ActivityPrecedence AndFork(String preAct, List<String> postActs)
Creates an ActivityPrecedence object representing an AND-fork relationship.
- Parameters:
preAct- the preceding activitypostActs- the list of following activities- Returns:
an ActivityPrecedence object
-
AndFork
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 activitypostActs- the list of following activitiesfanout- the fanout matrix- Returns:
an ActivityPrecedence object
-
AndFork
static ActivityPrecedence AndFork(Activity preAct, List<Activity> postActs, Matrix fanout)
Creates an ActivityPrecedence object representing an AND-fork relationship with a specified fanout matrix.
- Parameters:
preAct- the preceding activitypostActs- the list of following activitiesfanout- the fanout matrix- Returns:
an ActivityPrecedence object
-
AndJoin
static ActivityPrecedence AndJoin(List<String> preActs, String postAct)
Creates an ActivityPrecedence object representing an AND-join relationship.
- Parameters:
preActs- the list of preceding activitiespostAct- the following activity- Returns:
an ActivityPrecedence object
-
AndJoin
static ActivityPrecedence AndJoin(List<Activity> preActs, Activity postAct)
Creates an ActivityPrecedence object representing an AND-join relationship.
- Parameters:
preActs- the list of preceding activitiespostAct- the following activity- Returns:
an ActivityPrecedence object
-
AndJoin
static ActivityPrecedence AndJoin(List<Activity> preActs, Activity postAct, Matrix quorum)
Creates an ActivityPrecedence object representing an AND-join relationship with a specified quorum matrix.
- Parameters:
preActs- the list of preceding activitiespostAct- the following activityquorum- the quorum matrix- Returns:
an ActivityPrecedence object
-
AndJoin
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 activitiespostAct- the following activityquorum- the quorum matrix- Returns:
an ActivityPrecedence object
-
CacheAccess
static ActivityPrecedence CacheAccess(Activity preAct, List<Activity> postActs)
Creates an ActivityPrecedence object representing a cache access relationship.
- Parameters:
preAct- the preceding activitypostActs- the list of following activities- Returns:
an ActivityPrecedence object
-
CacheAccess
static ActivityPrecedence CacheAccess(String preAct, List<String> postActs)
Creates an ActivityPrecedence object representing a cache access relationship.
- Parameters:
preAct- the preceding activitypostActs- the list of following activities- Returns:
an ActivityPrecedence object
-
Loop
static ActivityPrecedence Loop(Activity preAct, Activity loopAct, Activity endAct, double nloops)
Creates an ActivityPrecedence object representing a loop relationship.
- Parameters:
preAct- the preceding activityloopAct- the activity that is loopedendAct- the activity after the loop completesnloops- the number of loops- Returns:
an ActivityPrecedence object
-
Loop
static ActivityPrecedence Loop(String preAct, String loopAct, String endAct, double nloops)
Creates an ActivityPrecedence object representing a loop relationship.
- Parameters:
preAct- the preceding activityloopAct- the activity that is loopedendAct- the activity after the loop completesnloops- the number of loops- Returns:
an ActivityPrecedence object
-
Loop
static ActivityPrecedence Loop(Activity preAct, List<Activity> postActs, double nloops)
Creates an ActivityPrecedence object representing a loop relationship.
- Parameters:
preAct- the preceding activitypostActs- a list with loopAct and endAct (see 4-parameter Loop constructor)nloops- the number of loops- Returns:
an ActivityPrecedence object
-
Loop
static ActivityPrecedence Loop(String preAct, List<String> postActs, double nloops)
Creates an ActivityPrecedence object representing a loop relationship.
- Parameters:
preAct- the preceding activitypostActs- a list with loopAct and endAct (see 4-parameter Loop constructor)nloops- the number of loops- Returns:
an ActivityPrecedence object
-
Loop
static ActivityPrecedence Loop(String preAct, List<String> postActs, String endAct, Matrix nloops)
-
Loop
static ActivityPrecedence Loop(Activity preAct, List<Activity> postActs, Activity endAct, Matrix nloops)
-
Loop
static ActivityPrecedence Loop(Activity preAct, List<Activity> postActs, Matrix nloops)
Creates an ActivityPrecedence object representing a loop relationship.
- Parameters:
preAct- the preceding activitypostActs- a list with loopAct and endAct (see 4-parameter Loop constructor)nloops- the number of loops- Returns:
an ActivityPrecedence object
-
Loop
static ActivityPrecedence Loop(String preAct, List<String> postActs, Matrix nloops)
Creates an ActivityPrecedence object representing a loop relationship.
- Parameters:
preAct- the preceding activitypostActs- a list with loopAct and endAct (see 4-parameter Loop constructor)nloops- the number of loops- Returns:
an ActivityPrecedence object
-
Loop
static ActivityPrecedence Loop(Activity preAct, Activity loopAct, Activity endAct, Matrix nloops)
Creates an ActivityPrecedence object representing a loop relationship.
- Parameters:
preAct- the preceding activityloopAct- the activity that is loopedendAct- the activity after the loop completesnloops- the number of loops- Returns:
an ActivityPrecedence object
-
Loop
static ActivityPrecedence Loop(String preAct, String loopAct, String endAct, Matrix nloops)
Creates an ActivityPrecedence object representing a loop relationship.
- Parameters:
preAct- the preceding activityloopAct- the activity that is loopedendAct- the activity after the loop completesnloops- the number of loops- Returns:
an ActivityPrecedence object
-
OrFork
static ActivityPrecedence OrFork(Activity preAct, List<Activity> postActs, Matrix probs)
Creates an ActivityPrecedence object representing an OR-fork relationship with a specified probability matrix.
- Parameters:
preAct- the preceding activitypostActs- the list of following activitiesprobs- the probability matrix- Returns:
an ActivityPrecedence object
-
OrFork
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 activitypostActs- the list of following activitiesprobs- the probability matrix- Returns:
an ActivityPrecedence object
-
OrJoin
static ActivityPrecedence OrJoin(List<String> preActs, String postAct)
Creates an ActivityPrecedence object representing an OR-join relationship.
- Parameters:
preActs- the list of preceding activitiespostAct- the following activity- Returns:
an ActivityPrecedence object
-
OrJoin
static ActivityPrecedence OrJoin(List<Activity> preActs, Activity postAct)
Creates an ActivityPrecedence object representing an OR-join relationship.
- Parameters:
preActs- the list of preceding activitiespostAct- the following activity- Returns:
an ActivityPrecedence object
-
Serial
static Array<ActivityPrecedence> Serial(List<out Object> varargin)
Creates an array of ActivityPrecedence objects representing a sequence.
- Parameters:
varargin- the list of activity names- Returns:
an array of ActivityPrecedence objects
-
Serial
static ActivityPrecedence Serial(String preAct, String postAct)
Creates an ActivityPrecedence object representing a sequence relationship.
- Parameters:
preAct- the preceding activitypostAct- the following activity- Returns:
an ActivityPrecedence object
-
Serial
static ActivityPrecedence Serial(Activity preAct, Activity postAct)
Creates an ActivityPrecedence object representing a sequence relationship.
- Parameters:
preAct- the preceding activitypostAct- the following activity- Returns:
an ActivityPrecedence object
-
Serial
static Array<ActivityPrecedence> Serial(Array<Activity> activities)
Creates an array of ActivityPrecedence objects representing a sequence from varargs.
- Parameters:
activities- the activities to form a serial sequence- Returns:
an array of ActivityPrecedence objects
-
Serial
static Array<ActivityPrecedence> Serial(Array<String> activities)
Creates an array of ActivityPrecedence objects representing a sequence from varargs.
- Parameters:
activities- the activity names to form a serial sequence- Returns:
an array of ActivityPrecedence objects
-
Xor
static ActivityPrecedence Xor(Activity preAct, List<Activity> postActs, Matrix probs)
Creates an ActivityPrecedence object representing an XOR relationship.
- Parameters:
preAct- the preceding activitypostActs- the list of following activitiesprobs- the probability matrix- Returns:
an ActivityPrecedence object
-
Xor
static ActivityPrecedence Xor(String preAct, List<String> postActs, Matrix probs)
Creates an ActivityPrecedence object representing an XOR relationship.
- Parameters:
preAct- the preceding activitypostActs- the list of following activitiesprobs- the probability matrix- Returns:
an ActivityPrecedence object
-
getPreActs
List<String> getPreActs()
Returns the list of preceding activity names.
- Returns:
the list of preceding activity names
-
getPostActs
List<String> getPostActs()
Returns the list of following activity names.
- Returns:
the list of following activity names
-
getPreType
String getPreType()
Returns the type of the precedence relationship before the activity.
- Returns:
the pre-type string
-
getPostType
String getPostType()
Returns the type of the precedence relationship after the activity.
- Returns:
the post-type string
-
getPreParams
Matrix getPreParams()
Returns the parameters for the preceding activities.
- Returns:
the pre-parameters matrix
-
getPostParams
Matrix getPostParams()
Returns the parameters for the following activities.
- Returns:
the post-parameters matrix
-
getPrecedenceId
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
-
-
-
-