jopt.js.spi.domain.activity
Class ActOperationDomain

java.lang.Object
  extended byjopt.js.spi.domain.activity.ActOperationDomain
All Implemented Interfaces:
ActResourceDomainListener, jopt.csp.spi.solver.ChoicePointDataSource, jopt.csp.spi.solver.ChoicePointEntryListener, jopt.js.api.variable.ResourceSet

public class ActOperationDomain
extends java.lang.Object
implements ActResourceDomainListener, jopt.js.api.variable.ResourceSet, jopt.csp.spi.solver.ChoicePointDataSource, jopt.csp.spi.solver.ChoicePointEntryListener

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

Author:
James Boerkoel

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

REQUIRES

public static final int REQUIRES
See Also:
Constant Field Values

CONSUMES

public static final int CONSUMES
See Also:
Constant Field Values

PRODUCES

public static final int PRODUCES
See Also:
Constant Field Values

PROVIDES

public static final int PROVIDES
See Also:
Constant Field Values
Constructor Detail

ActOperationDomain

public ActOperationDomain(int usage,
                          int capacityMin,
                          int capacityMax)
Constructs an operation association for use in an activity domain

Parameters:
usage - PRODUCES, PROVIDES, REQUIRES, or CONSUMES
capacityMin - the minimum capacity that this operation will use of resource
capacityMax - the maximum capacity that this operation could potentially use of determined resource
Method Detail

addResource

public void addResource(ActResourceDomain resource)
                 throws jopt.csp.variable.PropagationFailureException
Adds a resource to the collection of possible resources that can be used to complete this task

Parameters:
resource - resource to supplement the possible resource set with
Throws:
jopt.csp.variable.PropagationFailureException

size

public int size()
Returns the number of possible resources that may be used

Specified by:
size in interface jopt.js.api.variable.ResourceSet
Returns:
the number of possible resources that may be used

getID

public int getID()
Returns the id for this operation

Returns:
the id for this operation

setID

public void setID(int id)
Sets the id of this operation

Parameters:
id - new id for this operation

get

public jopt.js.api.variable.Resource get(int index)
Returns a representation of the resource at the specified index

Specified by:
get in interface jopt.js.api.variable.ResourceSet
Parameters:
index - index of resource being inquired about
Returns:
Resource located at specified index

assignTo

public void assignTo(int index)
              throws jopt.csp.variable.PropagationFailureException
Assigns the operation to the resource at the given index

Specified by:
assignTo in interface jopt.js.api.variable.ResourceSet
Parameters:
index - of the resource to which this operation will be assigned
Throws:
jopt.csp.variable.PropagationFailureException

removeAt

public void removeAt(int index)
              throws jopt.csp.variable.PropagationFailureException
Removes the resource at the given index for this operation

Specified by:
removeAt in interface jopt.js.api.variable.ResourceSet
Parameters:
index - index of the resource to remove from the list of possible resources
Throws:
jopt.csp.variable.PropagationFailureException

addListener

public void addListener(OperationDomainListener listener)
Sets the operation domain listener on this object

Parameters:
listener -

setActResListener

public void setActResListener(ActResourceDomainListener listener)
Sets the act rs listener

Parameters:
listener - listener to be set

getStartTimes

public jopt.csp.util.IntIntervalSet getStartTimes()
Returns the set that represents this operations start times

Returns:
IntIntervalSet that represents the operation start times

getEndTimes

public jopt.csp.util.IntIntervalSet getEndTimes()
Returns the set that represents this operations end times

Returns:
IntIntervalSet that represents the operation end times

getDuration

public jopt.csp.util.IntIntervalSet getDuration()
Returns the set that represents this operations duration

Returns:
IntIntervalSet that represents the operation duration

startTimesRemoved

public void startTimesRemoved(int resourceID,
                              jopt.csp.util.IntIntervalSet delta)
                       throws jopt.csp.variable.PropagationFailureException
Called when an ActResourceDomain event notifies this operation domain of a change to the specified resource's start times

Specified by:
startTimesRemoved in interface ActResourceDomainListener
Parameters:
resourceID - id of resource that changed
delta - the changes that occured to the start times
Throws:
jopt.csp.variable.PropagationFailureException

endTimesRemoved

public void endTimesRemoved(int resourceID,
                            jopt.csp.util.IntIntervalSet delta)
                     throws jopt.csp.variable.PropagationFailureException
