|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is meant to encapsulate all the behavior of an activity that needs to be exposed to the end user. Any class that implements this interface will be able to set up activities, build relationships between activities and resources, and also establish transition times.
Method Summary | |
void |
addResource(int operationID,
int resourceID,
int start,
int end,
int minDur,
int maxDur)
Creates and adds the resource to the specified operation |
boolean |
choicePointStackSet()
Returns true if a call to setChoicePointStack will fail |
jopt.csp.variable.CspConstraint |
endsAfterEndOf(Activity act)
Returns a constraint constraining this activity to end after the end of act |
jopt.csp.variable.CspConstraint |
endsAfterEndOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to end after the end of expr |
jopt.csp.variable.CspConstraint |
endsAfterStartOf(Activity act)
Returns a constraint constraining this activity to end after the start of act |
jopt.csp.variable.CspConstraint |
endsAfterStartOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to end after the start of expr |
jopt.csp.variable.CspConstraint |
endsAtEndOf(Activity act)
Returns a constraint constraining this activity to end at the end of act |
jopt.csp.variable.CspConstraint |
endsAtEndOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to end at the end of expr |
jopt.csp.variable.CspConstraint |
endsAtStartOf(Activity act)
Returns a constraint constraining this activity to end at the start of act |
jopt.csp.variable.CspConstraint |
endsAtStartOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to end at the start of expr |
jopt.csp.variable.CspConstraint |
endsBeforeEndOf(Activity act)
Returns a constraint constraining this activity to end before the end of act |
jopt.csp.variable.CspConstraint |
endsBeforeEndOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to end before the end of expr |
jopt.csp.variable.CspConstraint |
endsBeforeStartOf(Activity act)
Returns a constraint constraining this activity to end before the start of act |
jopt.csp.variable.CspConstraint |
endsBeforeStartOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to end before the start of expr |
ResourceSet[] |
getAllAlternativeResourceSets()
Gets all sets of alternative resources that exist within this activity |
int |
getAvailResourceCount(int operationId)
Returns the number of resources that can still be assigned to the operation with the specified id |
jopt.csp.variable.CspIntExpr |
getDurationExpr()
Returns an expression indicating the duration of this activity |
int |
getDurationMax()
Gets the maximum duration |
int |
getDurationMin()
Gets the minimum duration |
int |
getEarliestEndTime()
Returns the earliest end time for this activity |
int |
getEarliestEndTime(int operationID,
int resourceID)
Returns the earliest end time for the specified operation and resource |
int |
getEarliestStartTime()
Returns the earliest start time for this activity |
int |
getEarliestStartTime(int operationID,
int resourceID)
Returns the earliest start time for the specified operation and resource |
jopt.csp.variable.CspIntExpr |
getEndTimeExpr()
Returns an expression indicating the possible end times for this activity |
int |
getID()
Returns the activity's id |
int |
getLatestEndTime()
Returns the latest end time for this activity |
int |
getLatestEndTime(int operationID,
int resourceID)
Returns the latest end time for the specified operation and resource |
int |
getLatestStartTime()
Returns the latest start time for this activity |
int |
getLatestStartTime(int operationID,
int resourceID)
Returns the latest start time for the specified operation and resource |
int |
getNumUnassignedOperations()
Gets the number of operations that are in need of a resource assignment |
int[] |
getRequiredResources()
Returns all resources that this activity uses |
jopt.csp.variable.CspIntExpr |
getStartTimeExpr()
Returns an expression indicating the possible start times for this activity |
int |
getTransitionFromCategory()
Returns the category that has been established as the "transition from" category of this activity. |
int |
getTransitionToCategory()
Returns the category that has been established as the "transition to" category of this activity. |
boolean |
isBound()
Returns true if all operation have a resource assigned to them and the activity has a unique start and end time |
void |
removePossibleResource(int operationId,
int resourceId)
Removes the resource with the specified resource id from the list of possible resources for the operation with the specified operation id |
void |
removeStartTime(int n)
Removes a single value from the potential start times of this activity |
void |
removeStartTimes(int start,
int end)
Removes a range of start time values from this activity |
jopt.csp.variable.CspConstraint |
require(Resource[] possResourceSet,
int capacity)
Builds a constraint that forces this activity to require one of resources in the given set in the capacity specified. |
void |
setChoicePointStack(jopt.csp.spi.solver.ChoicePointStack cps)
Sets the choicepoint stack associated with this activity |
void |
setDurationMax(int durMax)
Sets the maximum duration of the activity |
void |
setDurationMin(int durMin)
Sets the minimum duration of the activity |
void |
setEarliestEndTime(int eet)
Set the earliest end time for the activity |
void |
setEarliestEndTime(int resourceIdx,
int eet)
Set the earliest end time for the resource at the specified index |
void |
setEarliestStartTime(int est)
Set the earliest start time for the activity |
void |
setEarliestStartTime(int resourceID,
int est)
Set the earliest start time for the resource with the specified id |
void |
setLatestEndTime(int let)
Set the latest end time for the activity |
void |
setLatestEndTime(int resourceIdx,
int let)
Set the latest end time for the resource at the specified index |
void |
setLatestStartTime(int lst)
Set the latest start time for the activity |
void |
setLatestStartTime(int resourceId,
int lst)
Set the latest start time for resource with the specified id |
void |
setRequiredResource(int operationId,
int resourceId)
Forces the operation with the specified operationId to use the resource with the specified resourceId. |
void |
setStartTime(int n)
Restricts the start time of this activity to a single value |
void |
setStartTime(int resourceID,
int n)
Restricts the start time of the specified resource to a single value |
void |
setStartTimeRange(int start,
int end)
Restricts the start time of this activity to be between start and end |
void |
setTimeline(int operationID,
int resourceID,
jopt.csp.util.IntIntervalSet timeline)
Sets the available timelines of the given resource for this activity / operation combination |
void |
setTransitionFromCategory(int transitFromCategory)
Sets the "transition from" category and makes sure to update the transition table if one has been registered |
void |
setTransitionToCategory(int transitionToCategory)
Sets the "transition to" category and makes sure to update the transition table if one has been registered |
void |
setTransitTimeFrom(Activity transitFromAct,
int transitTime)
Sets the transition time from the "transition from" activity to this activity |
void |
setTransitTimeFrom(int transitFromCat,
int transitTime)
Sets the transition time for the "transition from" category for this activity |
void |
setTransitTimeTo(Activity transitToAct,
int transitTime)
Sets the transition time from this activity to the "transition to" activity |
void |
setTransitTimeTo(int transitToCat,
int transitTime)
Sets the transition time for the "transition to" category for this activity |
jopt.csp.variable.CspConstraint |
startsAfterEndOf(Activity act)
Returns a constraint constraining this activity to start after the end of act |
jopt.csp.variable.CspConstraint |
startsAfterEndOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to start after the end of expr |
jopt.csp.variable.CspConstraint |
startsAfterStartOf(Activity act)
Returns a constraint constraining this activity to start after the start of act |
jopt.csp.variable.CspConstraint |
startsAfterStartOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to start after the start of expr |
jopt.csp.variable.CspConstraint |
startsAtEndOf(Activity act)
Returns a constraint constraining this activity to start at the end of act |
jopt.csp.variable.CspConstraint |
startsAtEndOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to start at the end of expr |
jopt.csp.variable.CspConstraint |
startsAtStartOf(Activity act)
Returns a constraint constraining this activity to start at the start of act |
jopt.csp.variable.CspConstraint |
startsAtStartOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to start at the start of expr |
jopt.csp.variable.CspConstraint |
startsBeforeEndOf(Activity act)
Returns a constraint constraining this activity to start before the end of act |
jopt.csp.variable.CspConstraint |
startsBeforeEndOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to start before the end of expr |
jopt.csp.variable.CspConstraint |
startsBeforeStartOf(Activity act)
Returns a constraint constraining this activity to start before the start of act |
jopt.csp.variable.CspConstraint |
startsBeforeStartOf(jopt.csp.variable.CspIntExpr expr)
Returns a constraint constraining this activity to start before the start of expr |
void |
updateGraph(jopt.csp.spi.arcalgorithm.graph.NodeArcGraph graph)
Adds nodes representing this expression to the node arc graph |
Method Detail |
public int getTransitionToCategory()
public void setTransitionToCategory(int transitionToCategory)
transitionToCategory
- new "transition to" categorypublic int getTransitionFromCategory()
public void setTransitionFromCategory(int transitFromCategory)
transitFromCategory
- new transit from categorypublic int getNumUnassignedOperations()
public int getAvailResourceCount(int operationId)
operationId
- the operation for which the resource count is desired
public void setRequiredResource(int operationId, int resourceId) throws jopt.csp.variable.PropagationFailureException
operationId
- the id of the operation for which we are setting the required resourceresourceId
- the id of the resource to be used by the operation
jopt.csp.variable.PropagationFailureException
- if the assignment causes any errorspublic void removePossibleResource(int operationId, int resourceId) throws jopt.csp.variable.PropagationFailureException
operationId
- the id of the operation for which adjustments should be maderesourceId
- the id of the resource on which adjustments should be made
jopt.csp.variable.PropagationFailureException
- if the reduction causes any errorspublic void setTransitTimeFrom(Activity transitFromAct, int transitTime)
transitFromAct
- the activity that would theoretically occur immediatly prior to this onetransitTime
- the time it takes to transition to this activity from the specified activitypublic void setTransitTimeTo(Activity transitToAct, int transitTime)
transitToAct
- the activity that would theoretically follow this activitytransitTime
- the time it takes to transition from this activity to the specified activitypublic void setTransitTimeFrom(int transitFromCat, int transitTime)
transitFromCat
- the "transition from" category of the activity that would theoretically occur immediatly prior to this onetransitTime
- the time it takes to transition from an activity of the specified category to this activitypublic void setTransitTimeTo(int transitToCat, int transitTime)
transitToCat
- the "transition to" category of the activity that would theoretically follow this onetransitTime
- the time it takes to transition from this activity to an activity of the specified categorypublic ResourceSet[] getAllAlternativeResourceSets()
public int getID()
public int getEarliestStartTime()
public jopt.csp.variable.CspConstraint require(Resource[] possResourceSet, int capacity) throws jopt.csp.variable.PropagationFailureException
possResourceSet
- an array of equivalent Resource
objects used to meet the needs of the activitycapacity
- the amount of the determined resource that will be required to accomplish the task
CspConstraint
that constrains the activity appropriately
jopt.csp.variable.PropagationFailureException
public void addResource(int operationID, int resourceID, int start, int end, int minDur, int maxDur) throws jopt.csp.variable.PropagationFailureException
operationID
- id of operation to which we are adding the resourceresourceID
- id of resource being addedstart
- earliest start time of resourceend
- latest start time of resourceminDur
- minimum duration of thismaxDur
- maximum duration
jopt.csp.variable.PropagationFailureException
public jopt.csp.variable.CspIntExpr getStartTimeExpr()
public jopt.csp.variable.CspIntExpr getEndTimeExpr()
public jopt.csp.variable.CspIntExpr getDurationExpr()
public int getEarliestStartTime(int operationID, int resourceID)
operationID
- id of operation that this resource is a part ofresourceID
- id of resource whose domain we are alteringpublic int getLatestStartTime()
public int getLatestStartTime(int operationID, int resourceID)
operationID
- id of operation that this resource is a part ofresourceID
- id of resource whose domain we are alteringpublic int getEarliestEndTime()
public int[] getRequiredResources()
public int getEarliestEndTime(int operationID, int resourceID)
operationID
- id of operation that this resource is a part ofresourceID
- id of resource whose domain we are alteringpublic int getLatestEndTime()
public int getLatestEndTime(int operationID, int resourceID)
operationID
- id of operation that this resource is a part ofresourceID
- id of resource whose domain we are alteringpublic void setEarliestStartTime(int resourceID, int est) throws jopt.csp.variable.PropagationFailureException
resourceID
- id of resourceest
- the earliest start time
jopt.csp.variable.PropagationFailureException
public void setEarliestStartTime(int est) throws jopt.csp.variable.PropagationFailureException
est
- the earliest start time
jopt.csp.variable.PropagationFailureException
public void setStartTime(int resourceID, int n) throws jopt.csp.variable.PropagationFailureException
resourceID
- id of resource we are settingn
- time we are setting
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void setLatestStartTime(int resourceId, int lst) throws jopt.csp.variable.PropagationFailureException
resourceId
- id of resourcelst
- the latest start time
jopt.csp.variable.PropagationFailureException
public void setLatestStartTime(int lst) throws jopt.csp.variable.PropagationFailureException
lst
- the latest start time
jopt.csp.variable.PropagationFailureException
public void setEarliestEndTime(int resourceIdx, int eet) throws jopt.csp.variable.PropagationFailureException
resourceIdx
- index of resourceeet
- the earliest end time
jopt.csp.variable.PropagationFailureException
public void setEarliestEndTime(int eet) throws jopt.csp.variable.PropagationFailureException
eet
- the earliest end time
jopt.csp.variable.PropagationFailureException
public void setLatestEndTime(int resourceIdx, int let) throws jopt.csp.variable.PropagationFailureException
resourceIdx
- index of resourcelet
- the latest end time
jopt.csp.variable.PropagationFailureException
public void setLatestEndTime(int let) throws jopt.csp.variable.PropagationFailureException
let
- the latest end time
jopt.csp.variable.PropagationFailureException
public void setDurationMax(int durMax) throws jopt.csp.variable.PropagationFailureException
durMax
- new maximum duration
jopt.csp.variable.PropagationFailureException
public void setDurationMin(int durMin) throws jopt.csp.variable.PropagationFailureException
durMin
- new minimum duration
jopt.csp.variable.PropagationFailureException
public int getDurationMax()
public int getDurationMin()
public void removeStartTime(int n) throws jopt.csp.variable.PropagationFailureException
n
- time remove from possible start time
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void setStartTime(int n) throws jopt.csp.variable.PropagationFailureException
n
- time to set start time to
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void removeStartTimes(int start, int end) throws jopt.csp.variable.PropagationFailureException
start
- start of the range being removedend
- end of the range being removed
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void setStartTimeRange(int start, int end) throws jopt.csp.variable.PropagationFailureException
start
- new earliest start timeend
- new latest end time
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic boolean isBound()
public void setTimeline(int operationID, int resourceID, jopt.csp.util.IntIntervalSet timeline) throws jopt.csp.variable.PropagationFailureException
operationID
- id of the operation for which this is being setresourceID
- id of the resource who's availability is being reportedtimeline
- Set that represents the times that the resource is available to service the specified operation
jopt.csp.variable.PropagationFailureException
public void setChoicePointStack(jopt.csp.spi.solver.ChoicePointStack cps)
cps
- ChoicePointStack that will have control over choice points events on this activitypublic boolean choicePointStackSet()
public jopt.csp.variable.CspConstraint endsBeforeStartOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint endsBeforeEndOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint endsAfterStartOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint endsAfterEndOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint endsAtStartOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint endsAtEndOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint startsBeforeStartOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint startsBeforeEndOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint startsAfterStartOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint startsAfterEndOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint startsAtStartOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint startsAtEndOf(Activity act)
act
- activity this is being related to
public jopt.csp.variable.CspConstraint endsBeforeStartOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public jopt.csp.variable.CspConstraint endsBeforeEndOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public jopt.csp.variable.CspConstraint endsAfterStartOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public jopt.csp.variable.CspConstraint endsAfterEndOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public jopt.csp.variable.CspConstraint endsAtStartOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public jopt.csp.variable.CspConstraint endsAtEndOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public jopt.csp.variable.CspConstraint startsBeforeStartOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public jopt.csp.variable.CspConstraint startsBeforeEndOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public jopt.csp.variable.CspConstraint startsAfterStartOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public jopt.csp.variable.CspConstraint startsAfterEndOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public jopt.csp.variable.CspConstraint startsAtStartOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public jopt.csp.variable.CspConstraint startsAtEndOf(jopt.csp.variable.CspIntExpr expr)
expr
- expr this is being related to
public void updateGraph(jopt.csp.spi.arcalgorithm.graph.NodeArcGraph graph)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |