FRAMES NO FRAMES

Class IlcMTSearchLimitI

Definition file: ilsolver/search.h
Include file: <ilsolver/ilosolver.h>

This implementation class derives from the abstract implementation class IlcSearchLimitI. Instances of IlcMTSearchLimitI are implementation objects of search limits for multithreaded search.

Handle and Implementation Classes

A search limit is an object in Concert Technology. Like other Concert Technology entities, a search limit is implemented by means of two classes: a handle class and an implementation class. In other words, an instance of the class IlcMTSearchLimit (a handle) contains a data member (the handle pointer) that points to an instance of the class IlcMTSearchLimitI (its implementation object).

Purpose of a Search Limit

A search limit is used to prune part of the search tree. The member function check indicates whether the limit has been reached.

A search limit has its own life cycle:

Implementing Your Own Search Limit

You implement a search limit much the same way as you implement a search selector.

The function IlcMTMinimizeVar returns an instance of IlcMTSearchSelector. In the documentation of that function, we describe part of its implementation details. From that description, you see how a search selector is used and what you must include in your own implementation of a search selector.

To get an idea of how to implement your own search limit, see IlcMTMinimizeVar.

See Also:

Constructor Summary
public IlcMTSearchLimitI(IloSolver s, IlcBool duplicate)
Method Summary
public voidaddFloatVar(IlcFloatVar v, const char * name)
public voidaddIntVar(IlcIntVar v, const char * name)
public IlcFloatVargetFloatVar(IloSolver s, IlcFloatVarRef ref) const
public IlcFloatVarRefgetFloatVarRef(const char *) const
public IlcIntVargetIntVar(IloSolver s, IlcIntVarRef ref) const
public IlcIntVarRefgetIntVarRef(const char * name) const
Inherited Methods from IlcSearchLimitI
check, duplicateLimit, init
Constructor Detail

IlcMTSearchLimitI

public IlcMTSearchLimitI(IloSolver s, IlcBool duplicate)

This constructor creates a search limit for multithreaded search. The parameter duplicate indicates whether the object is an internal copy used by the solver (duplicate = IlcTrue), or whether it is just a template.


Method Detail

addFloatVar

public void addFloatVar(IlcFloatVar v, const char * name)

This member function stores the constrained floating-point variable v under the name indicated by name.


addIntVar

public void addIntVar(IlcIntVar v, const char * name)

This member function stores the constrained integer variable v under the name indicated by name.


getFloatVar

public IlcFloatVar getFloatVar(IloSolver s, IlcFloatVarRef ref) const

This member function retrieves the variable stored by the solver s under the name corresponding to the reference ref.


getFloatVarRef

public IlcFloatVarRef getFloatVarRef(const char *) const

This member function retrieves all the constrained floating-point variables stored under the name indicated by name.


getIntVar

public IlcIntVar getIntVar(IloSolver s, IlcIntVarRef ref) const

This member function retrieves the variable stored by the solver s under the name corresponding to the reference ref.


getIntVarRef

public IlcIntVarRef getIntVarRef(const char * name) const

This member function retrieves all the constrained integer variables stored under the name indicated by name.