Called when an ActResourceDomain event notifies this operation domain of a change to the specified resource's end times

Specified by:
endTimesRemoved in interface ActResourceDomainListener
Parameters:
resourceID - id of resource that changed
delta - set of changes that occured to the end times
Throws:
jopt.csp.variable.PropagationFailureException

durationRemoved

public void durationRemoved(int resourceID,
                            jopt.csp.util.IntIntervalSet delta)
                     throws jopt.csp.variable.PropagationFailureException
Called when an ActResourceDomain event notifies this operation domain of a change to the specified resource's duration

Specified by:
durationRemoved in interface ActResourceDomainListener
Parameters:
resourceID - id of resource that changed
delta - set of changes that occured to the duration
Throws:
jopt.csp.variable.PropagationFailureException

deltaRemoved

public void deltaRemoved(int resourceID,
                         ActDelta delta)
                  throws jopt.csp.variable.PropagationFailureException
Called when an ActResourceDomain event notifies this operation domain of a change to the resource domain

Specified by:
deltaRemoved in interface ActResourceDomainListener
Parameters:
resourceID - id of resource that changed
delta - set of changes that occured to the resource
Throws:
jopt.csp.variable.PropagationFailureException

isAssignedToResource

public boolean isAssignedToResource()
Returns true if there is only one potential resource assignment left

Returns:
true if there is only one potential resource assignment left

getPotentialUsageTimeline

public jopt.csp.util.IntIntervalSet getPotentialUsageTimeline(int resourceIdx)
Returns an IntIntervalSet representing the times that this operation could potentially use the specified resource

Parameters:
resourceIdx - the index of which resource in question
Returns:
IntIntervalSet representing the times that this operation could potentially use the resource

getActualUsageTimeline

public jopt.csp.util.IntIntervalSet getActualUsageTimeline(int resourceIdx)
Returns an IntIntervalSet representing the time that this operation would definitely be using the specified resource

Parameters:
resourceIdx - the index of which resource in question
Returns:
IntIntervalSet representing the times that this operation would definitely use the resource

getDurationMax

public int getDurationMax(int resourceIdx)
Returns the maximum duration of this operation on the specified resource

Parameters:
resourceIdx - index of resource being inquired about
Returns:
maximum duration this operation could have on this resource

getDurationMin

public int getDurationMin(int resourceIdx)
Returns the minimum duration of this operation on the specified resource

Parameters:
resourceIdx - index of resource being inquired about
Returns:
minimum duration this operation could have on this resource

getUsageType

public int getUsageType()
Returns an int representing the four ways that an operation can use a resource

Returns:
int representing PRODUCES, CONSUMES, PROVIDES, REQUIRES

setUsageType

public void setUsageType(int usage)
Sets the way that this operation will use resources

Parameters:
usage - new type of the usage

getCapacityMin

public int getCapacityMin()
Returns the minimum capacity of this operation

Returns:
min capacity of this operation

getCapacityMax

public int getCapacityMax()
Returns the maximum capacity of this operation

Returns:
max capacity of this operation

setCapacityMin

public void setCapacityMin(int min)
                    throws jopt.csp.variable.PropagationFailureException
Sets the minimum capacity of this operation

Parameters:
min - new minimum
Throws:
jopt.csp.variable.PropagationFailureException

setCapacityMax

public void setCapacityMax(int max)
                    throws jopt.csp.variable.PropagationFailureException
Sets the maximum capacity of this operation

Parameters:
max - new maximum
Throws:
jopt.csp.variable.PropagationFailureException

setCapacity

public void setCapacity(int val)
                 throws jopt.csp.variable.PropagationFailureException
Sets the capacity of this operation

Parameters:
val - new capacity
Throws:
jopt.csp.variable.PropagationFailureException

setCapacityRange

public void setCapacityRange(int start,
                             int end)
                      throws jopt.csp.variable.PropagationFailureException
Sets the capacity to a range of valid values

Parameters:
start - start of interval to restrict capacity to
end - end of interval to restrict capacity to
Throws:
jopt.csp.variable.PropagationFailureException

removeCapacityRange

public void removeCapacityRange(int start,
                                int end)
                         throws jopt.csp.variable.PropagationFailureException
Removes a range of valid values from the capacity

Parameters:
start - start of interval to remove
end - end of interval to remove
Throws:
jopt.csp.variable.PropagationFailureException

