Model.getGenConstrNorm ()

getGenConstrNorm(genconstr)

检索数据关联到一个一般类型的约束规范。调用该方法为一种不同类型的一般约束导致异常。你可以查询GenConstrType属性来确定类型的约束。

另请参阅addGenConstrNorm这个一般的语义约束的描述类型。

参数:

genconstr:一般的约束感兴趣的对象。

返回值:

元组(resvar, var),包含与一般约束相关的数据:

resvar (Var):合成变量的规范约束。

Var (Var)列表:操作变量的规范约束。

(浮动):规范(可能的值是0、1、2、或GRB.INFINITY)。

使用示例:

# x5 = norm2 (x1, x3, x4) normconstr =模型。addGenConstrNorm(x5, [x1, x3, x4], 2.0, "normconstr") model.update() (resvar, vars, which) = model.getGenConstrNorm(normconstr)