public class AllowedArea extends InternalConstraint
Constraint that represents a domain in which objects need to be contained
Constructor and Description 

AllowedArea(Geost geost,
int[] origin,
int[] length)
It constructs an internal Geost constraint that restricts an object
to be within an allowed area.

Modifier and Type  Method and Description 

int[] 
absInfeasible(Geost.SweepDirection minlex)
It provides the largest or smallest point contained in the forbidden area represented by this
constraint.

int 
cardInfeasible()
It provides an approximation of the number of infeasible points enforced by this constraint only.

String 
checkInvariants()
It checks that this constraint has consistent data structures.

Collection<Var> 
definingVariables()
It provides a collection, possibly empty, of variables which define this constraint.

DBox 
isFeasible(Geost.SweepDirection min,
LexicographicalOrder order,
GeostObject o,
int currentShape,
int[] c)
It determines whether the given point is a feasible origin of object o, considering
this constraint only.

boolean 
isSingleUse()
In some cases, a constraint is used only once per sweep direction on a path
from root to leaf in the search tree.

boolean 
isStatic()
It provides information about the constraint future.

String 
toString() 
public AllowedArea(Geost geost, int[] origin, int[] length)
geost
 the geost constraint for which the internal constraint is being created.origin
 it specifies the origin of the area in which objects have to be placed.length
 it specifies the length of the area in each dimension in which the objects have to be placed.public String checkInvariants()
public int cardInfeasible()
InternalConstraint
This information is used as a heuristic in the sweeping algorithm to decide which constraint to use, so that the constraints that cover the largest space are used first.
cardInfeasible
in class InternalConstraint
public DBox isFeasible(Geost.SweepDirection min, LexicographicalOrder order, GeostObject o, int currentShape, int[] c)
InternalConstraint
The boundaries of the forbidden area must have the following properties: the lower extremum has to be infeasible, but the upper extremum has to be feasible (with respect to this constraint only).
The dimension of the DBox returned is k+1, where k is the object dimension. The last dimension is time.
isFeasible
in class InternalConstraint
min
 the direction of the sweeporder
 the order to be usedo
 the object the constraint is applied tocurrentShape
 the shape id that is currently considered for oc
 the current position of the sweep.public int[] absInfeasible(Geost.SweepDirection minlex)
InternalConstraint
TODO, is this function potentially still useful? If not remove, if yes then adapt the description about event point series. What is it used now for? I will keep it as it may be used later on, but for sure the code implementing those functions is not tested much or requires some cleaning.
This allows to build an event point series that stays consistent whatever the lexical order is, and whatever the object to place is (some shifting is applied to take the object's shape into account)
The dimension of the point returned is k+1, where k is the object dimension. The last dimension is time.
absInfeasible
in class InternalConstraint
minlex
 defines whether the maximal or minimal point should be returnedpublic Collection<Var> definingVariables()
InternalConstraint
definingVariables
in class InternalConstraint
public boolean isStatic()
InternalConstraint
TODO the description above suggests that it should be called isDynamic as it returns false if the constraint outboxes stay the same.
(not taking placed object into account; i.e. absInfeasible will always return the same points)
isStatic
in class InternalConstraint
public boolean isSingleUse()
InternalConstraint
TODO, what is the example of such constraint?
Use this function to provide the information to Geost.
isSingleUse
in class InternalConstraint
Copyright © 2022. All rights reserved.