NO FRAMES

Class IloModel

Definition file: ilconcert/ilomodel.h

An instance of this class represents a model. A model consists of the extractable objects such as constraints, constrained variables, objectives, and possibly other modeling objects, that represent a problem. Concert Technology extracts information from a model and passes the information in an appropriate form to algorithms that solve the problem. (For information about extracting objects into algorithms, see the member function IloAlgorithm::extract and the template IloAdd.)

Most member functions in this class contain assert statements. For an explanation of the macro NDEBUG (a way to turn on or turn off these assert statements), see the concept Assert and NDEBUG.

Models and Submodels

With Concert Technology, you may create more than one model in a given environment (an instance of IloEnv). In fact, you can create submodels. That is, you can add one model to another model within the same environment.

What Is Extracted from a Model

All the extractable objects (that is, instances of IloExtractable or one of its subclasses) that have been added to a model (an instance of IloModel) and that have not been removed from it will be extracted when an algorithm extracts the model. An instance of the nested class IloModel::Iterator accesses those extractable objects.

See Also:

Constructor Summary
public IloModel()
public IloModel(IloModel::ImplClass *)
public IloModel(const IloEnv, const char *)
Method Summary
public const IloExtractableArray &add(const IloExtractableArray &)
public IloExtractableadd(const IloExtractable)
public IloModel::ImplClass *getImpl()
public voidremove(const IloExtractableArray)
public voidremove(const IloExtractable)
Inherited Methods from IloExtractable
end, getEnv, getId, getImpl, getName, getObject, setName, setObject
Inner Class
IloModel::Iterator
Constructor Detail

IloModel

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

IloModel

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

IloModel

public IloModel(const IloEnv env, const char * name)

This constructor creates a model. By default, the name of the model is the empty string, but you can attribute a name to the model at its creation.


Method Detail

add

public const IloExtractableArray & add(const IloExtractableArray & x)

This member function adds the array of extractable objects to the invoking model.

Note
The member function add notifies Concert Technology algorithms about this addition to the model.

add

public IloExtractable add(const IloExtractable x)

This member function adds the extractable object to the invoking model.

Note
The member function add notifies Concert Technology algorithms about this addition to the model.

getImpl

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

remove

public void remove(const IloExtractableArray x)

This member function removes the array of extractable objects from the invoking model.

Note
The member function remove notifies Concert Technology algorithms about this removal from the model.

remove

public void remove(const IloExtractable x)

This member function removes the extractable object from the invoking model.

Note
The member function remove notifies Concert Technology algorithms about this removal from the model.