Package org.jacop.constraints.geost
Class GeostObject
java.lang.Object
org.jacop.constraints.geost.GeostObject
- Version:
- 4.10
It contains all information about the Geost object as well as functionality to maintain the consistency among time variables.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) int[]
For each dimension, the shape ID that provided the minimal lower bound or the maximal upperBoundfinal IntVar[]
It specifies the coordinates in k-dimensional space at which the object is fixed.final int
It specifies the number of dimensions in this object.final IntVar
It specifies the duration time of this object.final IntVar
It specifies the end time of this object.(package private) int
It specifies the number of variables currently grounded.final int
A unique identifier greater or equal to 0.final IntVar
It specifies the possible shape ids to be taken by this object.final IntVar
It specifies the start time of this object in time dimension.(package private) GeostObject.TimeBoundConstraint
It specifies the time constraint to execute to ensure that start + duration = end.It stores all finite domain variables in connection to this object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIt returns finite domain variables which belong to this object.final boolean
It checks whether the object location is fixed.final void
It is executed as soon as any object variable is grounded.final void
onUnGround
(Var variable) It is executed as soon as backtracking has occurred making previously grounded variable ungrounded again.toString()
-
Field Details
-
no
public final int noA unique identifier greater or equal to 0. The last object supplied to GeostConstraint should have an identifier equal to n-1, where n is the total number of objects. -
dimension
public final int dimensionIt specifies the number of dimensions in this object. -
coords
It specifies the coordinates in k-dimensional space at which the object is fixed. It is the origin of the object. The actual starting point of the object depends at the end also on the shape used by the object or in particular the origins of the boxes which constitutes the shape. -
shapeID
It specifies the possible shape ids to be taken by this object. -
start
It specifies the start time of this object in time dimension. -
duration
It specifies the duration time of this object. -
end
It specifies the end time of this object. -
variables
It stores all finite domain variables in connection to this object. E.g. shape variables are one of the objects in the focus of the constraint. -
timeConstraint
GeostObject.TimeBoundConstraint timeConstraintIt specifies the time constraint to execute to ensure that start + duration = end. -
bestShapeID
int[] bestShapeIDFor each dimension, the shape ID that provided the minimal lower bound or the maximal upperBound -
groundCount
int groundCountIt specifies the number of variables currently grounded.
-
-
Constructor Details
-
GeostObject
public GeostObject(int no, IntVar[] coords, IntVar shapeID, IntVar start, IntVar duration, IntVar end) It constructs a Geost object with all the attributes needed by the Geost constraint.- Parameters:
no
- nonnegative unique id of this object.coords
- an array of variables representing the origin (start) of the objects.shapeID
- the variable specifying the shape finite domain variable.start
- it determines the start time of the geost object in terms of time.duration
- finite domain variable specifying the duration of the geost object in terms of time.end
- finite domain variable specifying the end of the geost object in terms of time.
-
-
Method Details
-
getVariables
It returns finite domain variables which belong to this object.- Returns:
- variables that constitute this object.
-
onGround
It is executed as soon as any object variable is grounded.- Parameters:
variable
- variable being grounded.
-
onUnGround
It is executed as soon as backtracking has occurred making previously grounded variable ungrounded again.- Parameters:
variable
- variable being ungrounded.
-
isGrounded
public final boolean isGrounded()It checks whether the object location is fixed.- Returns:
- true if the object location is fixed, false otherwise.
-
toString
-