跳至主内容
框架 无框架

IloCPEngine类

定义文件: ilcp/cpext.h
IloCPEngine的地图IloCPEngineIloCPEngineIlcCPEngine
该类的实例代表 CP Optimizer 的搜索引擎。

该类为 "IlcCPEngine添加了功能,以便访问 Ilc 级对象,特别是 Concert 技术对象(如 "IloIntVar和 "IloIntervalVar)中的变量。

该类中的大多数成员函数都包含 "assert语句。 有关宏 "NDEBUG(打开或关闭这些 "assert语句的方法)的解释,请参阅 Assert 和 NDEBUG 概念。

另请参阅:

方法概要
public IloCPEngine::PrintIntervalVarDomainsdomain(const IloIntervalVar a) const
public IloCPEngine::PrintNumVarDomainsdomain(const IloIntVarArray vars) const
public IloCPEngine::PrintNumVarDomainsdomain(const IloNumVar var) const
public IlcCumulElementVargetCumulElement(const IloCumulFunctionExpr f) const
public IloIntgetDomainSize(const IloIntVar var) const
public IloIntgetDomainSize(const IloNumVar var) const
public IloIntgetEnd(const IloIntervalVar a) const
public IloIntgetEndMax(const IloIntervalVar a) const
public IloIntgetEndMin(const IloIntervalVar a) const
public IloIntervalVargetFirst(const IloIntervalSequenceVar seq) const
public IlcFloatArraygetFloatArray(const IloNumArray arg) const
public IloIntgetHeightAtEnd(const IloIntervalVar var, const IloCumulFunctionExpr f) const
public IloIntgetHeightAtStart(const IloIntervalVar var, const IloCumulFunctionExpr f) const
public IlcIntArraygetIntArray(const IloIntArray arg) const
public IlcIntervalVargetInterval(const IloIntervalVar var) const
public IlcIntervalSequenceVargetIntervalSequence(const IloIntervalSequenceVar s) const
public IlcIntTupleSetgetIntTupleSet(const IloIntTupleSet ts) const
public IlcIntVargetIntVar(const IloNumVar var) const
public IlcIntVarArraygetIntVarArray(const IloIntVarArray vars) const
public IloIntervalVargetLast(const IloIntervalSequenceVar seq) const
public IloIntgetLength(const IloIntervalVar a) const
public IloIntgetLengthMax(const IloIntervalVar a) const
public IloIntgetLengthMin(const IloIntervalVar a) const
public IloCPgetMasterCP() const
public IloIntgetMax(const IloIntVar var) const
public IloIntgetMin(const IloIntVar var) const
public IloIntervalVargetNext(const IloIntervalSequenceVar seq, const IloIntervalVar a) const
public IloIntgetNumberOfSegments(const IloStateFunction f) const
public IloIntgetNumberOfSegments(const IloCumulFunctionExpr f) const
public IloIntervalVargetPrev(const IloIntervalSequenceVar seq, const IloIntervalVar a) const
public IloIntgetSegmentEnd(const IloStateFunction f, IloInt s) const
public IloIntgetSegmentEnd(const IloCumulFunctionExpr f, IloInt i) const
public IloIntgetSegmentStart(const IloStateFunction f, IloInt s) const
public IloIntgetSegmentStart(const IloCumulFunctionExpr f, IloInt i) const
public IloIntgetSegmentValue(const IloStateFunction f, IloInt s) const
public IloIntgetSegmentValue(const IloCumulFunctionExpr f, IloInt i) const
public IloIntgetSize(const IloIntervalVar a) const
public IloIntgetSizeMax(const IloIntervalVar a) const
public IloIntgetSizeMin(const IloIntervalVar a) const
public IloIntgetStart(const IloIntervalVar a) const
public IloIntgetStartMax(const IloIntervalVar a) const
public IloIntgetStartMin(const IloIntervalVar a) const
public IloIntgetValue(const IloStateFunction f, IloInt t) const
public IloIntgetValue(const IloCumulFunctionExpr f, IloInt t) const
public IloIntgetValue(const IloIntVar v) const
public IloCPEngine(const IlcCPEngine & engine)

Create an instance of IloCPEngine from one of of type IlcCPEngine.

public IloBoolisAbsent(const IloIntervalVar a) const
public IloBoolisExtracted(const IloExtractable ext) const
public IloBoolisFixed(const IloStateFunction f) const
public IloBoolisFixed(const IloCumulFunctionExpr f) const
public IloBoolisFixed(const IloIntervalSequenceVar seq) const
public IloBoolisFixed(const IloIntervalVar a) const
public IloBoolisFixed(const IloNumVar var) const
public IloBoolisInDomain(const IloIntVar var, IloInt value) const
public IloBoolisPresent(const IloIntervalVar a) const
public IloCPEngine::IntVarIteratoriterator(const IloIntVar var)
public IloBoolrestore(const IloSolution solution) const
从 "IlcCPEngine继承的方法
add, addReversibleAction, exitSearch, fail, getHeap, getInfo, getInfo, getRandomInt, getRandomNum, out, solve
内部班级
IloCPEngine::IntVarIterator用于遍历整数变量当前域的类。
方法详细信息

IloCPEngine

publicIloCPEngine(constIlcCPEngine&engine)
Create an instance of IloCPEngine from one of of type IlcCPEngine.

该构造函数可用于访问 "IloCPEngine::getIntVar(IloIntVar)等服务,而 "IlcCPEngine无法访问这些服务,因为它不知道 Concert Technology 对象。


publicIloCPEngine::PrintIntervalVarDomains domain(constIloIntervalVar a) const

该成员函数返回未注明的类 "IloCPEngine::PrintIntervalVarDomains,可将其插入数据流,以打印由调用的 "IloCPEngine实例维护的区间变量 "a的当前域。 下面是一个使用实例:

  cp.out() <<cp.domain(a) << std::endl;
  

publicIloCPEngine::PrintNumVarDomains domain(constIloIntVarArray vars) const

该成员函数返回未注明的类 "IloCPEngine::PrintNumVarDomains,可将其插入数据流,以打印由调用的 "IloCPEngine实例维护的 "vars的当前域。 下面是一个使用实例:

       cp.out() <<cp.domain(vars) << std::endl;
     

public 'IloCPEngine::PrintNumVarDomains'领域(const 'IloNumVar'变异) const

该成员函数返回未注明的类 "IloCPEngine::PrintNumVarDomains,可将其插入数据流,以打印由调用的 "IloCPEngine实例维护的 "var的当前域。 下面是一个使用实例:

       cp.out() <<cp.domain(var) << std::endl;
     

getCumulElement

publicIlcCumulElementVar getCumulElement(constIloCumulFunctionExpr f) const

该成员函数返回与建模变量 "f相对应的优化引擎累积元素变量。 A cumul element function variable is an instance of IloCumulFunctionExpr built by the shape functions IloPulse, IloStepAtStart or IloStepAtEnd with an instance of IloIntervalVar as first argument.

有关调度搜索 API 的更多信息,请参见概念 "在 CP 优化程序中搜索调度 API

另请参阅:


getDomainSize

publicIloInt getDomainSize(constIloIntVar var) const

This member function returns the size of the domain of variable var as maintained in the invoking instance of IloCPEngine.


getDomainSize

publicIloInt getDomainSize(constIloNumVar var) const

This member function returns the size of the domain of variable var as maintained in the invoking instance of IloCPEngine. 如果 "var不是积分类型,则违反了断言。


getEnd

publicIloInt getEnd(constIloIntervalVar a) const

This member function returns the current value of the end of interval variable a in the invoking instance of IloCPEngine. 如果 "a没有固定,则违反了断言。


getEndMax

publicIloInt getEndMax(constIloIntervalVar a) const

This member function returns the maximum value for the end of interval variable a in the invoking instance of IloCPEngine.


getEndMin

publicIloInt getEndMin(constIloIntervalVar a) const

This member function returns the minimum value for the end of interval variable a in the invoking instance of IloCPEngine.


getFirst

publicIloIntervalVar getFirst(constIloIntervalSequenceVar seq) const

该成员函数假定区间序列变量 "seq是固定的。 它返回序列中第一个位置的区间变量。 返回的区间变量必然存在。 如果序列的所有区间变量都不存在,则返回空句柄。 如果序列 "seq不是固定的,则违反了断言。

如下代码示例所示,该函数可用于打印与序列值相对应的总顺序。

  forIloIntervalVara =cp.getFirst(seq);a.getImpl()!=0; a =cp.getNext(seq,a))
     cp.out() <<cp.domain(a) << std::endl;
 

