|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jopt.js.spi.domain.activity.ActOperationDomain
Domain for operations within the context of activities. An operations start times, end times, and durations are defined as an or of all the resource associations that it encloses
Field Summary | |
static int |
CONSUMES
|
static int |
PRODUCES
|
static int |
PROVIDES
|
static int |
REQUIRES
|
Constructor Summary | |
ActOperationDomain(int usage,
int capacityMin,
int capacityMax)
Constructs an operation association for use in an activity domain |
Method Summary | |
void |
addListener(OperationDomainListener listener)
Sets the operation domain listener on this object |
void |
addResource(ActResourceDomain resource)
Adds a resource to the collection of possible resources that can be used to complete this task |
void |
afterChoicePointPopEvent()
|
void |
afterChoicePointPushEvent()
|
void |
assignTo(int index)
Assigns the operation to the resource at the given index |
void |
beforeChoicePointPopEvent()
|
void |
beforeChoicePointPushEvent()
|
boolean |
choicePointStackSet()
|
void |
deltaRemoved(int resourceID,
ActDelta delta)
Called when an ActResourceDomain event notifies this operation domain of a change to the resource domain |
void |
durationRemoved(int resourceID,
jopt.csp.util.IntIntervalSet delta)
Called when an ActResourceDomain event notifies this operation domain of a change to the specified resource's duration |
void |
endTimesRemoved(int resourceID,
jopt.csp.util.IntIntervalSet delta)
Called when an ActResourceDomain event notifies this operation domain of a change to the specified resource's end times |
jopt.js.api.variable.Resource |
get(int index)
Returns a representation of the resource at the specified index |
jopt.csp.util.IntIntervalSet |
getActualUsageTimeline(int resourceIdx)
Returns an IntIntervalSet representing the time that this operation would definitely be using the specified resource |
int |
getCapacityMax()
Returns the maximum capacity of this operation |
int |
getCapacityMin()
Returns the minimum capacity of this operation |
jopt.csp.util.IntIntervalSet |
getDuration()
Returns the set that represents this operations duration |
int |
getDurationMax()
Returns the maximum duration |
int |
getDurationMax(int resourceIdx)
Returns the maximum duration of this operation on the specified resource |
int |
getDurationMin()
Returns the minimum duration |
int |
getDurationMin(int resourceIdx)
Returns the minimum duration of this operation on the specified resource |
int |
getEarliestEndTime()
Returns the earliest time that this operation could end |
int |
getEarliestEndTime(int resourceIdx)
Returns the earliest end time for this operation with respect to the specified resource |
int |
getEarliestStartTime()
Returns the earliest time that this operation could start |
int |
getEarliestStartTime(int resourceIdx)
Returns the earliest start time for this operation with respect to the specified resource |
jopt.csp.util.IntIntervalSet |
getEndTimes()
Returns the set that represents this operations end times |
int |
getID()
Returns the id for this operation |
int |
getLatestEndTime()
Returns the latest time that this operation could end |
int |
getLatestEndTime(int resourceIdx)
Returns the latest end time for this operation with respect to the specified resource |
int |
getLatestStartTime()
Returns the latest time that this operation could start |
int |
getLatestStartTime(int resourceIdx)
Returns the latest start time for this operation with respect to the specified resource |
int |
getPossibleResourceCount()
Returns the number of resources that could possibly satisfy the constraints of this operation |
int[] |
getPossibleResourceIDs()
Returns an array of ints representing the ids of the resources that could possibly satisfy the constraints of this operation |
int[] |
getPossibleResourceIndices()
Returns an array of ints representing the idxs of the resources that could possibly satisfy the constraints of this operation |
jopt.js.api.variable.Resource[] |
getPossibleResources()
Returns an array of resources that could possibly satisfy the constraints of this operation |
jopt.csp.util.IntIntervalSet |
getPotentialUsageTimeline(int resourceIdx)
Returns an IntIntervalSet representing the times that this operation could potentially use the specified resource |
int |
getRequiredResource()
If this operation is assigned to a particular resource the id of the required resource is returned; otherwise, -1 is returned. |
int[] |
getResourceIDs()
Returns an array of ints representing the ids of the resources associated with this operation |
jopt.csp.util.IntIntervalSet |
getStartTimes()
Returns the set that represents this operations start times |
int |
getUsageType()
Returns an int representing the four ways that an operation can use a resource |
boolean |
isAssignedToResource()
Returns true if there is only one potential resource assignment left |
boolean |
isBound()
Returns true if operation has only one valid start time, end time, and resource |
void |
removeAt(int index)
Removes the resource at the given index for this operation |
void |
removeCapacityRange(int start,
int end)
Removes a range of valid values from the capacity |
void |
removeDelta(ActDelta delta)
Removes set of times from start, end, and duration times |
void |
removeDuration(int start,
int end)
Removes a range of values from the duration of this operation |
void |
removeDuration(jopt.csp.util.IntIntervalSet times)
Removes a set of times from duration times for this operation |
void |
removeEndTime(int time)
Removes a single time from the end times of this operation |
void |
removeEndTimes(int start,
int end)
Removes a range of end time values from the domain of this operation |
void |
removeEndTimes(jopt.csp.util.IntIntervalSet times)
Removes a set of times from end times for this operation |
void |
removeEndTimes(int start,
int end,
int resourceIndex)
Removes a range of values from the end times of this operation |
void |
removePossibleResource(int resourceIdx)
Removes the resource at resourceIdx from the list of possible resources for this operation |
void |
removeStartTime(int time)
Removes a single value from the start times of this operation |
void |
removeStartTimes(int start,
int end)
Removes a range of start time values from the domain of this operation |
void |
removeStartTimes(jopt.csp.util.IntIntervalSet times)
Removes a set of times from start times for this operation |
void |
removeStartTimes(int start,
int end,
int resourceIndex)
Removes a range of values from the start times of this operation |
void |
setActResListener(ActResourceDomainListener listener)
Sets the act rs listener |
void |
setCapacity(int val)
Sets the capacity of this operation |
void |
setCapacityMax(int max)
Sets the maximum capacity of this operation |
void |
setCapacityMin(int min)
Sets the minimum capacity of this operation |
void |
setCapacityRange(int start,
int end)
Sets the capacity to a range of valid values |
void |
setChoicePointStack(jopt.csp.spi.solver.ChoicePointStack cps)
|
void |
setDuration(int duration)
Sets the duration of this operation to given value |
void |
setDurationMax(int durMax)
Sets the max duration for the operation |
void |
setDurationMax(int durMax,
int resourceIndex)
Sets the maximum duration of the resource at resourceIndex |
void |
setDurationMin(int durMin)
Sets the min duration for the operation |
void |
setDurationMin(int durMin,
int resourceIndex)
Sets the minimum duration of the resource at resourceIndex |
void |
setDurationRange(int durMin,
int durMax)
Sets the range of possible duration values for the operation |
void |
setDurationRange(int durMin,
int durMax,
int resourceIndex)
Sets the a range of valid durations for the resource at resourceIndex |
void |
setEarliestEndTime(int eet)
Set the earliest end time for the operation |
void |
setEarliestEndTime(int eet,
int resourceIndex)
Set the earliest end time for the specified resource |
void |
setEarliestStartTime(int est)
Set the earliest start time for the operation |
void |
setEarliestStartTime(int est,
int resourceIndex)
Set the earliest start time for the specified resource |
void |
setID(int id)
Sets the id of this operation |
void |
setLatestEndTime(int let)
Set the latest end time for the operation |
void |
setLatestEndTime(int let,
int resourceIndex)
Set the latest end time for the specified resource |
void |
setLatestStartTime(int lst)
Set the latest start time for the operation |
void |
setLatestStartTime(int lst,
int resourceIndex)
Set the latest start time for the specified resource |
void |
setRequiredResource(int resourceIdx)
Eliminates all possible resources but the one specified |
void |
setTimeline(int resourceIdx,
jopt.csp.util.IntIntervalSet timeline)
Sets the timeline of the resource at resourceIdx |
void |
setUsageType(int usage)
Sets the way that this operation will use resources |
int |
size()
Returns the number of possible resources that may be used |
void |
startTimesRemoved(int resourceID,
jopt.csp.util.IntIntervalSet delta)
Called when an ActResourceDomain event notifies this operation domain of a change to the specified resource's start times |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int REQUIRES
public static final int CONSUMES
public static final int PRODUCES
public static final int PROVIDES
Constructor Detail |
public ActOperationDomain(int usage, int capacityMin, int capacityMax)
usage
- PRODUCES, PROVIDES, REQUIRES, or CONSUMEScapacityMin
- the minimum capacity that this operation will use of resourcecapacityMax
- the maximum capacity that this operation could potentially use of determined resourceMethod Detail |
public void addResource(ActResourceDomain resource) throws jopt.csp.variable.PropagationFailureException
resource
- resource to supplement the possible resource set with
jopt.csp.variable.PropagationFailureException
public int size()
size
in interface jopt.js.api.variable.ResourceSet
public int getID()
public void setID(int id)
id
- new id for this operationpublic jopt.js.api.variable.Resource get(int index)
get
in interface jopt.js.api.variable.ResourceSet
index
- index of resource being inquired about
public void assignTo(int index) throws jopt.csp.variable.PropagationFailureException
assignTo
in interface jopt.js.api.variable.ResourceSet
index
- of the resource to which this operation will be assigned
jopt.csp.variable.PropagationFailureException
public void removeAt(int index) throws jopt.csp.variable.PropagationFailureException
removeAt
in interface jopt.js.api.variable.ResourceSet
index
- index of the resource to remove from the list of possible resources
jopt.csp.variable.PropagationFailureException
public void addListener(OperationDomainListener listener)
listener
- public void setActResListener(ActResourceDomainListener listener)
listener
- listener to be setpublic jopt.csp.util.IntIntervalSet getStartTimes()
public jopt.csp.util.IntIntervalSet getEndTimes()
public jopt.csp.util.IntIntervalSet getDuration()
public void startTimesRemoved(int resourceID, jopt.csp.util.IntIntervalSet delta) throws jopt.csp.variable.PropagationFailureException
startTimesRemoved
in interface ActResourceDomainListener
resourceID
- id of resource that changeddelta
- the changes that occured to the start times
jopt.csp.variable.PropagationFailureException
public void endTimesRemoved(int resourceID, jopt.csp.util.IntIntervalSet delta) throws jopt.csp.variable.PropagationFailureException
endTimesRemoved
in interface ActResourceDomainListener
resourceID
- id of resource that changeddelta
- set of changes that occured to the end times
jopt.csp.variable.PropagationFailureException
public void durationRemoved(int resourceID, jopt.csp.util.IntIntervalSet delta) throws jopt.csp.variable.PropagationFailureException
durationRemoved
in interface ActResourceDomainListener
resourceID
- id of resource that changeddelta
- set of changes that occured to the duration
jopt.csp.variable.PropagationFailureException
public void deltaRemoved(int resourceID, ActDelta delta) throws jopt.csp.variable.PropagationFailureException
deltaRemoved
in interface ActResourceDomainListener
resourceID
- id of resource that changeddelta
- set of changes that occured to the resource
jopt.csp.variable.PropagationFailureException
public boolean isAssignedToResource()
public jopt.csp.util.IntIntervalSet getPotentialUsageTimeline(int resourceIdx)
resourceIdx
- the index of which resource in question
public jopt.csp.util.IntIntervalSet getActualUsageTimeline(int resourceIdx)
resourceIdx
- the index of which resource in question
public int getDurationMax(int resourceIdx)
resourceIdx
- index of resource being inquired about
public int getDurationMin(int resourceIdx)
resourceIdx
- index of resource being inquired about
public int getUsageType()
public void setUsageType(int usage)
usage
- new type of the usagepublic int getCapacityMin()
public int getCapacityMax()
public void setCapacityMin(int min) throws jopt.csp.variable.PropagationFailureException
min
- new minimum
jopt.csp.variable.PropagationFailureException
public void setCapacityMax(int max) throws jopt.csp.variable.PropagationFailureException
max
- new maximum
jopt.csp.variable.PropagationFailureException
public void setCapacity(int val) throws jopt.csp.variable.PropagationFailureException
val
- new capacity
jopt.csp.variable.PropagationFailureException
public void setCapacityRange(int start, int end) throws jopt.csp.variable.PropagationFailureException
start
- start of interval to restrict capacity toend
- end of interval to restrict capacity to
jopt.csp.variable.PropagationFailureException
public void removeCapacityRange(int start, int end) throws jopt.csp.variable.PropagationFailureException
start
- start of interval to removeend
- end of interval to remove
jopt.csp.variable.PropagationFailureException
public int getEarliestStartTime(int resourceIdx)
resourceIdx
- index of resource being inqured about
public int getLatestStartTime(int resourceIdx)
resourceIdx
- index of resource being inqured about
public int getEarliestEndTime(int resourceIdx)
resourceIdx
- index of resource being inqured about\
public int getLatestEndTime(int resourceIdx)
resourceIdx
- index of resource being inqured about
public int getPossibleResourceCount()
public int[] getPossibleResourceIDs()
public jopt.js.api.variable.Resource[] getPossibleResources()
public int[] getPossibleResourceIndices()
public void setRequiredResource(int resourceIdx) throws jopt.csp.variable.PropagationFailureException
resourceIdx
- index of the resource that this operation will use
jopt.csp.variable.PropagationFailureException
public int[] getResourceIDs()
public void removePossibleResource(int resourceIdx) throws jopt.csp.variable.PropagationFailureException
resourceIdx
- index of the resource being removed
jopt.csp.variable.PropagationFailureException
public int getRequiredResource()
public void setTimeline(int resourceIdx, jopt.csp.util.IntIntervalSet timeline) throws jopt.csp.variable.PropagationFailureException
resourceIdx
- index of the resource being settimeline
- timeline that the resource is being set to
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 setLatestStartTime(int lst) throws jopt.csp.variable.PropagationFailureException
lst
- the latest start 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 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 of this operation
jopt.csp.variable.PropagationFailureException
public void setDurationMin(int durMin) throws jopt.csp.variable.PropagationFailureException
durMin
- new minimum duration of this operation
jopt.csp.variable.PropagationFailureException
public void setDurationRange(int durMin, int durMax) throws jopt.csp.variable.PropagationFailureException
durMin
- new minimum duration of this operationdurMax
- new maximum duration of this operation
jopt.csp.variable.PropagationFailureException
public void setDuration(int duration) throws jopt.csp.variable.PropagationFailureException
duration
- val to set duration to
jopt.csp.variable.PropagationFailureException
public void removeStartTimes(int start, int end) throws jopt.csp.variable.PropagationFailureException
start
- start of the range of possible start times being removedend
- end of the range of possible start times being removed
jopt.csp.variable.PropagationFailureException
public void removeEndTimes(int start, int end) throws jopt.csp.variable.PropagationFailureException
start
- start of the range of possible end times being removedend
- end of the range of possible end times being removed
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void removeStartTime(int time) throws jopt.csp.variable.PropagationFailureException
time
- time removed from possible start times
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void removeEndTime(int time) throws jopt.csp.variable.PropagationFailureException
time
- time removed from possible end times
jopt.csp.variable.PropagationFailureException
public void removeDuration(int start, int end) throws jopt.csp.variable.PropagationFailureException
start
- start of the range of possible start times being removedend
- end of the range of possible start times being removed
jopt.csp.variable.PropagationFailureException
public void setEarliestStartTime(int est, int resourceIndex) throws jopt.csp.variable.PropagationFailureException
est
- the earliest start timeresourceIndex
- index of the resource whose est is being set
jopt.csp.variable.PropagationFailureException
public void setLatestStartTime(int lst, int resourceIndex) throws jopt.csp.variable.PropagationFailureException
lst
- the latest start timeresourceIndex
- index of the resource whose lst is being set
jopt.csp.variable.PropagationFailureException
public void setEarliestEndTime(int eet, int resourceIndex) throws jopt.csp.variable.PropagationFailureException
eet
- the earliest end timeresourceIndex
- index of the resources whose eet is being set
jopt.csp.variable.PropagationFailureException
public void setLatestEndTime(int let, int resourceIndex) throws jopt.csp.variable.PropagationFailureException
let
- the latest end timeresourceIndex
- index of the resource whose let is being set
jopt.csp.variable.PropagationFailureException
public void setDurationMax(int durMax, int resourceIndex) throws jopt.csp.variable.PropagationFailureException
durMax
- new maximum duration for resourceresourceIndex
- index of resource whose duration being set
jopt.csp.variable.PropagationFailureException
public void setDurationMin(int durMin, int resourceIndex) throws jopt.csp.variable.PropagationFailureException
durMin
- new minimum duration for resourceresourceIndex
- index of resource whose duration is being set
jopt.csp.variable.PropagationFailureException
public void setDurationRange(int durMin, int durMax, int resourceIndex) throws jopt.csp.variable.PropagationFailureException
durMin
- new minimum duration for resourcedurMax
- new maximum duration for resourceresourceIndex
- index of resource whose duration is being set
jopt.csp.variable.PropagationFailureException
public void removeStartTimes(int start, int end, int resourceIndex) throws jopt.csp.variable.PropagationFailureException
start
- start of the range of possible start times being removedend
- end of the range of possible start times being removedresourceIndex
- index of resource whose start times are being altered
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void removeEndTimes(int start, int end, int resourceIndex) throws jopt.csp.variable.PropagationFailureException
start
- start of the range of possible end times being removedend
- end of the range of possible end times being removedresourceIndex
- index of resource whose end times are being altered
jopt.csp.variable.PropagationFailureException
- If domain is emptypublic void removeStartTimes(jopt.csp.util.IntIntervalSet times) throws jopt.csp.variable.PropagationFailureException
times
- set of times to remove
jopt.csp.variable.PropagationFailureException
public void removeEndTimes(jopt.csp.util.IntIntervalSet times) throws jopt.csp.variable.PropagationFailureException
times
- set of times to remove
jopt.csp.variable.PropagationFailureException
public void removeDuration(jopt.csp.util.IntIntervalSet times) throws jopt.csp.variable.PropagationFailureException
times
- set of times to remove
jopt.csp.variable.PropagationFailureException
public void removeDelta(ActDelta delta) throws jopt.csp.variable.PropagationFailureException
delta
- set of times to remove
jopt.csp.variable.PropagationFailureException
public boolean choicePointStackSet()
choicePointStackSet
in interface jopt.csp.spi.solver.ChoicePointDataSource
public void setChoicePointStack(jopt.csp.spi.solver.ChoicePointStack cps)
setChoicePointStack
in interface jopt.csp.spi.solver.ChoicePointDataSource
public boolean isBound()
public int getEarliestStartTime()
public int getEarliestEndTime()
public int getLatestStartTime()
public int getLatestEndTime()
public int getDurationMax()
public int getDurationMin()
public void beforeChoicePointPopEvent()
beforeChoicePointPopEvent
in interface jopt.csp.spi.solver.ChoicePointEntryListener
public void afterChoicePointPopEvent()
afterChoicePointPopEvent
in interface jopt.csp.spi.solver.ChoicePointEntryListener
public void beforeChoicePointPushEvent()
beforeChoicePointPushEvent
in interface jopt.csp.spi.solver.ChoicePointEntryListener
public void afterChoicePointPushEvent()
afterChoicePointPushEvent
in interface jopt.csp.spi.solver.ChoicePointEntryListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |