|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jopt.csp.spi.arcalgorithm.graph.node.AbstractNode jopt.js.spi.graph.node.ResourceNode
Node to represent resources
Nested Class Summary |
Nested classes inherited from class jopt.csp.spi.arcalgorithm.graph.node.AbstractNode |
jopt.csp.spi.arcalgorithm.graph.node.AbstractNode.DomainListener |
Field Summary | |
static int |
DISCRETE
|
static int |
UNARY
|
Constructor Summary | |
ResourceNode(java.lang.String name,
ResourceDomain domain)
Constructs a resource node from a name and domain |
|
ResourceNode(java.lang.String name,
ResourceDomain domain,
int id)
Constructs a resource node with given name, domain, and id |
Method Summary | |
boolean |
choicePointStackSet()
|
void |
clearDelta()
|
jopt.csp.util.IntIntervalSet |
findAvailIntervals(int start,
int end,
int quantity)
Returns a set indicating the intervals that this resource is available in the given quantity within the specified range |
jopt.csp.util.IntIntervalSet |
findAvailIntervals(int operationID,
int start,
int end,
int quantity)
Returns a set indicating the intervals that this resource is available to the given operation in the given quantity within the specified range |
int |
getID()
Returns the ID of this resource |
int |
getSize()
|
java.lang.Object |
getState()
|
int |
getTotalCapacityAvailable()
This method will return the total amount of resource available. |
int |
getType()
Returns the type of resource that this node represents |
boolean |
isBound()
Returns true since this is always in a valid state by the nature of the domain |
boolean |
isInDomain(java.lang.Object val)
|
boolean |
isResourceAvailable(int operationID,
int start,
int end,
int quantity)
Determines whether the resource is available in the specified quantity between specified start and end times for the given operation |
int |
maxAvailableResource(int start,
int end)
Gives the highest consistently available amount of this resource over the given range |
int |
maxAvailableResource(int operationID,
int start,
int end)
Gives the highest consistently available amount of this resource over the given range for the given operation |
int |
maxAvailableResource(int operationID,
int start,
int end,
int minDur)
Gives the highest consistently available amount of this resource over the given range for the given operation and assuming that the reource will be used for at least the specified duration |
void |
registerAllocatedOperation(int operationID,
int est,
int let,
int durMin)
Lets the resource know that although a specific time has not necessary been decided, the specified operation will use this resource. |
void |
restoreState(java.lang.Object state)
|
void |
setActualOperationTimeline(int operationID,
jopt.csp.util.IntIntervalSet timeline)
Registers the amount of time the specified operation will be using this resource |
void |
setChoicePointStack(jopt.csp.spi.solver.ChoicePointStack cps)
|
void |
setID(int id)
Sets the id of this resource |
void |
setPotentialOperationTimeline(int operationID,
jopt.csp.util.IntIntervalSet timeline)
Indicates the time during which the specified operation may be using this resource |
java.lang.String |
toString()
|
Methods inherited from class jopt.csp.spi.arcalgorithm.graph.node.AbstractNode |
addDomainChangeListener, addedToGraph, addRangeChangeListener, addValueChangeListener, equals, getName, hashCode, inGraph, removedFromGraph, removeDomainChangeListener, removeRangeChangeListener, removeValueChangeListener, setName |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int UNARY
public static final int DISCRETE
Constructor Detail |
public ResourceNode(java.lang.String name, ResourceDomain domain)
name
- name of this resourcedomain
- domain for this nodepublic ResourceNode(java.lang.String name, ResourceDomain domain, int id)
name
- name of this resourcedomain
- domain of this resourceid
- id for this resourceMethod Detail |
public void setPotentialOperationTimeline(int operationID, jopt.csp.util.IntIntervalSet timeline) throws jopt.csp.variable.PropagationFailureException
operationID
- id of operationtimeline
- times potentially being used
jopt.csp.variable.PropagationFailureException
public void setActualOperationTimeline(int operationID, jopt.csp.util.IntIntervalSet timeline) throws jopt.csp.variable.PropagationFailureException
operationID
- id of operationtimeline
- times being used
jopt.csp.variable.PropagationFailureException
public int getTotalCapacityAvailable()
public int getType()
public int getID()
public void setID(int id)
id
- new idpublic void registerAllocatedOperation(int operationID, int est, int let, int durMin) throws jopt.csp.variable.PropagationFailureException
operationID
- operation id of operation using resourceest
- earliest start timelet
- latest end timedurMin
- minimum duration
jopt.csp.variable.PropagationFailureException
public jopt.csp.util.IntIntervalSet findAvailIntervals(int start, int end, int quantity)
start
- start of interval inquired aboutend
- end of interval inquired aboutquantity
- amound of resource required
public jopt.csp.util.IntIntervalSet findAvailIntervals(int operationID, int start, int end, int quantity)
operationID
- operation for whome we are checking the availabilitystart
- start of interval inquired aboutend
- end of interval inquired aboutquantity
- amound of resource required
public boolean isResourceAvailable(int operationID, int start, int end, int quantity)
operationID
- the operationID of the operation in questionstart
- start of interval being inquired aboutend
- end of interval being inquired aboutquantity
- quantity of resource needed
public int maxAvailableResource(int start, int end)
start
- start of range being inquired aboutend
- end of range being inquired about
public int maxAvailableResource(int operationID, int start, int end)
operationID
- the operationID of the operation in questionstart
- start of range being inquired aboutend
- end of range being inquired about
public int maxAvailableResource(int operationID, int start, int end, int minDur)
operationID
- the operationID of the operation in questionstart
- start of range being inquired aboutend
- end of range being inquired aboutminDur
- the minimum duration
public boolean isBound()
public boolean isInDomain(java.lang.Object val)
public int getSize()
public java.lang.Object getState()
public void restoreState(java.lang.Object state)
public void clearDelta()
public void setChoicePointStack(jopt.csp.spi.solver.ChoicePointStack cps)
public boolean choicePointStackSet()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |