| 概述 | 组 | 树 | 图形 | 不推荐 | 索引 | 概念 |

该类为 "IlcCPEngine添加了功能,以便访问 Ilc 级对象,特别是 Concert 技术对象(如 "IloIntVar和 "IloIntervalVar)中的变量。
该类中的大多数成员函数都包含 "assert语句。 有关宏 "NDEBUG(打开或关闭这些 "assert语句的方法)的解释,请参阅 Assert 和 NDEBUG 概念。
另请参阅:
IlcCPEngine, IloIntVarEvalI, IloIntValueEvalI, IloIntVarChooserI, IloIntValueChooserI
从 "IlcCPEngine继承的方法 |
|---|
add, addReversibleAction, exitSearch, fail, getHeap, getInfo, getInfo, getRandomInt, getRandomNum, out, solve |
| 内部班级 | |
|---|---|
| IloCPEngine::IntVarIterator | 用于遍历整数变量当前域的类。 |
| 方法详细信息 |
|---|
IloCPEngine from one of of type IlcCPEngine.该构造函数可用于访问 "IloCPEngine::getIntVar(IloIntVar)等服务,而 "IlcCPEngine无法访问这些服务,因为它不知道 Concert Technology 对象。
该成员函数返回未注明的类 "IloCPEngine::PrintIntervalVarDomains,可将其插入数据流,以打印由调用的 "IloCPEngine实例维护的区间变量 "a的当前域。 下面是一个使用实例:
cp.out() <<cp.domain(a) << std::endl;
该成员函数返回未注明的类 "IloCPEngine::PrintNumVarDomains,可将其插入数据流,以打印由调用的 "IloCPEngine实例维护的 "vars的当前域。 下面是一个使用实例:
cp.out() <<cp.domain(vars) << std::endl;
该成员函数返回未注明的类 "IloCPEngine::PrintNumVarDomains,可将其插入数据流,以打印由调用的 "IloCPEngine实例维护的 "var的当前域。 下面是一个使用实例:
cp.out() <<cp.domain(var) << std::endl;
该成员函数返回与建模变量 "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。
另请参阅:
IloCumulFunctionExpr,IlcCumulElementVar
This member function returns the size of the domain of variable var as maintained in the invoking instance of IloCPEngine.
This member function returns the size of the domain of variable var as maintained in the invoking instance of IloCPEngine. 如果 "var不是积分类型,则违反了断言。
This member function returns the current value of the end of interval variable a in the invoking instance of IloCPEngine. 如果 "a没有固定,则违反了断言。
This member function returns the maximum value for the end of interval variable a in the invoking instance of IloCPEngine.
This member function returns the minimum value for the end of interval variable a in the invoking instance of IloCPEngine.
该成员函数假定区间序列变量 "seq是固定的。 它返回序列中第一个位置的区间变量。 返回的区间变量必然存在。 如果序列的所有区间变量都不存在,则返回空句柄。 如果序列 "seq不是固定的,则违反了断言。
如下代码示例所示,该函数可用于打印与序列值相对应的总顺序。
forIloIntervalVara =cp.getFirst(seq);a.getImpl()!=0; a =cp.getNext(seq,a))
cp.out() <<cp.domain(a) << std::endl;
有关区间序列变量的更多信息,请参阅CP 优化器中的区间变量排序概念。
该成员函数返回与建模数组 "arg相对应的优化引擎浮点数组。
该成员函数假定累积函数表达式 "f是固定的。 它返回区间变量 "var在 "var结束时对累积函数表达式f的总贡献。 请注意,不存在的区间变量的贡献始终为零。
有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。
该成员函数假定累积函数表达式 "f是固定的。 它返回区间变量 "var在 "var开始时对累积函数表达式f的总贡献。 请注意,不存在的区间变量的贡献始终为零。
有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。
该成员函数返回与建模数组 "arg相对应的优化引擎整数数组。
该成员函数返回与建模变量 "var相对应的优化引擎区间变量。
有关用于调度的搜索 API 的更多信息,请参阅CP Optimizer 中用于调度的搜索 API 概念。
另请参阅:
该成员函数返回与建模变量 "var相对应的优化引擎区间变量。
有关调度搜索 API 的更多信息,请参见概念 "在 CP 优化程序中搜索调度 API。
另请参阅:
IloIntervalSequenceVar,IlcIntervalSequenceVar
此函数返回与建模元组集 "ts相对应的优化引擎元组集。
该成员函数返回与建模变量 "var相对应的优化引擎整数变量。
该成员函数返回与建模变量数组 "vars相对应的优化引擎整数变量数组。
该成员函数假定区间序列变量 "seq是固定的。 它返回序列中最后一个位置的区间变量。 返回的区间变量必然存在。 如果序列的所有区间变量都不存在,则返回空句柄。 如果序列 "seq不是固定的,则违反了断言。
如下代码示例所示,该函数可用于打印与序列值相对应的反向总顺序。
forIloIntervalVara =cp.getLast(seq);a.getImpl()!=0; a =cp.getPrev(seq,a))
cp.out() <<cp.domain(a) << std::endl;
有关区间序列变量的更多信息,请参阅CP 优化器中的区间变量排序概念。
This member function returns the current value of the length of interval variable a in the invoking instance of IloCPEngine. 如果 "a没有固定,则违反了断言。
This member function returns the maximum value for the length of interval variable a in the invoking instance of IloCPEngine.
This member function returns the minimum value for the length of interval variable a in the invoking instance of IloCPEngine.
Retrieves the master IloCP object which controls the invoking IloCPEngine object.
This member function returns the maximum value of the variable var in the invoking instance of IloCPEngine.
This member function returns the minimum value of the variable var in the invoking instance of IloCPEngine.
该成员函数假定区间序列变量 "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 优化器中的区间变量排序概念。
该成员函数假定状态函数 "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 优化器中的状态函数概念。
该成员函数假定累积函数表达式 "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 优化器中的累加函数概念。
该成员函数假定区间序列变量 "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 优化器中的区间变量排序概念。
该成员函数假定状态函数 "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 优化器中的状态函数概念。
该成员函数假定累积函数表达式 "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 优化器中的累加函数概念。
该成员函数假定状态函数 "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 优化器中的状态函数概念。
该成员函数假定累积函数表达式 "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 优化器中的累加函数概念。
该成员函数假定状态函数 "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 优化器中的状态函数概念。
该成员函数假定累积函数表达式 "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 优化器中的累加函数概念。
This member function returns the current value of the size of interval variable a in the invoking instance of IloCPEngine. 如果 "a没有固定,则违反了断言。
This member function returns the maximum value for the size of interval variable a in the invoking instance of IloCPEngine.
This member function returns the minimum value for the size of interval variable a in the invoking instance of IloCPEngine.
This member function returns the current value of the start of interval variable a in the invoking instance of IloCPEngine. 如果 "a没有固定,则违反了断言。
This member function returns the maximum value for the start of interval variable a in the invoking instance of IloCPEngine.
This member function returns the minimum value for the start of interval variable a in the invoking instance of IloCPEngine.
该成员函数假定状态函数 "f是固定的。 它返回 "t点上相应的分步非负函数值。 如果未定义状态函数,返回值为 "IloCP::NoState;否则返回值为非负整数。 如果状态函数 "f不是固定的,或者 "t不属于区间 "[IloIntervalMin,
IloIntervalMax),就违反了断言。
有关状态函数的更多信息,请参阅CP 优化器中的状态函数概念。
该成员函数假定累积函数表达式 "f是固定的。 它返回 "t点上相应的分步非负函数值。 如果累积函数表达式 "f不是固定的,或者 "t不属于区间 "[IloIntervalMin,
IloIntervalMax),则违反了断言。
有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。
This member function returns the current value of the variable v in the invoking instance of IloCPEngine. 如果 "v没有固定为一个值,则违反了断言。
只有当调用 "IloCPEngine的实例中不存在区间变量 "a时,该成员函数才返回 "IloTrue。
该成员函数检查是否已提取可提取的 "ext。
该成员函数指示状态函数 "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 优化器中的状态函数概念。
该成员函数指示累积函数表达式 "f是否具有由调用的 "IloCPEngine实例维护的特定值。 如果累加函数表达式 "f为所有 "t in
[IloIntervalMin,IloIntervalMax)定义了一个固定值 "f(t),则称该表达式为固定表达式。 当固定不变时,累积函数表达式是一个分步非负函数。
有关累加函数表达式的更多信息,请参阅CP 优化器中的累加函数概念。
该成员函数指示区间序列变量 "seq的域是否取调用 "IloCPEngine实例维护的特定值。 当且仅当序列中的所有区间变量都不存在或有序时,区间序列变量被认为是固定的。
有关区间序列变量的更多信息,请参阅CP 优化器中的区间变量排序概念。
该成员函数指示 "a的域是否具有由调用的 "IloCPEngine实例维护的特定值。 当且仅当一个区间变量不存在或存在固定的起始值、结束值和大小值时,才称其为固定区间变量。
该成员函数指示 "var的域是否具有由调用的 "IloCPEngine实例维护的特定值。
This member function indicates whether value is contained in the current domain of var as maintained by the invoking IloCPEngine instance.
如果且仅当区间变量 "a出现在调用实例 "IloCPEngine中时,该成员函数才返回 "IloTrue。
该成员函数返回一个迭代器,用于遍历由调用 CP 优化器维护的 "var域。 相当于 IloCPEngine::IntVarIterator(this, var).
该成员函数使用调用的 CP 优化器将 "solution中的变量与它们保存的值实例化。 任何添加到解决方案中的目标值都不会恢复。 如果解决方案没有违反调用 CP 优化器提取的模型中的任何约束条件,则返回 "IloTrue,CP 优化器中的约束变量状态将反映存储在 "solution中的状态。 否则,CP 优化器的状态保持不变,并返回 "IloFalse。