Skip to main content
FRAMES NO FRAMES

Class IloOplSettings

Definition file: ilopl/ilooplsettings.h
Map of IloOplSettingsIloOplSettingsIloOplSettings
Modifies the settings for OPL.

An instance of this class provides a set of parameters and options to customize the behavior of OPL. Several OPL model instances can share one settings object.

Method Summary
public voidend()
public IloIntgetBigMapThreshold() const
public IloIntgetDisplayPrecision() const
public IloIntgetDisplayWidth() const
public const char *getDistributedMIPConfig() const
public IloOplErrorHandlergetErrorHandler() const
public const char *getExportExternalData() const
public const char *getExportInternalData() const
public IloOplProfilergetProfiler() const
public IloIntgetRelaxationLevel() const
public const char *getResolverPath() const
public const char *getTmpDir() const
public IloBoolhasProfiler() const
public IloBoolhasSlicingCache() const
public IloOplSettings(IloEnv env, IloOplErrorHandler handler)
public IloBoolisDisplayOnePerLine() const
public IloBoolisDisplayWithComponentName() const
public IloBoolisDisplayWithIndex() const
public IloBoolisDistributedMIP() const
public IloBoolisDo4dsxDebug() const
public IloBoolisExportExternalData() const
public IloBoolisExportInternalData() const
public IloBoolisForceElemenPostProcessingtUsage() const
public IloBoolisForceElementUsage() const
public IloBoolisKeepTmpFiles() const
public IloBoolisMainEndEnabled() const
public IloBoolisSkipAssert() const
public IloBoolisSkipWarnNeverUsedElements() const
public IloBoolisWithDataChecks() const
public IloBoolisWithJavaScript() const
public IloBoolisWithLocations() const
public IloBoolisWithMultiEnv() const
public IloBoolisWithNames() const
public IloBoolisWithWarnings() const
public voidremoveProfiler()
public voidsetBigMapThreshold(IloInt value)
public voidsetDisplayOnePerLine(IloBool onoff)
public voidsetDisplayPrecision(IloInt value)
public voidsetDisplayWidth(IloInt value)
public voidsetDisplayWithComponentName(IloBool with)
public voidsetDisplayWithIndex(IloBool with)
public voidsetDistributedMIPConfig(const char * path)
public voidsetDo4dsxDebug(IloBool value)
public voidsetExportExternalData(const char * path)
public voidsetExportInternalData(const char * path)
public voidsetForceElementPostProcessingUsage(IloBool onoff)
public voidsetForceElementUsage(IloBool onoff)
public voidsetGC(IloBool value)
public voidsetKeepTmpFiles(IloBool value)
public voidsetMainEndEnabled(IloBool value)
public voidsetProfiler(IloOplProfiler profiler)
public voidsetRelaxationLevel(IloInt value)
public voidsetResolverPath(const char * path)
public voidsetSkipAssert(IloBool with)
public voidsetSkipWarnNeverUsedElements(IloBool with)
public voidsetSlicingCache(IloBool value)
public voidsetTmpDir(const char * path)
public voidsetWithDataChecks(IloBool with)
public voidsetWithJavaScript(IloBool value)
public voidsetWithLocations(IloBool with)
public voidsetWithMultiEnv(IloBool value)
public voidsetWithNames(IloBool with)
public voidsetWithWarnings(IloBool with)
public IloBoolusesGC() const
Method Detail

IloOplSettings

public IloOplSettings(IloEnv env, IloOplErrorHandler handler)

Creates a settings object.

Parameters:

env
The environment needed to allocate memory for the created object.
handler
The error handler to which all OPL model instances using these settings will report errors.

end

public void end()

Clears the memory used by this object.


getBigMapThreshold

public IloInt getBigMapThreshold() const

This member function returns the threshold set for arrays or maps to be considered big.

Returns:

An integer representing the threshold for arrays or maps.

getDisplayPrecision

public IloInt getDisplayPrecision() const

This member function returns the display precision when serializing model elements.

Returns:

An integer representing the display precision.

getDisplayWidth

public IloInt getDisplayWidth() const

This member function returns the display width when serializing model elements.

Returns:

An integer representing the display width.

getDistributedMIPConfig

public const char * getDistributedMIPConfig() const

Returns the config file CPLEX using for dist MIP.

Returns:

An file name used by CPLEX for dist MIP.

getErrorHandler

public IloOplErrorHandler getErrorHandler() const

Returns the OPL error handler.

Returns:

The IloErrorHandler for this implementation object.

getExportExternalData

public const char * getExportExternalData() const

Returns the file name of the external data export or null.

Returns:

An file name used by OPL to export external data.

getExportInternalData

public const char * getExportInternalData() const

Returns the file name of the internal data export or null.

Returns:

An file name used by OPL to export internal data.

getProfiler

public IloOplProfiler getProfiler() const

Returns the OPL profiler if the feature is activated.

Returns:

The IloProfiler for this implementation object.

getRelaxationLevel

public IloInt getRelaxationLevel() const

This member function returns the level for relaxation.

Returns:

An integer representing the level for relaxation.

getResolverPath

