public class IloOplFactory
extends java.lang.Object
end() allows you to clean the
memory used by all objects allocated by this factory. Be sure to use it when OPL is no longer
used. | Constructor and Description |
|---|
IloOplFactory()
Initialize the OPL environment necessary to create other objects.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToKeepRefs(java.lang.Object obj) |
IloCP |
createCP()
Creates a new ILOG CP Optimizer instance.
|
IloCplex |
createCplex()
Creates a new ILOG CPLEX instance.
|
IloOplCompiler |
createOplCompiler() |
IloOplConflictIterator |
createOplConflictIterator(IloOplModel model) |
IloOplCplexBasis |
createOplCplexBasis() |
IloOplCplexVectors |
createOplCplexVectors() |
IloOplDataElements |
createOplDataElements() |
IloOplDataSerializer |
createOplDataSerializer(IloOplSettings settings,
java.io.OutputStream outs) |
IloOplDataSerializer |
createOplDataSerializer(java.io.OutputStream outs)
Deprecated.
|
IloOplDataSource |
createOplDataSource(java.lang.String filename) |
IloOplDataSource |
createOplDataSourceFromStream(java.io.InputStream dataStream,
java.lang.String name)
Creates an OPL data source from a set of data given as a stream.
|
IloOplDataSource |
createOplDataSourceFromString(java.lang.String dataText,
java.lang.String name)
Creates an OPL data source from a set of data given as a string.
|
IloOplErrorHandler |
createOplErrorHandler()
Creates an error handler that display messages on the standard output.
|
IloOplErrorHandler |
createOplErrorHandler(java.io.OutputStream outs) |
IloOplModel |
createOplModel(IloOplModelDefinition definition,
IloCP cp) |
IloOplModel |
createOplModel(IloOplModelDefinition definition,
IloCplex cplex) |
IloOplModelDefinition |
createOplModelDefinition(IloOplModelSource source,
IloOplErrorHandler handler)
Deprecated.
|
IloOplModelDefinition |
createOplModelDefinition(IloOplModelSource source,
IloOplSettings settings) |
IloOplModelSource |
createOplModelSource(java.lang.String filename) |
IloOplModelSource |
createOplModelSource(java.lang.String filename,
boolean compiled)
Deprecated.
|
IloOplModelSource |
createOplModelSourceFromStream(java.io.InputStream modelStream,
java.lang.String modelName)
Creates an OPL model source from a model given as a stream.
|
IloOplModelSource |
createOplModelSourceFromString(java.lang.String modelText,
java.lang.String modelName)
Creates an OPL model source from a model given as a string.
|
IloOplModelSource |
createOplModelSourceFromString(java.lang.String modelText,
java.lang.String modelName,
boolean compiled)
Deprecated.
|
IloOplProfiler |
createOplProfiler() |
IloOplProject |
createOplProject(java.io.InputStream input,
java.lang.String name) |
IloOplProject |
createOplProject(java.lang.String projectPath) |
IloOplRelaxationIterator |
createOplRelaxationIterator(IloOplModel model) |
IloOplRunConfiguration |
createOplRunConfiguration(IloOplModelDefinition def) |
IloOplRunConfiguration |
createOplRunConfiguration(IloOplModelDefinition def,
IloOplDataElements dataElements) |
IloOplRunConfiguration |
createOplRunConfiguration(java.lang.String modPath) |
IloOplRunConfiguration |
createOplRunConfiguration(java.lang.String modPath,
java.lang.String datPath) |
IloOplRunConfiguration |
createOplRunConfiguration(java.lang.String modPath,
java.lang.String[] datPaths) |
IloOplSettings |
createOplSettings(IloOplErrorHandler handler) |
void |
end()
Deletes the OPL environment, clearing all the memory used by the objects created through this
factory.
|
JavaToCppOutputStreamAdapter |
getErrStream() |
static IloOplFactory |
getOplFactoryFrom(IloOplModel oplModel)
Gets an OPL factory from an existing OPL model.
|
JavaToCppOutputStreamAdapter |
getOutStream() |
static java.lang.String |
getVersion()
Returns the version of the OPL library.
|
JavaToCppOutputStreamAdapter |
getWarningStream() |
IloOplDataSerializer |
IloOplDataSerializer(IloOplSettings settings,
java.io.OutputStream outs,
boolean header) |
IloIntRange |
intRange(int lb,
int ub)
Creates an integer range.
|
ilog.concert.IloIntSet |
intSet()
Creates a set of integer values.
|
IloMapIndexArray |
mapIndexArray(int initialSize)
Returns an array to manipulate indices to access instances of IloTupleMap.
|
ilog.concert.IloNumSet |
numSet()
Creates a set of numerical values.
|
static void |
registerLicense(java.lang.String license,
int signature)
Entry point for runtime licenses.
|
static void |
releaseLicense()
Forces OPL to release the license it is currently holding.
|
void |
removeFromKeepRefs(java.lang.Object obj) |
static void |
setDebugMode(boolean debug)
Sets debug mode on/off.
|
static void |
setDebugModeWarning(boolean warning)
Sets the debug-mode warning message on/off.
|
void |
setError(java.io.OutputStream errorStream)
Redirects all error messages to the given stream
|
void |
setOut(java.io.OutputStream outputStream)
Redirects all output messages to the given stream
|
void |
setWarning(java.io.OutputStream warningStream)
Redirects all warning messages to the given stream
|
IloSymbolSet |
symbolSet()
Creates a set of strings.
|
public IloOplFactory()
public JavaToCppOutputStreamAdapter getOutStream()
public JavaToCppOutputStreamAdapter getErrStream()
public JavaToCppOutputStreamAdapter getWarningStream()
public static IloOplFactory getOplFactoryFrom(IloOplModel oplModel)
public static void setDebugMode(boolean debug)
setDebugModeWarning(boolean)public static void setDebugModeWarning(boolean warning)
public static void registerLicense(java.lang.String license,
int signature)
throws IloException
Entry point for runtime licenses.
Throws an IloException in case of failure.
IloCplex.registerLicense or
IloCP.registerLicense.IloExceptionlicense - a string containing the RUNTIME key.signature - an integer associated with the RUNTIME key, obtained with the key.public static void releaseLicense()
public static java.lang.String getVersion()
public IloOplCompiler createOplCompiler()
public IloCplex createCplex() throws IloException
IloExceptionpublic IloCP createCP() throws IloException
IloException@Deprecated public IloOplModelDefinition createOplModelDefinition(IloOplModelSource source, IloOplErrorHandler handler)
public IloOplModelDefinition createOplModelDefinition(IloOplModelSource source, IloOplSettings settings)
public IloOplProject createOplProject(java.lang.String projectPath)
public IloOplProject createOplProject(java.io.InputStream input, java.lang.String name)
public IloOplRunConfiguration createOplRunConfiguration(java.lang.String modPath, java.lang.String datPath) throws IloException
IloExceptionpublic IloOplRunConfiguration createOplRunConfiguration(java.lang.String modPath) throws IloException
IloExceptionpublic IloOplRunConfiguration createOplRunConfiguration(java.lang.String modPath, java.lang.String[] datPaths) throws IloException
IloExceptionpublic IloOplRunConfiguration createOplRunConfiguration(IloOplModelDefinition def) throws IloException
IloExceptionpublic IloOplRunConfiguration createOplRunConfiguration(IloOplModelDefinition def, IloOplDataElements dataElements) throws IloException
IloExceptionpublic IloOplErrorHandler createOplErrorHandler(java.io.OutputStream outs)
public IloOplErrorHandler createOplErrorHandler()
public IloOplSettings createOplSettings(IloOplErrorHandler handler)
public IloOplModel createOplModel(IloOplModelDefinition definition, IloCplex cplex)
public IloOplModel createOplModel(IloOplModelDefinition definition, IloCP cp)
@Deprecated public IloOplModelSource createOplModelSource(java.lang.String filename, boolean compiled)
public IloOplModelSource createOplModelSource(java.lang.String filename)
public IloOplDataElements createOplDataElements()
public IloOplModelSource createOplModelSourceFromString(java.lang.String modelText, java.lang.String modelName)
modelText - The text of the model to be used as a source. It can't be a compiled model (which is a
binary file).modelName - The name of the modelpublic IloOplModelSource createOplModelSourceFromStream(java.io.InputStream modelStream, java.lang.String modelName)
modelStream - The stream of the model to be used as a source. It may be a compiled model.modelName - The name of the model@Deprecated public IloOplModelSource createOplModelSourceFromString(java.lang.String modelText, java.lang.String modelName, boolean compiled)
compiled - True if the string contains a compiled model.public IloOplDataSource createOplDataSource(java.lang.String filename)
public IloOplDataSource createOplDataSourceFromString(java.lang.String dataText, java.lang.String name)
dataText - The text of the data to be used as data sourcename - The name of the data sourcepublic IloOplDataSource createOplDataSourceFromStream(java.io.InputStream dataStream, java.lang.String name)
dataStream - The stream of data to be used as data sourcename - The name of the data source@Deprecated public IloOplDataSerializer createOplDataSerializer(java.io.OutputStream outs)
public IloOplDataSerializer createOplDataSerializer(IloOplSettings settings, java.io.OutputStream outs)
public IloOplDataSerializer IloOplDataSerializer(IloOplSettings settings, java.io.OutputStream outs, boolean header)
public IloOplCplexBasis createOplCplexBasis()
public IloOplCplexVectors createOplCplexVectors()
public IloOplRelaxationIterator createOplRelaxationIterator(IloOplModel model)
public IloOplConflictIterator createOplConflictIterator(IloOplModel model)
public IloOplProfiler createOplProfiler()
public void setOut(java.io.OutputStream outputStream)
public void setError(java.io.OutputStream errorStream)
public void setWarning(java.io.OutputStream warningStream)
public void end()
public IloMapIndexArray mapIndexArray(int initialSize) throws IloException
IloExceptionpublic void addToKeepRefs(java.lang.Object obj)
public void removeFromKeepRefs(java.lang.Object obj)
public IloIntRange intRange(int lb, int ub) throws IloException
IloExceptionpublic IloSymbolSet symbolSet() throws IloException
IloExceptionpublic ilog.concert.IloNumSet numSet()
throws IloException
IloExceptionpublic ilog.concert.IloIntSet intSet()
throws IloException
IloException