跳至主内容
框架 无框架

类IlcCumulElementVar

定义文件: ilcp/cpext.h
包含文件: <ilcp/cpextilcp/cpext.h
IlcCumulElementVar的地图IlcCumulElementVarIlcCumulElementVar
用于表示约束累积元素函数的类。

该类的实例是优化引擎中的一个受约束累积元素函数。 模型层中的累积元素函数由形状函数 "IloPulse和作为第一个参数的 "IloIntervalVar、"IloStepAtStart或 "IloStepAtEnd实例构建。 通过使用成员函数 "IlcCumulElementVar IlcCPEngine::getCumulElement(const IloCumulFunctionExpr) const,您可以从 "IloCumulFunctionExpr的实例中获取 "IlcCumulElementVar的实例。

通过该类的成员函数,可以访问 cumul 元素函数的搜索引擎数据结构,包括区间变量、形状、高度的整数范围域。 这涉及域设置器和获取器,以及用于自定义约束传播实现的 delta 域和事件。 这些成员功能只能在优化引擎的搜索中使用。

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

另请参阅:

方法概要
public IlcCPEnginegetCPEngine() const
public IlcIntgetHeightMax() const
public IlcIntgetHeightMin() const
public IlcIntervalVargetInterval() const
public IlcIntgetOldHeightMax() const
public IlcIntgetOldHeightMin() const
public IlcBoolhasDeltaHeight() const
public IlcBoolisFixed() const
public IlcBoolisHeightFixed() const
public IlcBoolisNull() const
public IlcBoolisPulse() const
public IlcBoolisStepAtEnd() const
public IlcBoolisStepAtStart() const
public voidsetHeight(IlcInt value) const
public voidsetHeightMax(IlcInt max) const
public voidsetHeightMin(IlcInt min) const
public voidwhenHeight(const IlcDemon d) const
方法详细信息

getCPEngine

publicIlcCPEngine getCPEngine() const

This member function returns the instance of IlcCPEngine associated with the invoking instance of IlcCumulElementVar.


getHeightMax

publicIlcInt getHeightMax() const

该成员函数返回调用 "IlcCumulElementVar实例的高度整数范围的当前最大值。 如果 cumul 元素为空函数,则该成员函数返回的值毫无意义。


getHeightMin

publicIlcInt getHeightMin() const

该成员函数返回调用 "IlcCumulElementVar实例的高度整数范围的当前最小值。 如果 cumul 元素为空函数,则该成员函数返回的值毫无意义。


getInterval

publicIlcIntervalVar getInterval() const

This member function returns the instance of IlcIntervalVar associated with the invoking instance of IlcCumulElementVar.


getOldHeightMax

publicIlcInt getOldHeightMax() const

该成员函数返回调用 "IlcCumulElementVar实例的高度整数范围在优化引擎的传播算法最后一次处理该区间时的最大值。

该函数只能在传播函数中使用,即在执行 demon("IlcDemonI实例)或约束的虚拟成员 "propagate("IlcConstraintI实例)时使用。


getOldHeightMin

publicIlcInt getOldHeightMin() const

该成员函数返回调用 "IlcCumulElementVar实例的高度整数范围在优化引擎的传播算法最后一次处理该区间时的最小值。

该函数只能在传播函数中使用,即在执行 demon("IlcDemonI实例)或约束的虚拟成员 "propagate("IlcConstraintI实例)时使用。


hasDeltaHeight

publicIlcBool hasDeltaHeight() const

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 高度。

isFixed

publicIlcBool isFixed() const

如果调用的 "IlcCumulElementVar实例是固定的,即如果它是一个空函数或其关联的 "IlcIntervalVar实例及其整数域范围高度是固定的,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse


isHeightFixed

publicIlcBool isHeightFixed() const

如果调用的 "IlcCumulElementVar实例为空函数或其整数域范围高度固定,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse


isNull

publicIlcBool isNull() const

如果调用的 "IlcCumulElementVar实例为空函数,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse


isPulse

publicIlcBool isPulse() const

如果调用 "IlcCumulElementVar实例的形状是脉冲函数,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse


isStepAtEnd

publicIlcBool isStepAtEnd() const

如果调用 "IlcCumulElementVar实例的形状是结束函数的步长,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse


isStepAtStart

公共IlcBool isStepAtStart() 常量

如果调用 "IlcCumulElementVar实例的形状是起始步长函数,则该成员函数返回 "IlcTrue。 否则,返回 "IlcFalse


setHeight

public voidsetHeight(IlcInt value) const

此成员函数将调用实例 "IlcCumulElementVar的高度范围值设置为整数参数 "value。 如果 cumul 元素为空,则不会发生任何变化(由于优化引擎的单调性)。 如果高度范围为空,则 cumul 元素将被设置为空。 创建累积高度域事件。 该成员函数的效果是可逆的。


setHeightMax

public voidsetHeightMax(IlcInt max) const

此成员函数将调用实例 "IlcCumulElementVar的高度范围最大值设置为整数参数 "max。 如果 "max大于高度范围的当前最大值,或者累积元素为空,则不会发生任何变化(这是由于优化引擎的单调性)。 如果高度范围为空,则 cumul 元素将被设置为空。 创建累积高度域事件。 该成员函数的效果是可逆的。


setHeightMin

public voidsetHeightMin(IlcInt min) const

此成员函数将调用实例 "IlcCumulElementVar的高度范围最小值设置为整数参数 "min。 如果 "min小于当前高度范围的最小值,或者累积元素为空,则不会发生任何变化(由于优化引擎的单调性)。 如果高度范围为空,则 cumul 元素将被设置为空。 创建累积高度域事件。 该成员函数的效果是可逆的。


whenHeight

public voidwhenHeight(constIlcDemon d) const

该成员函数会在调用的 "IlcCumulElementVar实例上创建一个高度域事件,即把参数 "demon与累积元素的高度缩减变化关联起来。 每当调用 cumul 元素的高度范围发生变化时,恶魔就会被执行。

由于约束也是恶魔,因此约束也可以作为参数传递给该成员函数。 只要调用累积元素的高度范围发生变化,该约束就会传播。

该成员函数只能在张贴约束时使用。