Skip to main content
PREV CLASS NEXT CLASS

 

Class IloCP

IloObject
   |
   +--IloCP
Iterating properties:
Default behavior.
Index resolution:
Default behavior.
Available for:
flow control

Constructor Summary
Constructor Attributes Constructor Name and Description
 
IloCP()
Property Summary
Field Attributes Field Name and Description
pre processing, flow control
Accesses the CP search modifier factory.
all
Accesses CP information.
all
Accesses CP parameters.
flow control
Status of the last method invoked on this object.
Method Summary
Method Attributes Method Name and Description
flow control
addKPI(expr, name)
Adds a KPI to the IloCP.
flow control
Resets CP Optimizer to accept another CP model.
flow control
Removes any starting point.
flow control
dumpModel(path)
Dumps the CP model to a file.
flow control
Ends the current search and deletes the internal objects created by CP Optimizer to carry out the search.
flow control
exportModel(path)
Exports the CP model to a file.
flow control
Removes all KPI to the IloCP.
flow control
Returns the incumbent value.
flow control
Returns the incumbent value.
flow control
Return the CP KPI.
postprocessing
flow control
Returns the number of objective criteria in the invoking instance of IloCP.
postprocessing
flow control
Accesses the value of the lower bound, or values of a multi-criteria lower bound, of the current solution.
postprocessing
flow control
Accesses the value of the gap, or values of a multi-criteria gap, of the current solution.
postprocessing
flow control
Accesses the value of the objective, or values of a multi-criteria objective, of the current solution.
postprocessing
flow control
This method returns true if the invoking algorithm has an objective and false otherwise.
flow control
importModel(path)
Imports the IloCP model from a file.
flow control
next()
This method searches for a new (or first) solution to the model.
flow control
Removes all KPI to the IloCP.
flow control
removeKPI(name)
Removes a KPI to the IloCP.
flow control
setSearchPhases(phase, phaseN)
Modifies the search strategy.
flow control
setStartingPoint(startingPoint)
Sets starting point for subsequent searches.
flow control
solve()
Solves a problem.
flow control
Starts a new search.
Methods inherited from class IloObject
end
Constructor Detail
IloCP
IloCP()
Property Detail
factory
factory
Accesses the CP search modifier factory. See the C++ reference manual for IloCP.

Search modifiers are created by method calls.

Example:
  cp.factory.selectLargest()
  cp.factory.domainSize()
Search phases can be created like this:
  var phase;
  var phase2;
  with ( cp.factory ) {
     phase = searchPhase( selectLargest(domainSize()), selectSmallest(value()) );
     phase2 = searchPhase( x, selectLargest(domainSize()), selectSmallest(value()) );
  }
where x is an array of decision variables defined in the OPL model.
Available for:
pre processing, flow control

info
{IloOplScriptHCpInfos} info
Accesses CP information. See the C++ reference manual for IloCP.

Information elements are available by their names.

Example:
  cp.info.TotalTime
Available for:
all

param
{IloOplScriptHCpParams} param
Accesses CP parameters. See the C++ reference manual for IloCP.

Parameters are available by their names.

Example:
cp.param.TimeLimit = 13;
Symbolic parameter values are assigned as strings.
  cp.param.LogVerbosity = "Quiet";
Available for:
all

status
{int} status
Status of the last method invoked on this object.
Available for:
flow control
Method Detail
addKPI
addKPI(expr, name)
Adds a KPI to the IloCP.
Parameters:
expr - Expression to be considered as a kpis.
name - Optional, name of the KPI. If null, then the OPL name is used.
Available for:
flow control

clearModel
clearModel()
Resets CP Optimizer to accept another CP model.
Available for:
flow control

clearStartingPoint
clearStartingPoint()
Removes any starting point. See the C++ reference manual for IloCP.
Available for:
flow control

dumpModel
dumpModel(path)
Dumps the CP model to a file. Relative paths are resolved with respect to the current model file. See the C++ reference manual for IloCP.
Parameters:
path - Path of the file to which the model will be dumped.
Available for:
flow control

endSearch
endSearch()
Ends the current search and deletes the internal objects created by CP Optimizer to carry out the search. See the C++ reference manual for IloCP.
Available for:
flow control

exportModel
exportModel(path)
Exports the CP model to a file. Relative paths are resolved with respect to the current model file. See the C++ reference manual for IloCP.
Parameters:
path - Path of the file to which the model will be exported.
Available for:
flow control