有关区间序列变量的更多信息,请参阅CP 优化器中的区间变量排序概念。


getFloatArray

public 'IlcFloatArray'getFloatArray(const 'IloNumArray'雅格) const

该成员函数返回与建模数组 "arg相对应的优化引擎浮点数组。


getHeightAtEnd

publicIloInt getHeightAtEnd(constIloIntervalVar var, constIloCumulFunctionExpr f) const

该成员函数假定累积函数表达式 "f是固定的。 它返回区间变量 "var在 "var结束时对累积函数表达式f的总贡献。 请注意,不存在的区间变量的贡献始终为零。

有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。


getHeightAtStart

publicIloInt getHeightAtStart(constIloIntervalVar var, constIloCumulFunctionExpr f) const

该成员函数假定累积函数表达式 "f是固定的。 它返回区间变量 "var在 "var开始时对累积函数表达式f的总贡献。 请注意,不存在的区间变量的贡献始终为零。

有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。


getIntArray

public 'IlcIntArray'getIntArray(const 'IloIntArray'雅格) const

该成员函数返回与建模数组 "arg相对应的优化引擎整数数组。


getInterval

publicIlcIntervalVar getInterval(constIloIntervalVar var) const

该成员函数返回与建模变量 "var相对应的优化引擎区间变量。