public const char * getResolverPath() const

Returns the current resources search path.

See IloOplSettings::setResolverPath for details.

Returns:

A string representing the current resources search path.

getTmpDir

public const char * getTmpDir() const

Returns the current path for temporary files.

Returns:

A string representing the current path for temporary files.

hasProfiler

public IloBool hasProfiler() const

Returns true if the OPL profiling feature is activated.

Returns:

An IloBool indicating whether the profiling feature is activated.

hasSlicingCache

public IloBool hasSlicingCache() const

Returns true if the OPL slicing can cache results to get possible performance improvements.

Returns:

An IloBool indicating whether the OPL slicing can cache results to get possible performance improvements.

isDisplayOnePerLine

public IloBool isDisplayOnePerLine() const

Returns true if the display is set to show only one item per line.

Returns:

An IloBool indicating whether the display is set to show only one item per line.

isDisplayWithComponentName

public IloBool isDisplayWithComponentName() const

Returns true if tuple component names are shown.

Returns:

An IloBool indicating whether tuple component names are shown.

isDisplayWithIndex

public IloBool isDisplayWithIndex() const

Returns true if item indices are shown when serializing model elements.


isDistributedMIP

public IloBool isDistributedMIP() const

Returns true if CPLEX is using dist MIP.

Returns:

An IloBool indicating whether CPLEX uses dist MIP.

isDo4dsxDebug

public IloBool isDo4dsxDebug() const

Returns IloTrue if JavaScript is enabled.

Returns:

An IloBool indicating whether JavaScript is enabled.

isExportExternalData

public IloBool isExportExternalData() const

Returns true if OPL will export the external data.

Returns:

An IloBool indicating whether export of external data will be done.

isExportInternalData

public IloBool isExportInternalData() const

Returns true if OPL will export the internal data.

Returns:

An IloBool indicating whether export of internal data will be done.

isForceElemenPostProcessingtUsage

public IloBool isForceElemenPostProcessingtUsage() const

Returns true if the usage of all model elements is forced.

Returns:

An IloBool indicating whether the usage of all model elements is forced.

isForceElementUsage

public IloBool isForceElementUsage() const

Returns true if the usage of all model elements is forced.

Returns:

An IloBool indicating whether the usage of all model elements is forced.

isKeepTmpFiles

public IloBool isKeepTmpFiles() const

Returns true if temporary files are kept.

Returns:

An IloBool indicating whether temporary files are kept.

isMainEndEnabled

public IloBool isMainEndEnabled() const

Returns true if calls to end() inside a main scripting block are executed.

Returns:

An IloBool indicating whether calls to end are enabled within a main scripting block.

isSkipAssert

public IloBool isSkipAssert() const

Returns true if the evaluation of assert statements is skipped.

Returns:

An IloBool indicating whether the evaluation of assert statements is skipped.

isSkipWarnNeverUsedElements

public IloBool isSkipWarnNeverUsedElements() const

Returns true if the detection of unused OPL elements is skipped.

Returns:

An IloBool indicating whether the detection of unused OPL elements is skipped.

isWithDataChecks

public IloBool isWithDataChecks() const

Returns true if OPL must check the integrity of the input data.

Returns:

An IloBool indicating whether OPL must check the integrity of the data input or not.

isWithJavaScript

public IloBool isWithJavaScript() const

Returns IloTrue if JavaScript is enabled.

Returns:

An IloBool indicating whether JavaScript is enabled.

isWithLocations

public IloBool isWithLocations() const

Returns true if locations are present.

Returns:

An IloBool indicating whether the locations are present.

isWithMultiEnv

public IloBool isWithMultiEnv() const

Returns IloTrue if multi-env mode is enabled.

Returns:

An IloBool indicating whether multi-env mode is enabled.

isWithNames

public IloBool isWithNames() const

Returns true if names for decision variables and constraints are present.

Returns:

An IloBool indicating whether names for decision variables and constraints are present.

isWithWarnings

public IloBool isWithWarnings() const

Returns true if the OPL must output warnings or not.

Returns:

An IloBool indicating whether the evaluation of assert statements is skipped.

removeProfiler

public void removeProfiler()

Deactivates the OPL profiling feature.


setBigMapThreshold

public void setBigMapThreshold(IloInt value)

Sets the threshold for arrays/maps to be considered big.

This threshold is used to decide between full or short names for array/map items.

A short name consists of the absolute index number of the item's index in its indexer, such as #13.

A full name is the string representation of the item's index.

Parameters:

value
The new threshold.

setDisplayOnePerLine

public void setDisplayOnePerLine(IloBool onoff)

Displays only one item per line, or not.

Parameters:

onoff
If set to true, only one item is displayed per line. If set to false, more than is displayed.

setDisplayPrecision

public void setDisplayPrecision(IloInt value)

Sets the display precision when serializing model elements.

Parameters:

value
The new precision for the display.

setDisplayWidth

public void setDisplayWidth(IloInt value)

Sets the display width when serializing model elements.

Parameters:

value
The new width for the display.

setDisplayWithComponentName

public void setDisplayWithComponentName(IloBool with)

