Skip to main content
FRAMES NO FRAMES

Class IloOplRunConfiguration

Definition file: ilopl/ilooplproject.h
Map of IloOplRunConfigurationIloOplRunConfigurationIloOplRunConfiguration
Convenience class for running configurations.

This class eases the association of model and data files. It manages the lifecycle of the underlying objects. Refer also to the Interfaces User's Manual.

See Also:

Method Summary
public voidend()
public IloCPgetCP()
public IloCplexgetCplex()
public IloOplErrorHandlergetErrorHandler()
public IloOplModelgetOplModel()
public IloOplSettingsgetSettings()
public IloOplRunConfiguration(IloEnv env, const char * modPath)
public IloOplRunConfiguration(IloEnv env, const char * modPath, const char * datPath)
public IloOplRunConfiguration(IloEnv env, const char * modPath, IloStringArray datPaths)
public IloOplRunConfiguration(IloOplModelDefinition def)
public IloOplRunConfiguration(IloOplModelDefinition def, IloOplDataElements dataElements)
public IloBoolisCompiledModel() const
public voidsetCP(IloCP cp)
public voidsetCplex(IloCplex cplex)
public voidsetErrorHandler(IloOplErrorHandler handler)
public voidsetSettings(IloOplSettings settings)
Method Detail

IloOplRunConfiguration

public IloOplRunConfiguration(IloEnv env, const char * modPath)

This constructor creates a run configuration from a model file.

Parameters:

env
The environment to allocate memory.
modPath
The path to the model file.

IloOplRunConfiguration

public IloOplRunConfiguration(IloEnv env, const char * modPath, const char * datPath)

This constructor creates a run configuration from a model file and one data file.

Parameters:

env
The environment to allocate memory.
modPath
The path to the model file.
datPath
The path to the data file.

IloOplRunConfiguration

public IloOplRunConfiguration(IloEnv env, const char * modPath, IloStringArray datPaths)

This constructor creates a run configuration from a model file and more than one data file.

Parameters:

env
The environment to allocate memory.
modPath
The path to the model file.
datPaths
An array of the paths to the data files.

IloOplRunConfiguration

public IloOplRunConfiguration(IloOplModelDefinition def)

This constructor creates a run configuration from a model definition.

Parameters:

def
The model definition.

IloOplRunConfiguration

public IloOplRunConfiguration(IloOplModelDefinition def, IloOplDataElements dataElements)

This constructor creates a run configuration from a model definition and data elements.

Parameters:

def
The model definition.
dataElements
The data elements.

end

public void end()

Clears the memory used by this object


getCP

public IloCP getCP()

This member function retrieves the current instance of the CP engine.

Returns:

The CP engine.

getCplex

public IloCplex getCplex()

This member function retrieves the current instance of the CPLEX engine.

Returns:

The CPLEX engine.

getErrorHandler

public IloOplErrorHandler getErrorHandler()

This member function retrieves the error handler.

Returns:

The current error handler.

getOplModel

public IloOplModel getOplModel()

This member function retrieves the OPL model instance for this run configuration.

The first call to this method triggers instantiation of all missing objects. That may include objects of type IloOplErrorHandler, IloOplSettings, IloOplModelSource, IloOplModelDefinition, IloOplDataSource, IloCplex, IloCP, IloOplModel.

Returns:

A model instance.

getSettings

public IloOplSettings getSettings()

This member function retrieves the current OPL settings.

See Also:

Returns:

The settings object.

isCompiledModel

public IloBool isCompiledModel() const

This member function tests whether the model file is compiled.

Returns:

IloTrue if the model file is compiled.

setCP

public void setCP(IloCP cp)

This member function specifies the instance of the CP engine to use.

If no CP engine is specified, a new one is created.

Parameters:

cp
The CP engine.

setCplex

public void setCplex(IloCplex cplex)

This member function specifies the instance of the CPLEX engine to use.

If no CPLEX engine is specified, a new one is created.

Parameters:

cplex
The CPLEX engine.

setErrorHandler

public void setErrorHandler(IloOplErrorHandler handler)

This member function specifies what error handler to use.

If no error handle is specified, a new one is created.

Parameters:

handler
The error handler to use.

setSettings

public void setSettings(IloOplSettings settings)

This member function specifies what OPL settings to use.

If no settings object is specified, a new one is created.

See Also:

Parameters:

settings
The settings to be used.