jopt.js.spi.variable
Class ResourceExpr
java.lang.Object
jopt.csp.spi.arcalgorithm.variable.VariableChangeBase
jopt.js.spi.variable.ResourceExpr
- All Implemented Interfaces:
- jopt.js.api.variable.Resource, jopt.js.api.variable.SchedulerExpression, jopt.csp.spi.solver.VariableChangeSource
- public class ResourceExpr
- extends jopt.csp.spi.arcalgorithm.variable.VariableChangeBase
- implements jopt.js.api.variable.Resource, jopt.js.api.variable.SchedulerExpression
Expression used to hold pertinent resource information
- Author:
- James Boerkoel
Fields inherited from interface jopt.js.api.variable.Resource |
DISCRETE, UNARY |
Constructor Summary |
ResourceExpr(java.lang.String name,
ResourceDomain domain)
Creates a resource expression with the given name and domain |
Methods inherited from class jopt.csp.spi.arcalgorithm.variable.VariableChangeBase |
addVariableChangeListener, removeVariableChangeListener |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ResourceExpr
public ResourceExpr(java.lang.String name,
ResourceDomain domain)
- Creates a resource expression with the given name and domain
- Parameters:
name
- the name of this resourcedomain
- the domain for this resource expression
getNumOperationsExpr
public jopt.csp.variable.CspIntExpr getNumOperationsExpr()
- Specified by:
getNumOperationsExpr
in interface jopt.js.api.variable.Resource
getBeginTimeExpr
public jopt.csp.variable.CspIntExpr getBeginTimeExpr()
- Specified by:
getBeginTimeExpr
in interface jopt.js.api.variable.Resource
getCompletionTimeExpr
public jopt.csp.variable.CspIntExpr getCompletionTimeExpr()
- Specified by:
getCompletionTimeExpr
in interface jopt.js.api.variable.Resource
getMakeSpanExpr
public jopt.csp.variable.CspIntExpr getMakeSpanExpr()
- Specified by:
getMakeSpanExpr
in interface jopt.js.api.variable.Resource
getName
public java.lang.String getName()
- Specified by:
getName
in interface jopt.js.api.variable.Resource
isBuilt
public boolean isBuilt()
- Specified by:
isBuilt
in interface jopt.js.api.variable.SchedulerExpression
setBuilt
public void setBuilt(boolean built)
- Specified by:
setBuilt
in interface jopt.js.api.variable.SchedulerExpression
getType
public int getType()
- Specified by:
getType
in interface jopt.js.api.variable.Resource
getNode
public ResourceNode getNode()
- Returns the node of this resource
- Returns:
- Node of this resource
getID
public int getID()
- Specified by:
getID
in interface jopt.js.api.variable.Resource
getResourceStart
public int getResourceStart()
- Specified by:
getResourceStart
in interface jopt.js.api.variable.Resource
getResourceEnd
public int getResourceEnd()
- Specified by:
getResourceEnd
in interface jopt.js.api.variable.Resource
findAvailIntervals
public jopt.csp.util.IntIntervalSet findAvailIntervals(int start,
int end,
int quantity)
- Specified by:
findAvailIntervals
in interface jopt.js.api.variable.Resource
isResourceAvailable
public boolean isResourceAvailable(int operationID,
int start,
int end,
int quantity)
- Specified by:
isResourceAvailable
in interface jopt.js.api.variable.Resource
maxAvailableResource
public int maxAvailableResource(int start,
int end)
- Specified by:
maxAvailableResource
in interface jopt.js.api.variable.Resource
isBound
public boolean isBound()
- Specified by:
isBound
in interface jopt.js.api.variable.Resource
isUsed
public boolean isUsed()
- Returns true if any of the resource has been allocated to be used by any operations
- Specified by:
isUsed
in interface jopt.js.api.variable.Resource
updateGraph
public void updateGraph(jopt.csp.spi.arcalgorithm.graph.NodeArcGraph graph)
- Specified by:
updateGraph
in interface jopt.js.api.variable.Resource
setChoicePointStack
public void setChoicePointStack(jopt.csp.spi.solver.ChoicePointStack cps)
- Specified by:
setChoicePointStack
in interface jopt.js.api.variable.Resource
choicePointStackSet
public boolean choicePointStackSet()
- Specified by:
choicePointStackSet
in interface jopt.js.api.variable.Resource
toString
public java.lang.String toString()