Overview | Group | Tree | Graph | Index | Concepts |
The class IlcSoftCtHandler
is used to manage the definition
of a soft constraint. It contains information about the copied constraint,
the copied variables and their relation to the original constraint and the
original variables.
The parameter sh
of type IlcSoftCtHandler
is
essential to understand the strength of the mechanism provided by IBM® ILOG® Solver.
The parameter sh
is filled with some information when a soft
constraint is created. This is quite useful to centralize some information
when several soft constraints with the same IlcSoftCtHandler
as
argument.
IlcSoftCtHandler
contains the following information:
IlcSoftHandler
parameter)All the functions of this class work with indices. This eases the access to additional data that the user would like to link to each original variable or to each original constraint.
Constructor Summary | |
---|---|
public | IlcSoftCtHandler() |
public | IlcSoftCtHandler(IlcSoftCtHandlerI * impl) |
public | IlcSoftCtHandler(IloSolver solver, IlcInt sizeMax) |
Method Summary | |
---|---|
public IlcConstraint | getConstraint(const IlcInt ct) const |
public IlcIntVar | getCopiedVar(const IlcInt cvar) const |
public IlcInt | getCtOfSoftCt(const IlcInt softCt) const |
public IlcInt | getFirstCopiedVarOfSoftCt(const IlcInt softCt) const |
public IlcInt | getFirstCopiedVarOfVar(const IlcInt var) const |
public IlcSoftCtHandlerI * | getImpl() const |
public IlcInt | getNextCopiedVarOfSoftCt(const IlcInt softCt, const IlcInt cvar) const |
public IlcInt | getNextCopiedVarOfVar(const IlcInt var, const IlcInt cvar) const |
public IlcInt | getNumCt() const |
public IlcInt | getNumCvars() const |
public IlcInt | getNumVars() const |
public IlcSoftConstraint | getSoftConstraint(const IlcInt softCt) const |
public IlcInt | getSoftCtOfCopiedVar(const IlcInt cvar) const |
public IlcInt | getSoftCtOfCt(const IlcInt ct) const |
public IloSolver | getSolver() const |
public IlcIntVar | getVar(const IlcInt var) const |
public IlcInt | getVarOfCopiedVar(const IlcInt cvar) const |
public void | operator=(const IlcSoftCtHandler & h) |
Constructor Detail |
---|
This constructor creates an empty handle. You must initialize it before you use it.
This constructor creates a handle object from a pointer to an implementation object.
The argument sizeMax
specifices the maximum number of
copied variables that can be handle by the invoked object.
Method Detail |
---|
This member function returns the constraint of index ct
.
This member function returns the copied variable of index cvar
.
This member function returns the index of the constraint from which the
soft constraint softct
has been copied.
This member function returns the index of the first copied variable on
which the soft constraint softct
is defined.
This member function returns the index of the first copied variable of the
variable corresponding to index var
.
This member function returns a pointer to the implementation object of the invoking handle.
This member function returns the index of the next copied variable of
cvar
on which the soft constraint is defined.
This member function returns the index of the next copied variable of the
copied variable cvar
of the variable corresponding to index
var
.
This member function returns the number of constraints contained in the invoked object.
This member function returns the number of copied variables contained in the invoked object.
This member function returns the number of variables contained in the invoked object.
This member function returns the copied constraint of index softct
.
This member function returns the index of soft constraint
softct
involving the copied var
.
This member function returns the index of the soft constraint of the
constraint ct
.
This member function returns an instance of IloSolver
associated with the invoking object.
This member function returns the variable of index var
.
This member function returns the index of the original variable from which the copied variable has been copied.
This operator assigns an address to the handle pointer of the invoking object. That address is the location of the implementation object of the provided argument.