有关用于调度的搜索 API 的更多信息,请参阅CP Optimizer 中用于调度的搜索 API 概念。

另请参阅:


getIntervalSequence

publicIlcIntervalSequenceVar getIntervalSequence(constIloIntervalSequenceVar s) const

该成员函数返回与建模变量 "var相对应的优化引擎区间变量。

有关调度搜索 API 的更多信息,请参见概念 "在 CP 优化程序中搜索调度 API

另请参阅:


getIntTupleSet

public 'IlcIntTupleSet'getIntTupleSet(const 'IloIntTupleSet'沙龙) const

此函数返回与建模元组集 "ts相对应的优化引擎元组集。


getIntVar

publicIlcIntVar getIntVar(constIloNumVar var) const

该成员函数返回与建模变量 "var相对应的优化引擎整数变量。


getIntVarArray

public 'IlcIntVarArray'getIntVarArray(const 'IloIntVarArray'变量) const

该成员函数返回与建模变量数组 "vars相对应的优化引擎整数变量数组。


getLast

publicIloIntervalVar getLast(constIloIntervalSequenceVar seq) const

该成员函数假定区间序列变量 "seq是固定的。 它返回序列中最后一个位置的区间变量。 返回的区间变量必然存在。 如果序列的所有区间变量都不存在,则返回空句柄。 如果序列 "seq不是固定的,则违反了断言。

如下代码示例所示,该函数可用于打印与序列值相对应的反向总顺序。

  forIloIntervalVara =cp.getLast(seq);a.getImpl()!=0; a =cp.getPrev(seq,a))
     cp.out() <<cp.domain(a) << std::endl;
 

有关区间序列变量的更多信息,请参阅CP 优化器中的区间变量排序概念。


getLength

publicIloInt getLength(constIloIntervalVar a) const

This member function returns the current value of the length of interval variable a in the invoking instance of IloCPEngine. 如果 "a没有固定,则违反了断言。


getLengthMax

publicIloInt getLengthMax(constIloIntervalVar a) const

This member function returns the maximum value for the length of interval variable a in the invoking instance of IloCPEngine.


getLengthMin

publicIloInt getLengthMin(constIloIntervalVar a) const

This member function returns the minimum value for the length of interval variable a in the invoking instance of IloCPEngine.


getMasterCP

公共IloCP getMasterCP() 常量

Retrieves the master IloCP object which controls the invoking IloCPEngine object.


getMax

publicIloInt getMax(constIloIntVar var) const

This member function returns the maximum value of the variable var in the invoking instance of IloCPEngine.


getMin

publicIloInt getMin(constIloIntVar var) const

This member function returns the minimum value of the variable var in the invoking instance of IloCPEngine.


getNext

publicIloIntervalVar getNext(constIloIntervalSequenceVar seq, constIloIntervalVar a) const

该成员函数假定区间序列变量 "seq是固定的。 它返回序列中紧跟区间 "a的区间变量。 返回的区间变量必然存在。 如果 "a不存在或不是序列 "seq的区间变量,并且序列不是固定的,则违反断言。 如果 "a位于序列的最后一个位置,函数将返回一个空句柄。