getEarliestStartTime

public int getEarliestStartTime(int resourceIdx)
Returns the earliest start time for this operation with respect to the specified resource

Parameters:
resourceIdx - index of resource being inqured about
Returns:
earliest start time

getLatestStartTime

public int getLatestStartTime(int resourceIdx)
Returns the latest start time for this operation with respect to the specified resource

Parameters:
resourceIdx - index of resource being inqured about
Returns:
latest start time

getEarliestEndTime

public int getEarliestEndTime(int resourceIdx)
Returns the earliest end time for this operation with respect to the specified resource

Parameters:
resourceIdx - index of resource being inqured about\
Returns:
earliest end time

getLatestEndTime

public int getLatestEndTime(int resourceIdx)
Returns the latest end time for this operation with respect to the specified resource

Parameters:
resourceIdx - index of resource being inqured about
Returns:
latest end time

getPossibleResourceCount

public int getPossibleResourceCount()
Returns the number of resources that could possibly satisfy the constraints of this operation

Returns:
the number of resources that could possibly satisfy the constraints of this operation

getPossibleResourceIDs

public int[] getPossibleResourceIDs()
Returns an array of ints representing the ids of the resources that could possibly satisfy the constraints of this operation

Returns:
an array of ints representing the ids of the resources that could possibly satisfy the constraints of this operation

getPossibleResources

public jopt.js.api.variable.Resource[] getPossibleResources()
Returns an array of resources that could possibly satisfy the constraints of this operation

Returns:
an array of resources that could possibly satisfy the constraints of this operation

getPossibleResourceIndices

public int[] getPossibleResourceIndices()
Returns an array of ints representing the idxs of the resources that could possibly satisfy the constraints of this operation

Returns:
an array of ints representing the idxs of the resources that could possibly satisfy the constraints of this operation

setRequiredResource

public void setRequiredResource(int resourceIdx)
                         throws jopt.csp.variable.PropagationFailureException
Eliminates all possible resources but the one specified

Parameters:
resourceIdx - index of the resource that this operation will use
Throws:
jopt.csp.variable.PropagationFailureException

getResourceIDs

public int[] getResourceIDs()
Returns an array of ints representing the ids of the resources associated with this operation

Returns:
an array of ints representing the ids of the resources associated with this operation

removePossibleResource

public void removePossibleResource(int resourceIdx)
                            throws jopt.csp.variable.PropagationFailureException
Removes the resource at resourceIdx from the list of possible resources for this operation

Parameters:
resourceIdx - index of the resource being removed
Throws:
jopt.csp.variable.PropagationFailureException

getRequiredResource

public int getRequiredResource()
If this operation is assigned to a particular resource the id of the required resource is returned; otherwise, -1 is returned.


setTimeline

public void setTimeline(int resourceIdx,
                        jopt.csp.util.IntIntervalSet timeline)
                 throws jopt.csp.variable.PropagationFailureException
Sets the timeline of the resource at resourceIdx

Parameters:
resourceIdx - index of the resource being set
timeline - timeline that the resource is being set to
Throws:
jopt.csp.variable.PropagationFailureException

setEarliestStartTime

public void setEarliestStartTime(int est)
                          throws jopt.csp.variable.PropagationFailureException
Set the earliest start time for the operation

Parameters:
est - the earliest start time
Throws:
jopt.csp.variable.PropagationFailureException

setLatestStartTime

public void setLatestStartTime(int lst)
                        throws jopt.csp.variable.PropagationFailureException
Set the latest start time for the operation

Parameters:
lst - the latest start time
Throws:
jopt.csp.variable.PropagationFailureException

setEarliestEndTime

public void setEarliestEndTime(int eet)
                        throws jopt.csp.variable.PropagationFailureException
Set the earliest end time for the operation

Parameters:
eet - the earliest end time
Throws:
jopt.csp.variable.PropagationFailureException

setLatestEndTime

public void setLatestEndTime(int let)
                      throws jopt.csp.variable.PropagationFailureException
Set the latest end time for the operation

Parameters:
let - the latest end time
Throws:
jopt.csp.variable.PropagationFailureException

setDurationMax

public void setDurationMax(int durMax)
                    throws jopt.csp.variable.PropagationFailureException
Sets the max duration for the operation

Parameters:
durMax - new maximum duration of this operation
Throws:
jopt.csp.variable.PropagationFailureException

