Class IloBox
Definition file: ilconcert/ilobox.h
For IBM ILOG Solver: 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 the class IlcBox
in the
IBM ILOG Solver Reference Manual and
the class IlcFilterLevelConstraint
in the IBM ILOG Solver Reference Manual.
Inherited Methods from IloExtractable |
---|
asConstraint, asIntExpr, asModel, asNumExpr, asObjective, asVariable, end, getEnv, getId, getImpl, getName, getObject, isConstraint, isIntExpr, isModel, isNumExpr, isObjective, isVariable, setName, setObject |
public IloBox()
This constructor creates an empty handle. You must initialize it before you use it.
public IloBox(IloBoxI * impl)
This constructor creates a handle object from a pointer to an implementation object.
This constructor creates a box according to the
specifications passed in the
arguments. The argument dimensions
specifies 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, IloIntVarArray (env, 2, 3, 0), IloIntArray(env, 2, 8, 4));
creates a box as shown in this illustration.

This member function returns the number of dimensions of the invoking box.
public IloBoxI * getImpl() const
This member function returns a pointer to the implementation object of the invoking handle.
This member function returns the origin of
the invoking box along the dimension
specified by dimension
.
This member function returns the length of
the invoking box along the dimension
specified by dimension
.