def FConst (fpn):
global CONST_ID
assert((type(fpn) is float) or (isinstance(fpn, Fraction)))
# return tft_expr.ConstantExpr(fpn)
const_value = tft_expr.ConstantExpr( fpn )
const_name = tft_expr.PRESERVED_CONST_VPREFIX + "_" + str(CONST_ID)
CONST_ID = CONST_ID + 1
return DeclareBoundedVar(const_name,
Fraction,
tft_expr.PRESERVED_CONST_GID,
const_value, const_value,
True)
# NOTE: Please don't call this function internally...
评论列表
文章目录