setDurationMin

public void setDurationMin(int durMin)
                    throws jopt.csp.variable.PropagationFailureException
Sets the min duration for the operation

Parameters:
durMin - new minimum duration of this operation
Throws:
jopt.csp.variable.PropagationFailureException

setDurationRange

public void setDurationRange(int durMin,
                             int durMax)
                      throws jopt.csp.variable.PropagationFailureException
Sets the range of possible duration values for the operation

Parameters:
durMin - new minimum duration of this operation
durMax - new maximum duration of this operation
Throws:
jopt.csp.variable.PropagationFailureException

setDuration

public void setDuration(int duration)
                 throws jopt.csp.variable.PropagationFailureException
Sets the duration of this operation to given value

Parameters:
duration - val to set duration to
Throws:
jopt.csp.variable.PropagationFailureException

removeStartTimes

public void removeStartTimes(int start,
                             int end)
                      throws jopt.csp.variable.PropagationFailureException
Removes a range of start time values from the domain of this operation

Parameters:
start - start of the range of possible start times being removed
end - end of the range of possible start times being removed
Throws:
jopt.csp.variable.PropagationFailureException

removeEndTimes

public void removeEndTimes(int start,
                           int end)
                    throws jopt.csp.variable.PropagationFailureException
Removes a range of end time values from the domain of this operation

Parameters:
start - start of the range of possible end times being removed
end - end of the range of possible end times being removed
Throws:
jopt.csp.variable.PropagationFailureException - If domain is empty

removeStartTime

public void removeStartTime(int time)
                     throws jopt.csp.variable.PropagationFailureException
Removes a single value from the start times of this operation

Parameters:
time - time removed from possible start times
Throws:
jopt.csp.variable.PropagationFailureException - If domain is empty

removeEndTime

public void removeEndTime(int time)
                   throws jopt.csp.variable.PropagationFailureException
Removes a single time from the end times of this operation

Parameters:
time - time removed from possible end times
Throws:
jopt.csp.variable.PropagationFailureException

removeDuration

public void removeDuration(int start,
                           int end)
                    throws jopt.csp.variable.PropagationFailureException
Removes a range of values from the duration of this operation

Parameters:
start - start of the range of possible start times being removed
end - end of the range of possible start times being removed
Throws:
jopt.csp.variable.PropagationFailureException

setEarliestStartTime

public void setEarliestStartTime(int est,
                                 int resourceIndex)
                          throws jopt.csp.variable.PropagationFailureException
Set the earliest start time for the specified resource

Parameters:
est - the earliest start time
resourceIndex - index of the resource whose est is being set
Throws:
jopt.csp.variable.PropagationFailureException

setLatestStartTime

public void setLatestStartTime(int lst,
                               int resourceIndex)
                        throws jopt.csp.variable.PropagationFailureException
Set the latest start time for the specified resource

Parameters:
lst - the latest start time
resourceIndex - index of the resource whose lst is being set
Throws:
jopt.csp.variable.PropagationFailureException

setEarliestEndTime

public void setEarliestEndTime(int eet,
                               int resourceIndex)
                        throws jopt.csp.variable.PropagationFailureException
Set the earliest end time for the specified resource

Parameters:
eet - the earliest end time
resourceIndex - index of the resources whose eet is being set
Throws:
jopt.csp.variable.PropagationFailureException

setLatestEndTime

public void setLatestEndTime(int let,
                             int resourceIndex)
                      throws jopt.csp.variable.PropagationFailureException
Set the latest end time for the specified resource

Parameters:
let - the latest end time
resourceIndex - index of the resource whose let is being set
Throws:
jopt.csp.variable.PropagationFailureException

setDurationMax

public void setDurationMax(int durMax,
                           int resourceIndex)
                    throws jopt.csp.variable.PropagationFailureException
Sets the maximum duration of the resource at resourceIndex

Parameters:
durMax - new maximum duration for resource
resourceIndex - index of resource whose duration being set
Throws:
jopt.csp.variable.PropagationFailureException

setDurationMin

public void setDurationMin(int durMin,
                           int resourceIndex)
                    throws jopt.csp.variable.PropagationFailureException
Sets the minimum duration of the resource at resourceIndex

Parameters:
durMin - new minimum duration for resource
resourceIndex - index of resource whose duration is being set
Throws:
jopt.csp.variable.PropagationFailureException

