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

该类的实例是优化引擎中的一个受约束累积元素函数。 模型层中的累积元素函数由形状函数 "IloPulse和作为第一个参数的 "IloIntervalVar、"IloStepAtStart或 "IloStepAtEnd实例构建。 通过使用成员函数 "IlcCumulElementVar IlcCPEngine::getCumulElement(const IloCumulFunctionExpr) const,您可以从 "IloCumulFunctionExpr的实例中获取 "IlcCumulElementVar的实例。
通过该类的成员函数,可以访问 cumul 元素函数的搜索引擎数据结构,包括区间变量、形状、高度的整数范围域。 这涉及域设置器和获取器,以及用于自定义约束传播实现的 delta 域和事件。 这些成员功能只能在优化引擎的搜索中使用。
有关累积变量和用于调度的搜索 API 的更多信息,请参阅CP Optimizer 中用于调度的搜索 API 概念。
另请参阅:
| 方法概要 | |
|---|---|
public IlcCPEngine | getCPEngine() const |
public IlcInt | getHeightMax() const |
public IlcInt | getHeightMin() const |
public IlcIntervalVar | getInterval() const |
public IlcInt | getOldHeightMax() const |
public IlcInt | getOldHeightMin() const |
public IlcBool | hasDeltaHeight() const |
public IlcBool | isFixed() const |
public IlcBool | isHeightFixed() const |
public IlcBool | isNull() const |
public IlcBool | isPulse() const |
public IlcBool | isStepAtEnd() const |
public IlcBool | isStepAtStart() const |
public void | setHeight(IlcInt value) const |
public void | setHeightMax(IlcInt max) const |
public void | setHeightMin(IlcInt min) const |
public void | whenHeight(const IlcDemon d) const |
| 方法详细信息 |
|---|
This member function returns the instance of IlcCPEngine associated with the invoking instance of IlcCumulElementVar.
该成员函数返回调用 "IlcCumulElementVar实例的高度整数范围的当前最大值。 如果 cumul 元素为空函数,则该成员函数返回的值毫无意义。
该成员函数返回调用 "IlcCumulElementVar实例的高度整数范围的当前最小值。 如果 cumul 元素为空函数,则该成员函数返回的值毫无意义。
This member function returns the instance of IlcIntervalVar associated with the invoking instance of IlcCumulElementVar.
该成员函数返回调用 "IlcCumulElementVar实例的高度整数范围在优化引擎的传播算法最后一次处理该区间时的最大值。
该函数只能在传播函数中使用,即在执行 demon("IlcDemonI实例)或约束的虚拟成员 "propagate("IlcConstraintI实例)时使用。
该成员函数返回调用 "IlcCumulElementVar实例的高度整数范围在优化引擎的传播算法最后一次处理该区间时的最小值。
该函数只能在传播函数中使用,即在执行 demon("IlcDemonI实例)或约束的虚拟成员 "propagate("IlcConstraintI实例)时使用。
This member function returns IlcTrue if the height integer range of the invoking instance of IlcCumulElementVar has changed since the last time the interval was processed by the propagation algorithm of the optimizer engine. 否则,返回 "IlcFalse。
该函数只能在传播函数中使用,即在执行 demon("IlcDemonI实例)或约束的虚拟成员 "propagate("IlcConstraintI实例)时使用。
IlcCumulElementVar的实例可以为空,但仍有一个 delta 高度。如果调用的 "IlcCumulElementVar实例是固定的,即如果它是一个空函数或其关联的 "IlcIntervalVar实例及其整数域范围高度是固定的,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse。
如果调用的 "IlcCumulElementVar实例为空函数或其整数域范围高度固定,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse。
如果调用的 "IlcCumulElementVar实例为空函数,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse。
如果调用 "IlcCumulElementVar实例的形状是脉冲函数,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse。
如果调用 "IlcCumulElementVar实例的形状是结束函数的步长,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse。
如果调用 "IlcCumulElementVar实例的形状是起始步长函数,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse。
此成员函数将调用实例 "IlcCumulElementVar的高度范围值设置为整数参数 "value。 如果 cumul 元素为空,则不会发生任何变化(由于优化引擎的单调性)。 如果高度范围为空,则 cumul 元素将被设置为空。 创建累积高度域事件。 该成员函数的效果是可逆的。
此成员函数将调用实例 "IlcCumulElementVar的高度范围最大值设置为整数参数 "max。 如果 "max大于高度范围的当前最大值,或者累积元素为空,则不会发生任何变化(这是由于优化引擎的单调性)。 如果高度范围为空,则 cumul 元素将被设置为空。 创建累积高度域事件。 该成员函数的效果是可逆的。
此成员函数将调用实例 "IlcCumulElementVar的高度范围最小值设置为整数参数 "min。 如果 "min小于当前高度范围的最小值,或者累积元素为空,则不会发生任何变化(由于优化引擎的单调性)。 如果高度范围为空,则 cumul 元素将被设置为空。 创建累积高度域事件。 该成员函数的效果是可逆的。
该成员函数会在调用的 "IlcCumulElementVar实例上创建一个高度域事件,即把参数 "demon与累积元素的高度缩减变化关联起来。 每当调用 cumul 元素的高度范围发生变化时,恶魔就会被执行。
由于约束也是恶魔,因此约束也可以作为参数传递给该成员函数。 只要调用累积元素的高度范围发生变化,该约束就会传播。
该成员函数只能在张贴约束时使用。