Overview | Group | Tree | Graph | Index | Concepts |
This class eases IloPoolOperator
configuration.
It allows you to specify common operator parameters at one time before
creating many operators. Objects of this class are usually used through
one if its subclasses.
See Also:
IloPoolOperator, IloListener, IloSearchLimit
Constructor Summary | |
---|---|
public | IloPoolOperatorFactory(IloEnv env) Creates a factory that can be used to configure pool operators. |
Method Summary | |
---|---|
public void | addAfterOperate(IloPoolOperator op) const Adds a final operator to execute. |
public void | addBeforeOperate(IloPoolOperator op) const Adds an initial operator to execute. |
public void | addListener(IloListener listener) const Adds a listener to the factory. |
public void | end() |
public IloPoolOperator | getAfterOperate() const Returns the final operator to execute. |
public IloPoolOperator | getBeforeOperate() const Returns the initial operator to execute. |
public IloEnv | getEnv() const |
public const char * | getName() const |
public IloAny | getObject() const |
public IloSolution | getPrototype() const Returns the solution prototype. |
public IloSearchLimit | getSearchLimit() const Returns the search limit. |
public IloPoolOperator | operator()(IloPoolOperator op, const char * name=0) const Configures the given pool operator using the factory parameters. |
public void | removeListener(IloListener listener) const Removes a listener previously added to the factory. |
public void | setAfterOperate(IloPoolOperator op) const Sets a final operator to execute. |
public void | setBeforeOperate(IloPoolOperator op) const Sets an initial operator to execute. |
public void | setName(const char * name) const |
public void | setObject(IloAny obj) const |
public void | setPrototype(IloSolution prototype) const Sets the solution prototype used by created operators. |
public void | setSearchLimit(IloSearchLimit searchLimit) const Sets a search limit on operators. |
Constructor Detail |
---|
This constructor creates a factory that can be used to configure pool
operators. If you wish to create a factory which build
evolutionary operators, use the subclass
IloEAOperatorFactory
.
Method Detail |
---|
This member function adds a final operator to execute.
Any operator of the factory
will have operator op
executed after it. Note that
unlike IloPoolOperatorFactory::setAfterOperate
,
other operators already
set will not be replaced. Also note that op
will only be executed if the factory operator executed
successfully.
See Also:
operator &&(IloPoolOperator, IloPoolOperator) , IloPoolOperator::IloPoolOperator
This member function adds an initial operator to execute.
Any operator of the factory
will have operator op
executed before it. Note that
unlike IloPoolOperatorFactory::setBeforeOperate
, other operators already
added will not be replaced.
factory.addBeforeOperate(a)
followed by factory.addBeforeOperate(b)
, then
any operator created by the factory will execute b
,
then a
, then the operator in question.
See Also:
operator &&(IloPoolOperator, IloPoolOperator)
This member function adds a listener to the factory. Any operator then created by the factory will have the specified listener added.
See Also:
This function deletes the object from the environment on which it was allocated and sets the implementation pointer to zero.
This member function returns the final operator to execute, which
was last set using IloPoolOperatorFactory#setAfterOperator
, or an empty handle
if no "after" operator was set.
This member function returns the initial operator to execute, which
was last set using setBeforeOperator
, or an empty
handle if no "before" operator was set.
This function returns the environment on which the invoking object was allocated.
This member function returns a character string specifying the name of the invoking object (if there is one).
This member function returns the object associated with the invoking object (if there is one). Normally, an associated object contains user data pertinent to the invoking object.
This member function returns the solution prototype last set using
IloPoolOperatorFactory::setPrototype
or an empty handle if none has been set.
This member function returns the search limit last
set using IloPoolOperatorFactory::setSearchLimit
or an empty handle
if none was set.
This operator configures the given pool operator
using the factory parameters. A new operator will be produced
using pool operator op
as a template,
but which will be parameterized via the parameters of the factory.
That is, it will have a prototype, limit, and listeners added
as specified by the factory.
See Also:
IloPoolOperator::addListener, IloPoolOperator::setPrototype, IloPoolOperatorFactory::setSearchLimit, IloPoolOperator::IloPoolOperator
This member function removes a listener added to the factory. Any operator then created by the factory will no longer have the specified listener added.
See Also:
IloPoolOperator::removeListener
This member function sets a final operator to execute.
Any operator of the factory
will have operator op
executed after it.
Note that op
will only be executed if
the factory operator executed successfully.
See Also:
operator &&(IloPoolOperator, IloPoolOperator)
This member function sets an initial operator to execute.
Any operator then created by the factory
will have the "before" operator op
executed before it.
See Also:
operator &&(IloPoolOperator, IloPoolOperator)
This member function assigns name
to the invoking object.
This member function associates obj
with the
invoking object. The member function getObject
accesses
this associated object afterward. Normally, obj
contains
user data pertinent to the invoking object.
This member function sets the solution prototype used by created operators. Any operator created by the factory will then have its prototype set accordingly.
See Also:
This member functions sets a search limit on operators. This search limit will apply to any operator then created by the factory.