FRAMES NO FRAMES

Class IloGoal

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

An instance of IloGoal represents a goal, a search primitive, for use in a Concert Technology model. That is, a goal is a building block in a search for solutions.

The goals listed in See Also are predefined in IBM® ILOG® Solver.

Environment and Goals

Every instance of IloGoal must belong to one instance of IloEnv. A goal (that is, an instance of IloGoal or one of its derived subclasses) is tied throughout its lifetime to the environment where it is created. It can be used only with goals and extractable objects belonging to the same environment.

See Also:

Constructor Summary
public IloGoal()
public IloGoal(IloGoalI * impl=0)
Method Summary
public voidend() const
public IloEnvgetEnv() const
public IloGoalI *getImpl() const
public const char *getName() const
public IloAnygetObject() const
public voidsetName(const char * name) const
public voidsetObject(IloAny obj) const
Constructor Detail

IloGoal

public IloGoal()

This constructor creates a goal which is empty, that is, one whose handle pointer is null. This object must then be assigned before it can be used, exactly as when you declare a pointer.


IloGoal

public IloGoal(IloGoalI * impl=0)

This constructor creates a goal from its implementation object.


Method Detail

end

public void end() const
This member function ends the corresponding goal and returns the memory to the environment.

getEnv

public IloEnv getEnv() const

This member function returns the environment to which the invoking goal belongs. A goal belongs to exactly one environment; different environments can not share the same goal.


getImpl

public IloGoalI * getImpl() const

This member function returns a pointer to the implentation object of the invoking goal. This member function is useful when you need to be sure that you are using the same copy of the invoking goal in more than one situation.


getName

public const char * getName() const

This member function returns a character string specifying the name of the invoking object (if there is one).


getObject

public IloAny getObject() const

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.


setName

public void setName(const char * name) const

This member function assigns name to the invoking object.


setObject

public void setObject(IloAny obj) const

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.