LinExpr.addConstant ()


LinExpr.addConstant ()

addConstant(c)

向线性表达式中添加一个常量。

参数:

c:要添加到表达式中的常量。

使用示例:

expr = x + 2 * y expr. addconstant (0.1)