Shows tuple component names, or not, when serializing model elements.

Parameters:

with
If set to true, the names are shown. If set to false, they are not.

setDisplayWithIndex

public void setDisplayWithIndex(IloBool with)

Shows item indices, or not, when serializing model elements.

Parameters:

with
If set to true, the indices are shown. If set to false, they are not.

setDistributedMIPConfig

public void setDistributedMIPConfig(const char * path)
Sets the file name used by CPLEX for dist MIP.

setDo4dsxDebug

public void setDo4dsxDebug(IloBool value)

Enables or disables Javascript support.

Parameters:

value
The new value.

setExportExternalData

public void setExportExternalData(const char * path)
Sets the file name used by OPL to export the external data.

setExportInternalData

public void setExportInternalData(const char * path)
Sets the file name used by OPL to export the internal data.

setForceElementPostProcessingUsage

public void setForceElementPostProcessingUsage(IloBool onoff)

Forces the usage of all model elements, or not. Useful for debugging.

Parameters:

onoff
If set to true, the usage is forced. If set to false, it is not.

setForceElementUsage

public void setForceElementUsage(IloBool onoff)

Forces the usage of all model elements, or not. Useful for debugging.

Parameters:

onoff
If set to true, the usage is forced. If set to false, it is not.

setGC

public void setGC(IloBool value)

Set the Javascript garbage collector mode.

This flag enables or disables the Javascript garbage collector.

The default value is true which means that the GC must run.

Parameters:

value
The new value.

setKeepTmpFiles

public void setKeepTmpFiles(IloBool value)

Keep temporary files.

This flag is used to control the deletion of temporary files. When set to true temporary files will remain available (for debugging).

The default value is false.

Parameters:

value
The new flag value.

setMainEndEnabled

public void setMainEndEnabled(IloBool value)

Enables object ending for flow control scripting.

This flag is used to control the execution of end() inside a main scripting block.

The default value is true.

Parameters:

value
The new flag value.

setProfiler

public void setProfiler(IloOplProfiler profiler)

Activates the OPL profiling feature.

Parameters:

profiler
The profiler to be activated.

setRelaxationLevel

public void setRelaxationLevel(IloInt value)

Sets the level for relaxation :

0 (default): any variable or labeled constraint can be relaxed.

1: only labeled constraints can be relaxed.

Parameters:

value
The new level.

setResolverPath

public void setResolverPath(const char * path)

Sets the path used to find resources (sub-models, data files, external libraries).

This a set of paths separated by ';' (whatever the platform). This path is used to look up resources, such as sub-models, data files and external libraries. It is used by script methods that load files, such as includeFile, IloOplModelSource, IloOplDataSource, IloOplJavaImport.

The path can include the special value $OPLROOT, which will be automatically translated to the root of the OPL installation directory.

If an element of the path is not absolute or does not start with $OPLROOT, it will be considered as relative to the position of the current model file.

Setting this path affects immediately the current instance of IloOplResourceResolver.

The default value is $OPLROOT/lib.

If IBM ILOG ODM is installed, the additional special value $ODMROOT can be used to designate the ODM installation directory, and the default value is changed to $OPLROOT/lib;$ODMROOT/lib.

Parameters:

path
The new path value.

setSkipAssert

public void setSkipAssert(IloBool with)

Skips the evaluation of model assert statements, or not. Useful for debugging.

Parameters:

with
If set to true the evaluation is skipped. If set to false, it is not.

setSkipWarnNeverUsedElements

public void setSkipWarnNeverUsedElements(IloBool with)

Skips the the detection of unused OPL elements. Useful for deployment.

The default is false, warnings will be raised as needed.

Parameters:

with
If set to true the detection is skipped.

setSlicingCache

public void setSlicingCache(IloBool value)

Tells OPL if the OPL slicing can cache results to get possible performance improvements.


setTmpDir

public void setTmpDir(const char * path)

Sets the path to a directory for temporary files.

Parameters:

path
The new directory for temporary files.

setWithDataChecks

public void setWithDataChecks(IloBool with)

Tells OPL to perform data integrity checks for inputs or not.


setWithJavaScript

public void setWithJavaScript(IloBool value)

Enables or disables Javascript support.

Parameters:

value
The new value.

setWithLocations

public void setWithLocations(IloBool with)

Generates locations for Concert objects, or not. This switch is useful for debugging.

Parameters:

with
If set to true the locations are generated, if false they are not.

setWithMultiEnv

public void setWithMultiEnv(IloBool value)

Enables multi-env mode.

This flag offers a new IloEnv to each sub-model.

The default value is true.

Parameters:

value
The new value.

setWithNames

public void setWithNames(IloBool with)

Generates names for decision variables and constraints in Concert objects, or not. Useful for debugging.

Parameters:

with
If set to true the names are generated. If false they are not.

setWithWarnings

public void setWithWarnings(IloBool with)

Forces OPL to output warnings or not


usesGC

public IloBool usesGC() const

Returns IloTrue if Javascript garbage collector is enabled.

Returns:

An IloBool indicating whether Javascript garbage collector is on or off.