setDurationRange

public void setDurationRange(int durMin,
                             int durMax,
                             int resourceIndex)
                      throws jopt.csp.variable.PropagationFailureException
Sets the a range of valid durations for the resource at resourceIndex

Parameters:
durMin - new minimum duration for resource
durMax - new maximum duration for resource
resourceIndex - index of resource whose duration is being set
Throws:
jopt.csp.variable.PropagationFailureException

removeStartTimes

public void removeStartTimes(int start,
                             int end,
                             int resourceIndex)
                      throws jopt.csp.variable.PropagationFailureException
Removes a range of values from the start times of this operation

Parameters:
start - start of the range of possible start times being removed
end - end of the range of possible start times being removed
resourceIndex - index of resource whose start times are being altered
Throws:
jopt.csp.variable.PropagationFailureException - If domain is empty

removeEndTimes

public void removeEndTimes(int start,
                           int end,
                           int resourceIndex)
                    throws jopt.csp.variable.PropagationFailureException
Removes a range of values from the end times of this operation

Parameters:
start - start of the range of possible end times being removed
end - end of the range of possible end times being removed
resourceIndex - index of resource whose end times are being altered
Throws:
jopt.csp.variable.PropagationFailureException - If domain is empty

removeStartTimes

public void removeStartTimes(jopt.csp.util.IntIntervalSet times)
                      throws jopt.csp.variable.PropagationFailureException
Removes a set of times from start times for this operation

Parameters:
times - set of times to remove
Throws:
jopt.csp.variable.PropagationFailureException

removeEndTimes

public void removeEndTimes(jopt.csp.util.IntIntervalSet times)
                    throws jopt.csp.variable.PropagationFailureException
Removes a set of times from end times for this operation

Parameters:
times - set of times to remove
Throws:
jopt.csp.variable.PropagationFailureException

removeDuration

public void removeDuration(jopt.csp.util.IntIntervalSet times)
                    throws jopt.csp.variable.PropagationFailureException
Removes a set of times from duration times for this operation

Parameters:
times - set of times to remove
Throws:
jopt.csp.variable.PropagationFailureException

removeDelta

public void removeDelta(ActDelta delta)
                 throws jopt.csp.variable.PropagationFailureException
Removes set of times from start, end, and duration times

Parameters:
delta - set of times to remove
Throws:
jopt.csp.variable.PropagationFailureException

choicePointStackSet

public boolean choicePointStackSet()
Specified by:
choicePointStackSet in interface jopt.csp.spi.solver.ChoicePointDataSource

setChoicePointStack

public void setChoicePointStack(jopt.csp.spi.solver.ChoicePointStack cps)
Specified by:
setChoicePointStack in interface jopt.csp.spi.solver.ChoicePointDataSource

isBound

public boolean isBound()
Returns true if operation has only one valid start time, end time, and resource

Returns:
true if operation has only one valid start time, end time, and resource

getEarliestStartTime

public int getEarliestStartTime()
Returns the earliest time that this operation could start

Returns:
earliest time that this operation could start

getEarliestEndTime

public int getEarliestEndTime()
Returns the earliest time that this operation could end

Returns:
earliest time that this operation could end

getLatestStartTime

public int getLatestStartTime()
Returns the latest time that this operation could start

Returns:
latest time that this operation could start

getLatestEndTime

public int getLatestEndTime()
Returns the latest time that this operation could end

Returns:
latest time that this operation could end

getDurationMax

public int getDurationMax()
Returns the maximum duration

Returns:
maximum duration

getDurationMin

public int getDurationMin()
Returns the minimum duration

Returns:
minimum duration

beforeChoicePointPopEvent

public void beforeChoicePointPopEvent()
Specified by:
beforeChoicePointPopEvent in interface jopt.csp.spi.solver.ChoicePointEntryListener

afterChoicePointPopEvent

public void afterChoicePointPopEvent()
Specified by:
afterChoicePointPopEvent in interface jopt.csp.spi.solver.ChoicePointEntryListener

beforeChoicePointPushEvent

public void beforeChoicePointPushEvent()
Specified by:
beforeChoicePointPushEvent in interface jopt.csp.spi.solver.ChoicePointEntryListener

afterChoicePointPushEvent

public void afterChoicePointPushEvent()
Specified by:
afterChoicePointPushEvent in interface jopt.csp.spi.solver.ChoicePointEntryListener