getAllKPINames
getAllKPINames()
Removes all KPI to the IloCP.
Returns:
The list of KPI names.
Available for:
flow control

getIncumbentValueByExpr
getIncumbentValueByExpr(The)
Returns the incumbent value.
Parameters:
The - expr of the KPI to by queried.
Returns:
The incumbent value.
Available for:
flow control

getIncumbentValueByName
getIncumbentValueByName(The)
Returns the incumbent value.
Parameters:
The - name of the KPI to by queried.
Returns:
The incumbent value.
Available for:
flow control

getKPIValue
getKPIValue(The)
Return the CP KPI.
Parameters:
The - name of the KPI to by queried.
Returns:
The list of KPI names.
Available for:
flow control

getNumberOfObjValues
{int} getNumberOfObjValues()
Returns the number of objective criteria in the invoking instance of IloCP.
Returns:
The number of objective values.
Available for:
postprocessing
flow control

getObjBound
{float} getObjBound(i)
Accesses the value of the lower bound, or values of a multi-criteria lower bound, of the current solution. The optional parameter allows you to specify the index of the value when performing optimization with a multi-criteria objective. In the case of a multi-criteria objective, if no argument is passed, the method returns the value of the first criterion.
Parameters:
i - Optional parameter to give the objective position .
Returns:
The objective value(s) of the current solution.
Available for:
postprocessing
flow control

getObjGap
{float} getObjGap(i)
Accesses the value of the gap, or values of a multi-criteria gap, of the current solution. The optional parameter allows you to specify the index of the value when performing optimization with a multi-criteria objective. In the case of a multi-criteria objective, if no argument is passed, the method returns the value of the first criterion.
Parameters:
i - Optional parameter to give the objective position .
Returns:
The objective value(s) of the current solution.
Available for:
postprocessing
flow control

getObjValue
{float} getObjValue(i)
Accesses the value of the objective, or values of a multi-criteria objective, of the current solution. The optional parameter allows you to specify the index of the value when performing optimization with a multi-criteria objective. In the case of a multi-criteria objective, if no argument is passed, the method returns the value of the first criterion.
Parameters:
i - Optional parameter to give the objective position .
Returns:
The objective value(s) of the current solution.
Available for:
postprocessing
flow control

hasObjective
{boolean} hasObjective()
This method returns true if the invoking algorithm has an objective and false otherwise. See the C++ reference manual for IloCP.
Returns:
true if it has an objective.
Available for:
postprocessing
flow control

importModel
importModel(path)
Imports the IloCP model from a file. Relative paths are resolved with respect to the current model file. For more information, see the class IloCP in the CPLEX C++ Reference Manual.
Parameters:
path - Path to the file from which the model will be imported.
Available for:
flow control

next
{boolean} next()
This method searches for a new (or first) solution to the model. In the case of an optimization problem (with an objective in the model), the next method finds a solution strictly better than the previous solution found. In the case of a satisfaction problem (no objective in the model), next returns a solution that is usually different from those previously found. However, it may occasionally find a solution that had been found already. If you repeat calls to the next function, until it returns false, the solve is guaranteed to terminate and you will not miss any solutions of the model being solved. See the C++ reference manual for IloCP.
Returns:
true if a next solution is available.
Available for:
flow control

removeAllKPIs
removeAllKPIs()
Removes all KPI to the IloCP.
Available for:
flow control

removeKPI
removeKPI(name)
Removes a KPI to the IloCP.
Parameters:
name - Name of the KPI.
Available for:
flow control

setSearchPhases
setSearchPhases(phase, phaseN)
Modifies the search strategy. See the C++ reference manual for IloCP.

If called with no arguments, the search is reset to the default search.

Parameters:
phase - Use this search phase, optional.
phaseN - Use n search phases.
See also:
IloSearchPhase
Available for:
flow control

setStartingPoint
setStartingPoint(startingPoint)
Sets starting point for subsequent searches. See the C++ reference manual for IloCP.
Parameters:
startingPoint - the starting point
See also:
IloOplCPSolution
Available for:
flow control

solve
{boolean} solve()
Solves a problem. See the C++ reference manual for IloCP.
Returns:
true if the solve has been successful.
Available for:
flow control

startNewSearch
startNewSearch()
Starts a new search. See the C++ reference manual for IloCP.
Available for:
flow control

©Copyright IBM Corp. 1987-2011.