Creating the environment

The environment, which handles communication channels and memory management, must be created before the modeling objects are created.

The first step in an IBM® ILOG® Concert Technology application using the C++ API is to create the environment, an instance of the class IloEnv.

The environment manages internal modeling issues; it handles output, memory management for modeling objects and termination of search algorithms. In the Microsoft .NET Framework languages and Java™ APIs, issues regarding the environment are handled internally.

Normally an application needs only one environment, but you can create as many environments as you want. Typically, the environment is created early in the main part of an application, like this:


  IloEnv env;

In the C++ API, every Concert Technology model and every optimizer object must belong to an environment. In programming terms, when you construct a model, you must pass one instance of IloEnv as an argument to that constructor.

In the Java API, the Concert Technology functions for creating modeling objects are defined in the interface IloModeler and implemented in the class IloCP.

Likewise, in the C# API, the functions for creating modeling objects are defined in the interface IModeler, and the class CP inherits them.