NO FRAMES

Class IloPack

Definition file: ilconcert/ilomodel.h

The IloPack constraint maintains the load of a set of containers or bins, given a set of weighted items and an assignment of items to containers.

Consider that we have n items and m containers. Each item i has an integer weight w[i] and a constrained integer variable p[i] associated with it, indicating in which container (numbered contiguously from 0) item i is to be placed. No item can be split up, and so an item can go in only one container. Associated with each container j is an integer variable l[j] representing the load in that container; that is, the sum of the weights of the items which have been assigned to that container. A capacity can be set for each container placing an upper bound on this load variable. The constraint also ensures that the total sum of the loads of the containers is equal to the sum of the weights of the items being placed.

Constructor Summary
public IloPack()
public IloPack(IloPack::ImplClass *)
public IloPack(const IloEnv, const IloIntExprArray, const IloIntExprArray, const IloIntArray, const char *)
public IloPack(const IloEnv, const IloIntExprArray, const IloIntExprArray, const IloInt, const char *)
public IloPack(const IloEnv, const IloIntExprArray, const IloIntExprArray, const char *)
Method Summary
public IloPack::ImplClass *getImpl()
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

IloPack

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

IloPack

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

IloPack

public IloPack(const IloEnv env, const IloIntExprArray load, const IloIntExprArray where, const IloIntArray weight, const char * name)

This constructor creates a constraint that maintains the container loads subject to the assignments of weighted items to containers. load is the array of loads, one for each container. where indicates, for each item, which container it should be placed in, counting from 0. weight is an array of non-negative weights, one for each item. where and weight must be the same size, otherwise an instance of IloException is thrown. name, if specified becomes the name of the constraint.


IloPack

public IloPack(const IloEnv env, const IloIntExprArray load, const IloIntExprArray where, const IloInt weight, const char * name)

This constructor creates a constraint that maintains the container loads subject to the assignments of weighted items to containers. load is the array of loads, one for each container. where indicates, for each item, which container it should be placed in, counting from 0. weight is a non-negative weight; all items have this weight. name, if specified becomes the name of the constraint.


IloPack

public IloPack(const IloEnv env, const IloIntExprArray load, const IloIntExprArray where, const char * name)

This constructor creates a constraint that maintains the container loads subject to the assignments of weighted items to containers. load is the array of loads, one for each container. where indicates, for each item, which container it should be placed in, counting from 0. All items have unit weight. name, if specified becomes the name of the constraint.


Method Detail

getImpl

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