如下代码示例所示,该函数可用于打印与序列值相对应的总顺序。

  forIloIntervalVara =cp.getFirst(seq);a.getImpl()!=0; a =cp.getNext(seq,a))
     cp.out() <<cp.domain(a) << std::endl;
 

有关区间序列变量的更多信息,请参阅CP 优化器中的区间变量排序概念。


getNumberOfSegments

publicIloInt getNumberOfSegments(constIloStateFunction f) const

该成员函数假定状态函数 "f是固定的。 它返回相应分步函数的段数。 A segment is an interval [start, end) on which the value of f is constant. 如果未定义状态函数,值为 "IloCP::NoState;否则,值为一个非负整数。 如果状态函数 "f未固定,则违反了断言。

如下代码示例所示,该函数可用于打印状态函数的内容。

  forIloInt i=0;i <cp.getNumberOfSegments(f); ++i)
    cp.out() << "[" <<cp.getSegmentStart(f,i)
             << "," <<cp.getSegmentEnd(f,i)
             << "):" <<cp.getSegmentValue(f,i)
             << std::endl;
 

有关状态函数的更多信息,请参阅CP 优化器中的状态函数概念。


getNumberOfSegments

publicIloInt getNumberOfSegments(constIloCumulFunctionExpr f) const

该成员函数假定累积函数表达式 "f是固定的。 它返回相应分步非负函数的段数。 A segment is an interval [start, end) on which the value of f is constant. 如果累积函数表达式 "f未固定,则违反了断言。

如下代码示例所示,该函数可用于打印累加函数表达式的内容。

  forIloInt i=0;i <cp.getNumberOfSegments(f); ++i)
    cp.out() << "[" <<cp.getSegmentStart(f,i)
             << "," <<cp.getSegmentEnd(f,i)
             << "):" <<cp.getSegmentValue(f,i)
             << std::endl;
 

有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。


getPrev

publicIloIntervalVar getPrev(constIloIntervalSequenceVar seq, constIloIntervalVar a) const

该成员函数假定区间序列变量 "seq是固定的。 它返回序列中紧接区间 "a之前的区间变量。 返回的区间变量必然存在。 如果 "a不存在或不是序列 "seq的区间变量,并且序列不是固定的,则违反断言。 如果 "a位于序列的第一个位置,函数将返回一个空句柄。

如下代码示例所示,该函数可用于打印与序列值相对应的反向总顺序。

  forIloIntervalVara =cp.getLast(seq);a.getImpl()!=0; a =cp.getPrev(seq,a))
     cp.out() <<cp.domain(a) << std::endl;
 

有关区间序列变量的更多信息,请参阅CP 优化器中的区间变量排序概念。


getSegmentEnd

publicIloInt getSegmentEnd(constIloStateFunction f,IloInt s) const

该成员函数假定状态函数 "f是固定的。 它返回相应分步函数 "i段的结尾。 A segment is an interval [start, end) on which the value of f is constant. 如果未定义状态函数,值为 "IloCP::NoState;否则,值为一个非负整数。 如果状态函数 "f未固定,则违反了断言。

如下代码示例所示,该函数可用于打印状态函数的内容。

  forIloInt i=0;i <cp.getNumberOfSegments(f); ++i)
    cp.out() << "[" <<cp.getSegmentStart(f,i)
             << "," <<cp.getSegmentEnd(f,i)
             << "):" <<cp.getSegmentValue(f,i)
             << std::endl;
 

有关状态函数的更多信息,请参阅CP 优化器中的状态函数概念。


getSegmentEnd

publicIloInt getSegmentEnd(constIloCumulFunctionExpr f,IloInt i) const

该成员函数假定累积函数表达式 "f是固定的。 它返回相应分步非负函数 "i的末尾。 A segment is an interval [start, end) on which the value of f is constant. 如果 "n是函数的段数,那么段的索引从 "0开始,因此索引 "i应属于 "[0,n)范围。 如果累积函数表达式 "f不是固定的,或者 "i不是有效的分段索引,则违反断言。

如下代码示例所示,该函数可用于打印累加函数表达式的内容。

  forIloInt i=0;i <cp.getNumberOfSegments(f); ++i)
    cp.out() << "[" <<cp.getSegmentStart(f,i)
             << "," <<cp.getSegmentEnd(f,i)
             << "):" <<cp.getSegmentValue(f,i)
             << std::endl;
 

