跳至主内容
框架 无框架

枚举StateFunctionValue

定义文件: ilcp/cp.h
IloCP"的整数参数 .

An enumeration for the class IloCP.

整数值。

字段

NoState = -1

这个值为 "-1的静态整数是 "IloStateFunction实例在其定义域外任何一点的常规值。

下面的示例打印了 "IloCP::NoState

    IloModel model(env);
    IloStateFunctionf(env);
    model.addIloAlwaysNoState(f, -1, 1));

    cp.out() << "[" <<cp.getValue(f,0)
             << "," <<cp.getSegmentEnd(f,i)
             << "):" <<cp.getSegmentValue(f,i)
             << std::endl;
 

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