NO FRAMES

Class IloBox

Definition file: ilconcert/ilobox.h
A class of multidimensional boxes for multidimensional placement problems.

Instances of the class IloBox are multidimensional boxes that appear in multidimensional placement problems. To solve packing or placement problems, you may need to be able to place boxes within a given container. In such a situation, both the boxes to place and the container to hold them are instances of the class IloBox.

To specify the containment relation that a given container holds a given box, use the member function IloBox::contains.

See Also:

Constructor Summary
public IloBox()
public IloBox(IloBox::ImplClass *)
public IloBox(const IloEnv, IloInt, const IloIntVarArray, const IloIntArray)
Method Summary
public IloConstraintcontains(IloBox)
public IloIntgetDimensions()
public IloBox::ImplClass *getImpl()
public IloConstraintgetNotOverlapConstraint()
public IloIntVargetOrigin(IloInt)
public IloIntgetSize(IloInt)
public IloConstraintnotOverlapInDimension(IloBox, IloBox, IloInt)
public IloConstraintoverlapInDimension(IloBox, IloBox, IloInt)
public IloConstraintprecedenceInDimension(IloBox, IloBox, IloInt)
Inherited Methods from IloConstraint
getImpl
Inherited Methods from IloIntExprArg
getImpl
Inherited Methods from IloNumExprArg
getImpl
Inherited Methods from IloExtractable
end, getEnv, getId, getImpl, getName, getObject, setName, setObject
Constructor Detail

IloBox

public IloBox()
This constructor creates an empty handle. You must initialize it before you use it.

IloBox

public IloBox(IloBox::ImplClass * impl)
This constructor creates a handle object from a pointer to an implementation object.

IloBox

public IloBox(const IloEnv env, IloInt dimensions, const IloIntVarArray origin, const IloIntArray size)

This constructor creates a box according to the specifications passed in the parameters. The parameter dimensions indicates the number of dimensions the box has. The arrays origin and size must contain the same number of elements as the number of dimensions of the box. In dimension i, the box extends from origin[i] to origin[i] + size[i]. For example, the statement

 IloBox(env, 2, IloNumVarArray (env, 2, 3, 0), IloNumArray(env, 2, 8, 4));
 

creates a box as shown in this illustration.


Method Detail

contains

public IloConstraint contains(IloBox box)

This member function creates a constraint that requires the invoking box to contain box. The parameter box should have the same number of dimensions as the invoking box.


getDimensions

public IloInt getDimensions()

This member function returns the number of dimensions of the invoking box.


getImpl

public IloBox::ImplClass * getImpl()
This member function returns a pointer to the implementation object of the invoking handle.

getNotOverlapConstraint

public IloConstraint getNotOverlapConstraint()

This member function returns a constraint that specifies that none of the boxes contained in the invoking box can overlap along any of their dimensions.

The filter level of this constraint can be set using IloSolver::setFilterLevel. Currently two filter levels are allowed, IlcBasic, the default, and IlcMedium, which is slower but propagates more. You can specify the default filter level of this constraint using the method IloSolver::setDefaultFilterLevel. Refer to the ILOG Solver Reference Manual for details about these methods.


getOrigin

public IloIntVar getOrigin(IloInt dimension)

This member function returns the origin of the invoking box along the dimension indicated by dimension.


getSize

public IloInt getSize(IloInt dimension)

This member function returns the length of the invoking box along the dimension indicated by dimension.


notOverlapInDimension

public IloConstraint notOverlapInDimension(IloBox box1, IloBox box2, IloInt dimension)

This member function returns a constraint that specifies that if box1 and box2 are contained in the invoking box, then they do not overlap along the dimension indicated by dimension.


overlapInDimension

public IloConstraint overlapInDimension(IloBox box1, IloBox box2, IloInt dimension)

This member function returns a constraint that specifies that if box1 and box2 are contained in the invoking box, then they must overlap along the dimension indicated by dimension.


precedenceInDimension

public IloConstraint precedenceInDimension(IloBox box1, IloBox box2, IloInt dimension)

If box1 and box2 are contained in the invoking box, then this member function returns a constraint that specifies the precedence of box1 over box2 along the dimension indicated by dimension.