有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。


getSegmentStart

publicIloInt getSegmentStart(constIloStateFunction f,IloInt s) const

该成员函数假定状态函数 "f是固定的。 它返回相应分步函数 "i段的起始值。 A segment is an interval [start, end) on which the value of f is constant. 如果未定义状态函数,值为 "IloCP::NoState;否则,值为一个非负整数。 如果状态函数 "f未固定,则违反了断言。

如下代码示例所示,该函数可用于打印状态函数的内容。

  forIloInt i=0;i <cp.getNumberOfSegments(f); ++i)
    cp.out() << "[" <<cp.getSegmentStart(f,i)
             << "," <<cp.getSegmentEnd(f,i)
             << "):" <<cp.getSegmentValue(f,i)
             << std::endl;
 

有关函数的更多信息,请参阅CP 优化器中的状态函数概念。


getSegmentStart

publicIloInt getSegmentStart(constIloCumulFunctionExpr f,IloInt i) const

该成员函数假定累积函数表达式 "f是固定的。 It returns the start of the ith segment of the corresponding stepwise non-negative function. A segment is an interval [start, end) on which the value of f is constant. 如果 "n是函数的段数,那么段的索引从 "0开始,因此索引 "i应属于 "[0,n)范围。 如果累积函数表达式 "f不是固定的,或者 "i不是有效的分段索引,则违反断言。

如下代码示例所示,该函数可用于打印累加函数表达式的内容。

  forIloInt i=0;i <cp.getNumberOfSegments(f); ++i)
    cp.out() << "[" <<cp.getSegmentStart(f,i)
             << "," <<cp.getSegmentEnd(f,i)
             << "):" <<cp.getSegmentValue(f,i)
             << std::endl;
 

有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。


getSegmentValue

publicIloInt getSegmentValue(constIloStateFunction f,IloInt s) const

该成员函数假定状态函数 "f是固定的。 它返回相应分步函数 "i段的值。 A segment is an interval [start, end) on which the value of f is constant. 如果未定义状态函数,返回值为 "IloCP::NoState;否则返回值为非负整数。 如果状态函数 "f未固定,则违反了断言。

如下代码示例所示,该函数可用于打印状态函数的内容。

  forIloInt i=0;i <cp.getNumberOfSegments(f); ++i)
    cp.out() << "[" <<cp.getSegmentStart(f,i)
             << "," <<cp.getSegmentEnd(f,i)
             << "):" <<cp.getSegmentValue(f,i)
             << std::endl;
 

有关状态函数的更多信息,请参阅CP 优化器中的状态函数概念。


getSegmentValue

publicIloInt getSegmentValue(constIloCumulFunctionExpr f,IloInt i) const

该成员函数假定累积函数表达式 "f是固定的。 它返回相应分步非负函数 "i的值。 A segment is an interval [start, end) on which the value of f is constant. 如果 "n是函数的段数,那么段的索引从 "0开始,因此索引 "i应属于 "[0,n)范围。 如果累积函数表达式 "f不是固定的,或者 "i不是有效的分段索引,则违反断言。

如下代码示例所示,该函数可用于打印累加函数表达式的内容。

  forIloInt i=0;i <cp.getNumberOfSegments(f); ++i)
    cp.out() << "[" <<cp.getSegmentStart(f,i)
             << "," <<cp.getSegmentEnd(f,i)
             << "):" <<cp.getSegmentValue(f,i)
             << std::endl;
 

有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。


getSize

publicIloInt getSize(constIloIntervalVar a) const

This member function returns the current value of the size of interval variable a in the invoking instance of IloCPEngine. 如果 "a没有固定,则违反了断言。


getSizeMax

publicIloInt getSizeMax(constIloIntervalVar a) const

This member function returns the maximum value for the size of interval variable a in the invoking instance of IloCPEngine.


getSizeMin

publicIloInt getSizeMin(constIloIntervalVar a) const

This member function returns the minimum value for the size of interval variable a in the invoking instance of IloCPEngine.


getStart

publicIloInt getStart(constIloIntervalVar a) const

This member function returns the current value of the start of interval variable a in the invoking instance of IloCPEngine. 如果 "a没有固定,则违反了断言。


getStartMax

publicIloInt getStartMax(constIloIntervalVar a) const

This member function returns the maximum value for the start of interval variable a in the invoking instance of IloCPEngine.


getStartMin

publicIloInt getStartMin(constIloIntervalVar a) const

This member function returns the minimum value for the start of interval variable a in the invoking instance of IloCPEngine.


getValue

publicIloInt getValue(constIloStateFunction f,IloInt t) const

该成员函数假定状态函数 "f是固定的。 它返回 "t点上相应的分步非负函数值。 如果未定义状态函数,返回值为 "IloCP::NoState;否则返回值为非负整数。 如果状态函数 "f不是固定的,或者 "t不属于区间 "[IloIntervalMin, IloIntervalMax),就违反了断言。

有关状态函数的更多信息,请参阅CP 优化器中的状态函数概念。


getValue

publicIloInt getValue(constIloCumulFunctionExpr f,IloInt t) const

该成员函数假定累积函数表达式 "f是固定的。 它返回 "t点上相应的分步非负函数值。 如果累积函数表达式 "f不是固定的,或者 "t不属于区间 "[IloIntervalMin, IloIntervalMax),则违反了断言。

有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。


getValue

publicIloInt getValue(constIloIntVar v) const

This member function returns the current value of the variable v in the invoking instance of IloCPEngine. 如果 "v没有固定为一个值,则违反了断言。


isAbsent

publicIloBool isAbsent(constIloIntervalVar a) const

只有当调用 "IloCPEngine的实例中不存在区间变量 "a时,该成员函数才返回 "IloTrue


isExtracted

publicIloBool isExtracted(constIloExtractable ext) const

该成员函数检查是否已提取可提取的 "ext


isFixed

publicIloBool isFixed(constIloStateFunction f) const

该成员函数指示状态函数 "f是否采用由调用 "IloCPEngine实例维护的特定值。 A state function f is said to be fixed if it defines a fixed value f(t) for all t in [IloIntervalMin,IloIntervalMax). 当状态函数固定时,它是一个逐步函数。 如果未定义状态函数,值为 "IloCP::NoState;否则,值为一个非负整数。

有关状态函数的更多信息,请参阅CP 优化器中的状态函数概念。


isFixed

publicIloBool isFixed(constIloCumulFunctionExpr f) const

该成员函数指示累积函数表达式 "f是否具有由调用的 "IloCPEngine实例维护的特定值。 如果累加函数表达式 "f为所有 "t in [IloIntervalMin,IloIntervalMax)定义了一个固定值 "f(t),则称该表达式为固定表达式。 当固定不变时,累积函数表达式是一个分步非负函数。

有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。


isFixed

publicIloBool isFixed(constIloIntervalSequenceVar seq) const

该成员函数指示区间序列变量 "seq的域是否取调用 "IloCPEngine实例维护的特定值。 当且仅当序列中的所有区间变量都不存在或有序时,区间序列变量被认为是固定的。

有关区间序列变量的更多信息,请参阅CP 优化器中的区间变量排序概念。


isFixed

publicIloBool isFixed(constIloIntervalVar a) const

该成员函数指示 "a的域是否具有由调用的 "IloCPEngine实例维护的特定值。 当且仅当一个区间变量不存在或存在固定的起始值、结束值和大小值时,才称其为固定区间变量。


isFixed

publicIloBool isFixed(constIloNumVar var) const

该成员函数指示 "var的域是否具有由调用的 "IloCPEngine实例维护的特定值。


isInDomain

publicIloBool isInDomain(constIloIntVar var,IloInt value) const

This member function indicates whether value is contained in the current domain of var as maintained by the invoking IloCPEngine instance.


isPresent

publicIloBool isPresent(constIloIntervalVar a) const

如果且仅当区间变量 "a出现在调用实例 "IloCPEngine中时,该成员函数才返回 "IloTrue


迭代器

publicIloCPEngine::IntVarIterator iterator(constIloIntVar var)

该成员函数返回一个迭代器,用于遍历由调用 CP 优化器维护的 "var域。 相当于 IloCPEngine::IntVarIterator(this, var).


复原

publicIloBool restore(constIloSolution solution) const

该成员函数使用调用的 CP 优化器将 "solution中的变量与它们保存的值实例化。 任何添加到解决方案中的目标值都不会恢复。 如果解决方案没有违反调用 CP 优化器提取的模型中的任何约束条件,则返回 "IloTrue,CP 优化器中的约束变量状态将反映存储在 "solution中的状态。 否则,CP 优化器的状态保持不变,并返回 "IloFalse